dls_funct.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:dcss_single_cell 作者: srmcc 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号