生信

cellranger multi使用(单细胞转录组+VDJ)

2022-11-20  本文已影响0人  可能性之兽

单细胞大多数东西我都不是那么想写,因为就是照着流程抄。而且写的人挺多的了,不差我一个。但是最近谷歌了一下cellranger multi的中文教程,都没有让我满意的,就写一个吧。

至于怎么下载单细胞的参考基因组这些就不写了,至于为什么要用multi,因为VDJ如果能够有单细胞转录组的改变作为参考会更加准确

image.png
该 cellranger multi通过丢弃在相应的5’基因表达数据集中未被调用的任何细胞来改进 V (D) J 数据集中的细胞调用。通过将在 V (D) J 结果中调用但不在5’基因表达结果中调用的细胞分配为 V (D) J 数据中的背景 GEM,cellranger multi减轻了 BCR 和 TCR 数据中可能出现的过度calling问题。这种改进的细胞calling只有在5’基因表达和 V (D) J 文库从同一个样品测序时才可能(所以同一批测了单细胞转录组和TCR,BCR的才用它)。
image.png

主要参数

cellranger multi -h
cellranger-multi
Analyze multiplexed data or combined gene expression/immune profiling/feature barcode data

USAGE:
    cellranger multi [OPTIONS] --id <ID> --csv <CSV>

OPTIONS:
        --id <ID>               A unique run id and output folder name [a-zA-Z0-9_-]+
        --description <TEXT>    Sample description to embed in output files [default: ]
        --csv <CSV>             Path of CSV file enumerating input libraries and analysis parameters
        --dry                   Do not execute the pipeline. Generate a pipeline invocation (.mro) file and stop
        --jobmode <MODE>        Job manager to use. Valid options: local (default), sge, lsf, slurm or path to a .template file. Search for help on "Cluster Mode" at
                                support.10xgenomics.com for more details on configuring the pipeline to use a compute cluster [default: local]
        --localcores <NUM>      Set max cores the pipeline may request at one time. Only applies to local jobs
        --localmem <NUM>        Set max GB the pipeline may request at one time. Only applies to local jobs
        --localvmem <NUM>       Set max virtual address space in GB for the pipeline. Only applies to local jobs
        --mempercore <NUM>      Reserve enough threads for each job to ensure enough memory will be available, assuming each core on your cluster has at least this much
                                memory available. Only applies to cluster jobmodes
        --maxjobs <NUM>         Set max jobs submitted to cluster at one time. Only applies to cluster jobmodes
        --jobinterval <NUM>     Set delay between submitting jobs to cluster, in ms. Only applies to cluster jobmodes
        --overrides <PATH>      The path to a JSON file that specifies stage-level overrides for cores and memory. Finer-grained than --localcores, --mempercore and
                                --localmem. Consult https://support.10xgenomics.com/ for an example override file
        --uiport <PORT>         Serve web UI at http://localhost:PORT
        --disable-ui            Do not serve the web UI
        --noexit                Keep web UI running after pipestance completes or fails
        --nopreflight           Skip preflight checks
    -h, --help                  Print help information

基本的使用就是

如果需要改内存和线程,按照上面改就是了

 cellranger multi  --id <ID> --csv <CSV>

含有VDJ和基因表达测序一起跑

构建一个csv文件,内容就是这些,备注已经写的比较傻瓜化了,其他参数参考最后一个链接

[gene-expression] ### 不用动
reference,/path/to/transcriptome  ### reference不用动,后面写自己的转录参考基因组的路径

[vdj]  ### 不用动
reference,/path/to/vdj_reference ### reference不用动,后面写自己的VDJ参考基因组的路径

[feature] ### Antibody Capture or CRISPR Guide Capture libraries才会需要这个,单细胞转录组和VDJ不需要,可以删掉
reference,/path/to/feature_ref.csv

