def wishbone_my_setup(setup_dir):
# install GSEA, diffusion components, and download data.
tools_dir = setup_dir + '/tools'
if not os.path.exists(tools_dir + '/DiffusionGeometry/'):
shutil.unpack_archive(tools_dir + '/DiffusionGeometry.zip', tools_dir +
'/DiffusionGeometry/')
if not os.path.exists(tools_dir + '/mouse/'):
shutil.unpack_archive(tools_dir + '/mouse_gene_sets.tar.gz', tools_dir)
if not os.path.exists(tools_dir + '/human/'):
shutil.unpack_archive(tools_dir + '/human_gene_sets.tar.gz', tools_dir)
if not os.path.exists( setup_dir +'/data/GSE72857_umitab.txt.gz'):
# downloads mouse UMI from GSE72857 Transcriptional heterogeneity and lineage commitment in myeloid progenitors [single cell RNA-seq]
os.system("wget -m -nH -nd -P "+ setup_dir + "/data/ ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE72nnn/GSE72857/suppl/GSE72857%5Fumitab%2Etxt%2Egz")
x=pd.read_csv(setup_dir + '/data/GSE72857_umitab.txt.gz', sep = '\t', compression="gzip")
y=pd.read_csv(setup_dir + '/data/sample_scseq_data.csv', index_col=[0])
scdata_raw= x.T.loc[y.index]
scdata_raw = wishbone.wb.SCData(scdata_raw.astype('float'), data_type='sc-seq')
return(scdata_raw)
评论列表
文章目录