基于 python 的单细胞转录因子分析

基于 python 的单细胞转录因子分析

pyscenic

文章目录

  • 基于 python 的单细胞转录因子分析
  • 前言
  • Main


前言

流程极为简单,几乎没有任何难度


Main

Install pyscenic

!Attention, python version >=3.7

pip install pyscenic

Download reference datas

wget -c https://github.com/aertslab/pySCENIC/archive/refs/heads/master.zip
x master.zip
cd master
mv resources/* ../../
wget -c https://resources.aertslab.org/cistarget/motif2tf/motifs-v9-nr.hgnc-m0.001-o0.0.tbl

wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/tc_v1/gene_based/encode_20190621__ChIP_seq_transcription_factor.hg19-tss-centered-5kb.max.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/tc_v1/gene_based/encode_20190621__ChIP_seq_transcription_factor.hg19-500bp-upstream.max.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/tc_v1/gene_based/encode_20190621__ChIP_seq_transcription_factor.hg19-tss-centered-10kb.max.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg38/refseq_r80/tc_v1/gene_based/encode_20190621__ChIP_seq_transcription_factor.hg38__refseq-r80__10kb_up_and_down_tss.max.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg38/refseq_r80/tc_v1/gene_based/encode_20190621__ChIP_seq_transcription_factor.hg38__refseq-r80__500bp_up_and_100bp_down_tss.max.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/mc8nr/gene_based/hg19-500bp-upstream-7species.mc8nr.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/mc9nr/gene_based/hg19-500bp-upstream-7species.mc9nr.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/mc8nr/gene_based/hg19-500bp-upstream-10species.mc8nr.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/mc9nr/gene_based/hg19-500bp-upstream-10species.mc9nr.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg38/refseq_r80/mc9nr/gene_based/hg38__refseq-r80__500bp_up_and_100bp_down_tss.mc9nr.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/mc8nr/gene_based/hg19-tss-centered-10kb-7species.mc8nr.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/mc9nr/gene_based/hg19-tss-centered-10kb-7species.mc9nr.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg38/refseq_r80/mc9nr/gene_based/hg38__refseq-r80__10kb_up_and_down_tss.mc9nr.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/mc8nr/gene_based/hg19-tss-centered-10kb-10species.mc8nr.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/mc9nr/gene_based/hg19-tss-centered-10kb-10species.mc9nr.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/mc8nr/gene_based/hg19-tss-centered-5kb-7species.mc8nr.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/mc9nr/gene_based/hg19-tss-centered-5kb-7species.mc9nr.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/mc9nr/gene_based/hg19-tss-centered-5kb-7species.mc9nr.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/mc8nr/gene_based/hg19-tss-centered-5kb-10species.mc8nr.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/mc9nr/gene_based/hg19-tss-centered-5kb-10species.mc9nr.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/mc8nr/region_based/hg19-regions-9species.all_regions.mc8nr.feather
wget -c https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/mc9nr/region_based/hg19-regions-9species.all_regions.mc9nr.feather

The pipline of pyscenic only 3 steps

Step.1


pyscenic grn \
        --num_workers 6 \
        -o /data/expr_mat.adjacencies.tsv \ # input Count data
        # csv (rows=cells x columns=genes) or loom (rows=genes x columns=cells).
        /data/expr_mat.tsv \
        /data/allTFs_hg38.txt

Step.2

pyscenic ctx \
        /data/expr_mat.adjacencies.tsv \ # First Step out put file
        /data/hg19-tss-centered-5kb-7species.mc9nr.feather \
        /data/hg19-tss-centered-10kb-7species.mc9nr.feather \
        --annotations_fname /data/motifs-v9-nr.hgnc-m0.001-o0.0.tbl \
        --expression_mtx_fname /data/expr_mat.tsv \ # the same to the first input data
        --mode "dask_multiprocessing" \
        --output /data/regulons.csv \
        --num_workers 6

Step.3

pyscenic aucell \
        /data/expr_mat.tsv \
        /data/regulons.csv \
        -o /data/auc_mtx.csv \
        --num_workers 6

你可能感兴趣的:(单细胞,r语言,bash,开发语言)