帮助文档地址
总流程
Install the Cell Ranger Pipeline
Check the system to see if it meets the system requirements
Use cellranger upload to send data to 10X Genomics support
Know where to get help
Run cellranger mkfastq to generate FASTQ files using test data
Run cellranger count using a public data set
Run cellranger aggr to combine two data sets
Run cellranger reanalyze to adjust clustering parameters
cellranger count 流程
- 得到fastq和参考基因组文件
cellranger count是通过将fastq序列比对到参考转录组上并产生一个以.cloupe为结尾的文件以便在loupe cell browser上分析,同时会产生多个与目前主流分析软件兼容的文件以便进一步分析
mkdir ~/yard/run_cellranger_count
cd ~/yard/run_cellranger_count
本例中以一个1000个细胞的PBMC的数据集为例作为演示,首先下载该数据集
wget http://cf.10xgenomics.com/samples/cell-exp/3.0.0/pbmc_1k_v3/pbmc_1k_v3_fastqs.tar
该文件大概为5.17G,文件下载后要解压
tar -xvf pbmc_1k_v3_fastqs.tar
解压后的文件列表如下
pbmc_1k_v3_fastqs/
pbmc_1k_v3_fastqs/pbmc_1k_v3_S1_L001_R2_001.fastq.gz
pbmc_1k_v3_fastqs/pbmc_1k_v3_S1_L002_I1_001.fastq.gz
pbmc_1k_v3_fastqs/pbmc_1k_v3_S1_L001_R1_001.fastq.gz
pbmc_1k_v3_fastqs/pbmc_1k_v3_S1_L002_R1_001.fastq.gz
pbmc_1k_v3_fastqs/pbmc_1k_v3_S1_L002_R2_001.fastq.gz
pbmc_1k_v3_fastqs/pbmc_1k_v3_S1_L001_I1_001.fastq.gz
cellranger 的输入文件命名规则为Sample_S1_L00X_R1_001.fastq.gz,以pbmc_1k_v3_S1_L001_R2_001.fastq.gz为例,样本为pbmc_1k_v3(v3试剂盒),样本在两条lane上运行,分别为L001和L002,该文件为R2文件(文件分为R1,R2和I1)
下载参考基因组
因为这个例子是人的数据,因此需要下载官网上的构建好的人的参考基因组索引约为10.6G
wget http://cf.10xgenomics.com/supp/cell-exp/refdata-cellranger-GRCh38-3.0.0.tar.gz
tar -zxvf refdata-cellranger-GRCh38-3.0.0.tar.gz
- 查询cellranger count的帮助文档
cellranger count --help
/mnt/home/user.name/yard/apps/cellranger-3.1.0/cellranger-cs/3.1.0/bin
cellranger count (3.1.0)
Copyright (c) 2019 10x Genomics, Inc. All rights reserved.
-------------------------------------------------------------------------------
'cellranger count' quantifies single-cell gene expression.
The commands below should be preceded by 'cellranger':
Usage:
count
--id=ID
[--fastqs=PATH]
[--sample=PREFIX]
--transcriptome=DIR
[options]
count <run_id> [options]
count -h | --help | --version
id:对你运行的项目起个名字,可以任意取名(输出结果在建文件夹时以这个名字命名)
fastqs:包含fastq文件的路径
sample:如果上述路径中包含的文件不只一个样本的,则需要指定该参数,该参数是根据fastq文件名的前缀对文件进行识别的,可以用来区分不同的样本
transcriptome:用来保存参考基因组的路径
注:换行符 \
- 运行cellranger count
cellranger count --id=run_count_1kpbmcs \
--fastqs=/mnt/home/user.name/yard/run_cellranger_count/pbmc_1k_v3_fastqs \
--sample=pbmc_1k_v3 \
--transcriptome=/mnt/home/user.name/yard/run_cellranger_count/refdata-cellranger-GRCh38-3.0.0
正确的输出为
/mnt/yard/user.name/yard/apps/cellranger-3.1.0/cellranger-cs/3.1.0/bin
cellranger count (3.1.0)
Copyright (c) 2019 10x Genomics, Inc. All rights reserved.
-------------------------------------------------------------------------------
Martian Runtime - '3.1.0-v3.2.3'
...
Pipestance completed successfully!
2019-09-12 15:39:08 Shutting down.
Saving pipestance info to run_count_1kpbmcs/run_count_1kpbmcs.mri.tgz
当命令行中出现“==Pipestance completed successfully!==”时,说明运行成功
- 对输出文件进行探索
该实例中的数据文件夹名为run_count_1kpbmcs
其中的文件为
analysis
cloupe.cloupe
filtered_feature_bc_matrix
filtered_feature_bc_matrix.h5
metrics_summary.csv
molecule_info.h5
possorted_genome_bam.bam
possorted_genome_bam.bam.bai
raw_feature_bc_matrix
raw_feature_bc_matrix.h5
web_summary.html