建库,人和小鼠的数据库可以直接下载,对于无法直接下载的需要自行下载全基因组序列和gtf文件,根据 cellranger mkref构建参考数据库
wget ftp://ftp.ensembl.org/pub/release-97/fasta/danio_rerio/dna/Danio_rerio.GRCz11.dna.primary_assembly.fa.gz gunzip Danio_rerio.GRCz11.dna.primary_assembly.fa.gz wget ftp://ftp.ensembl.org/pub/release-97/gtf/danio_rerio/Danio_rerio.GRCz11.97.gtf.gz gunzip Danio_rerio.GRCz11.97.gtf.gz cellranger mkgtf Danio_rerio.GRCz11.97.gtf Danio_rerio.GRCz11.97.filtered.gtf --attribute=gene_biotype:protein_coding \ --attribute=gene_biotype:lincRNA \ --attribute=gene_biotype:antisense \ --attribute=gene_biotype:IG_LV_gene \ --attribute=gene_biotype:IG_V_gene \ --attribute=gene_biotype:IG_V_pseudogene \ --attribute=gene_biotype:IG_D_gene \ --attribute=gene_biotype:IG_J_gene \ --attribute=gene_biotype:IG_J_pseudogene \ --attribute=gene_biotype:IG_C_gene \ --attribute=gene_biotype:IG_C_pseudogene \ --attribute=gene_biotype:TR_V_gene \ --attribute=gene_biotype:TR_V_pseudogene \ --attribute=gene_biotype:TR_D_gene \ --attribute=gene_biotype:TR_J_gene \ --attribute=gene_biotype:TR_J_pseudogene \ --attribute=gene_biotype:TR_C_gene cellranger mkref --nthreads=80 --genome=ref_zebr_GRCz11 --fasta=Danio_rerio.GRCz11.dna.primary_assembly.fa --genes=Danio_rerio.GRCz11.97.filtered.gtf --ref-version=3.1.0 #注意gene_id和transcript_id的顺序
计算表达量,下机的原始数据可以通过bcl2fastq拆分,也可通过cellranger自带的mkfastq命令拆分。bcl2fastq拆分后得到两个fastq文件,index信息包含在第一个fastq文件第一行尾部;mkfastq拆分后得到三个fastq文件,index信息包含在一个单独的fastq文件里。两种拆分结果都可作为count命令的输入,但文件的命名一定要严格安装软件的说明,否则会出错。
cellranger count --id=PBLzebr1 --transcriptome=/home/wuchangsong/sc_cell/ref_zebr_GRCz11 --fastqs=/home/wuchangsong/sc_cell/fastq/ --sample=PBLzebr1
得到的表达矩阵在filtered_feature_bc_matrix文件夹中,在analysis文件夹中有PCA和tSNE聚类结果文本形式。cellranger count 计算的结果只能作为错略观测的结果,如果需要进一步分析聚类细胞,还需要进行下游分析,这里使用官方推荐 R 包(Seurat),后边的分析参考Seurat的使用。
Leave a Reply