Skip to content

Process mtDNA from CellRanger ATAC

Caleb Lareau edited this page Aug 10, 2020 · 4 revisions

Downstream analyses of CellRanger data with mgatk

Caleb Lareau

Basic processing with CellRanger-ATAC

Here's a basic call for preprocessing scATAC samples using CellRanger-ATAC--

cellranger-atac count \
  --fastqs fastq --id example --sample $outdir \
  --reference $path_to_cellranger_atac_custom_reference \
  --localcores 12

NOTE: the above code chunk is not custom to mgatk except for the use of the CellRanger-ATAC custom reference, which is discussed more here.

Downstream processing with mgatk

Utilizing the .bam file contained in the outs in CellRanger-ATAC output, we can launch a genotyping call. Here, we know the barcodes a priori from the CellRanger knee-call, and specify those with the -b flag.

mgatk tenx -i ${outdir}/outs/possorted_bam.bam \
  -n CRA_test1 -o CRA_test1_mgatk -c 12 \
  -bt CB -b ${outdir}/outs/filtered_peak_bc_matrix/barcodes.tsv

Here, every cell passing filter from the CellRanger-ATAC process will be listed in the barcodes.tsv file. As shown above, -c 12 indicates that 12 cores will be used for genotyping (set according to your compute capabilities), -bt CB indicates that the CB SAM tag denotes the barcodes per single-cell (default for 10X .bam files), and -i is the filepath to the input .bam file, which should be consistent with how the execution of CellRanger-ATAC was executed above. Finally, the -n and -o options specify the output file name prefixes and output directory, respectively. Choose any informative name for the samples.

10x scRNA-seq

While generally we have not had success finding high quality subclonal variants from droplet-based scRNA-seq, there may be use cases where knowing the mtDNA genotype per single cell can be useful. To achieve this for scRNA, we can utilize UMI-aware PCR deduplication with mgatk using the following workflow:

mgatk tenx -i ${outdir}/outs/possorted_bam.bam \
  -n CRR_test1 -o CRR_test1_mgatk -c 12 -ub UB \
  -bt CB -b ${outdir}/outs/filtered_feature_bc_matrix/barcodes.tsv

Here, most of the options are the same, noting that we now point to a different barcodes file and that we inform which SAM tag to look for error-corrected UMIs (-ub UB).