[libraries] ### 不用动
fastq_id,fastqs,lanes,feature_types,subsample_rate ### 按照需要,但是这行基本不用动
GEX_fastqs_id,path/to/GEX_fastqs,1|2,Gene Expression, ### 改样本名字和路径,其他不用动
VDJ_B_fastqs_id,path/to/vdj_B_fastqs,1|2,VDJ-B,### 改样本名字和路径,其他不用动
VDJ_T_fastqs_id,path/to/vdj_T_fastqs,1|2,VDJ-T,### 改样本名字和路径,其他不用动
FB_fastqs_id,path/to/FB_fastqs,1|2,Antibody Capture, ### 如果没有,删掉
CRISPR_fastqs_id,path/to/CRISPR_fastqs,1|2,CRISPR Guide Capture, ### 如果没有,删掉

这个主要针对3端的10X多个样本测序,但是也可以告诉你上述的参数内涵是什么(估计是老版本的主要功能,但是新版里也没有抛弃它)
Cell Multiplexing with cellranger multi -Software -Single Cell Gene Expression -Official 10x Genomics Support

这个文档里面告诉你上面这个csv的参数内涵是什么?(单细胞转录组加VDJ看这个)
Gene Expression, V(D)J & Feature Barcode Analysis with cellranger multi -Software -Single Cell Immune Profiling -Official 10x Genomics Support

产生的文件

outs/
├── config.csv
├── multi
│   ├── count
│   │   ├── raw_cloupe.cloupe
│   │   ├── raw_feature_bc_matrix
│   │   │   ├── barcodes.tsv.gz
│   │   │   ├── features.tsv.gz
│   │   │   └── matrix.mtx.gz
│   │   ├── raw_feature_bc_matrix.h5
│   │   ├── raw_molecule_info.h5
│   │   ├── unassigned_alignments.bam
│   │   └── unassigned_alignments.bam.bai
│   ├── vdj_b
│   │   ├── all_contig_annotations.bed
│   │   ├── all_contig_annotations.csv
│   │   ├── all_contig_annotations.json
│   │   ├── all_contig.bam
│   │   ├── all_contig.bam.bai
│   │   ├── all_contig.fasta
│   │   ├── all_contig.fasta.fai
│   │   └── all_contig.fastq
│   └── vdj_t
│       ├── all_contig_annotations.bed
│       ├── all_contig_annotations.csv
│       ├── all_contig_annotations.json
│       ├── all_contig.bam
│       ├── all_contig.bam.bai
│       ├── all_contig.fasta
│       ├── all_contig.fasta.fai
│       └── all_contig.fastq
├── per_sample_outs
│   └── Z6666
│       ├── count
│       │   ├── analysis
│       │   │   ├── clustering
│       │   │   │   ├── gene_expression_graphclust
│       │   │   │   │   └── clusters.csv
│       │   │   │   ├── gene_expression_kmeans_10_clusters
│       │   │   │   │   └── clusters.csv
│       │   │   │   ├── gene_expression_kmeans_2_clusters
│       │   │   │   │   └── clusters.csv
│       │   │   │   ├── gene_expression_kmeans_3_clusters
│       │   │   │   │   └── clusters.csv
│       │   │   │   ├── gene_expression_kmeans_4_clusters
│       │   │   │   │   └── clusters.csv
│       │   │   │   ├── gene_expression_kmeans_5_clusters
│       │   │   │   │   └── clusters.csv
│       │   │   │   ├── gene_expression_kmeans_6_clusters
│       │   │   │   │   └── clusters.csv
│       │   │   │   ├── gene_expression_kmeans_7_clusters
│       │   │   │   │   └── clusters.csv
│       │   │   │   ├── gene_expression_kmeans_8_clusters
│       │   │   │   │   └── clusters.csv
│       │   │   │   └── gene_expression_kmeans_9_clusters
│       │   │   │       └── clusters.csv
│       │   │   ├── diffexp
│       │   │   │   ├── gene_expression_graphclust
│       │   │   │   │   └── differential_expression.csv
│       │   │   │   ├── gene_expression_kmeans_10_clusters
│       │   │   │   │   └── differential_expression.csv
│       │   │   │   ├── gene_expression_kmeans_2_clusters
│       │   │   │   │   └── differential_expression.csv
│       │   │   │   ├── gene_expression_kmeans_3_clusters
│       │   │   │   │   └── differential_expression.csv
│       │   │   │   ├── gene_expression_kmeans_4_clusters
│       │   │   │   │   └── differential_expression.csv
│       │   │   │   ├── gene_expression_kmeans_5_clusters
│       │   │   │   │   └── differential_expression.csv
│       │   │   │   ├── gene_expression_kmeans_6_clusters
│       │   │   │   │   └── differential_expression.csv
│       │   │   │   ├── gene_expression_kmeans_7_clusters
│       │   │   │   │   └── differential_expression.csv
│       │   │   │   ├── gene_expression_kmeans_8_clusters
│       │   │   │   │   └── differential_expression.csv
│       │   │   │   └── gene_expression_kmeans_9_clusters
│       │   │   │       └── differential_expression.csv
│       │   │   ├── pca
│       │   │   │   └── gene_expression_10_components
│       │   │   │       ├── components.csv
│       │   │   │       ├── dispersion.csv
│       │   │   │       ├── features_selected.csv
│       │   │   │       ├── projection.csv
│       │   │   │       └── variance.csv
│       │   │   ├── tsne
│       │   │   │   └── gene_expression_2_components
│       │   │   │       └── projection.csv
│       │   │   └── umap
│       │   │       └── gene_expression_2_components
│       │   │           └── projection.csv
│       │   ├── sample_alignments.bam
│       │   ├── sample_alignments.bam.bai
│       │   ├── sample_cloupe.cloupe
│       │   ├── sample_filtered_barcodes.csv
│       │   ├── sample_filtered_feature_bc_matrix
│       │   │   ├── barcodes.tsv.gz
│       │   │   ├── features.tsv.gz
│       │   │   └── matrix.mtx.gz
│       │   ├── sample_filtered_feature_bc_matrix.h5
│       │   └── sample_molecule_info.h5
│       ├── metrics_summary.csv
│       ├── vdj_b
│       │   ├── airr_rearrangement.tsv
│       │   ├── cell_barcodes.json
│       │   ├── clonotypes.csv
│       │   ├── concat_ref.bam
│       │   ├── concat_ref.bam.bai
│       │   ├── concat_ref.fasta
│       │   ├── concat_ref.fasta.fai
│       │   ├── consensus_annotations.csv
│       │   ├── consensus.bam
│       │   ├── consensus.bam.bai
│       │   ├── consensus.fasta
│       │   ├── consensus.fasta.fai
│       │   ├── filtered_contig_annotations.csv
│       │   ├── filtered_contig.fasta
│       │   ├── filtered_contig.fastq
│       │   ├── vdj_contig_info.pb
│       │   └── vloupe.vloupe
│       ├── vdj_t
│       │   ├── airr_rearrangement.tsv
│       │   ├── cell_barcodes.json
│       │   ├── clonotypes.csv
│       │   ├── concat_ref.bam
│       │   ├── concat_ref.bam.bai
│       │   ├── concat_ref.fasta
│       │   ├── concat_ref.fasta.fai
│       │   ├── consensus_annotations.csv
│       │   ├── consensus.bam
│       │   ├── consensus.bam.bai
│       │   ├── consensus.fasta
│       │   ├── consensus.fasta.fai
│       │   ├── filtered_contig_annotations.csv
│       │   ├── filtered_contig.fasta
│       │   ├── filtered_contig.fastq
│       │   ├── vdj_contig_info.pb
│       │   └── vloupe.vloupe
│       └── web_summary.html
└── vdj_reference
    ├── fasta
    │   ├── donor_regions.fa
    │   └── regions.fa
    └── reference.json


上一篇下一篇

猜你喜欢

热点阅读