2. Single Cell Downstream Processing

2. Single Cell Downstream Processing#

The cleaned s-reads obtained from the preliminary analysis can then be aligned to reference genome using minimap2 (publication link here). As good practice the aligned reads should be QCed before proceeding further. The recommended tool to perform QC on long reads is Long LongRNAseqQC detailed in the Kinnex Full Length workflow.

  • minimap2 for aligning reads

  • LongRNAqcPlus

  • ITV Integrative Transcriptomics View for inspecting read support (link notebook here)

isoseq master code: https://github.com/PacificBiosciences/IsoSeq/tree/master

../_images/sc_pb_data.png

Test Data#

For the downstream processing of Kinnex single cell product, we are using the PacBio dataset Revio-Kinnex-PBMC-10x3p subsampled to get ~3M reads.

More information on the dataset and other example datasets provided by PacBio for Single Cell can be found here Kinnex-singe-cell-RNA

Here is the ATCC guide on PBMCs

2.1. minimap2#

The minimap2 workflow, as detailed below, maps long reads or their assemblies to a reference genome. The details and parameters can be found in the minimap2 manual

Workflow configuration for runnning the minimap2 workflow over cloud platforms supporting Cromwell like Terra can be found here:- The workflow is designed to be run on a sample. Technical replicates must be merged before.

Dockstore : Minimap2_LR.wdl
Github: minimap2_LR
Test Data can be found here (public, requester-pays) : add file path
Table 8 minimap2#

Option name

example value

description

inputReads

this.ubam

Replace “ubam” with the column that contains the path to the input file in the sample table. Formats supported are ubam and fastq(.gz)

referenceGenome

“gs://mdl-refs/GRCh38/GRCh38_no_alt.fa”

Reference FASTA file for the assembly.

juncBED

“gs://mdl-refs/GRCh38/GRCh38.gencode.v39.annotation.sorted.bed”

(Optional) Reference BED splice junctions file for the assembly

sampleName

this.sample_id

Replace “sample_id” with the column that contains the name of the samples in the sample table.

readType

“PacBioIsoSeq”

Type of reads provided, one of “PacBioCLR” “ONTGenomic” “PacBioHiFi” SplicedLongReads” “ONTDirectRNA” “PacBioIsoSeq”

customArguments

“-G 1250k”

(Optional) String to be added to the minimap2 call, in the example, to allow introns up to 1M250bp long which is a bit more than the longest human intron size in gencode

keepUnmapped

FALSE

(true/false) Whether to keep the reads for which no alignment was found or not.

allowSecondary

FALSE

(true/false) Whether to include secondary alignments.

Example of input arguments for minimap2 workflow for alignment with human ref genome

 1 {
 2  "Minimap2_LR.Minimap2Task.cpu" : "${8}",
 3  "Minimap2_LR.Minimap2Task.diskSizeGB" : "${500}",
 4  "Minimap2_LR.inputReads" : "${this.ubam}",
 5  "Minimap2_LR.referenceGenome" : "gs://mdl-refs/GRCh38/GRCh38_no_alt.fa",
 6  "Minimap2_LR.juncBED" : "gs://mdl-refs/GRCh38/GRCh38.gencode.v39.annotation.sorted.bed",
 7  "Minimap2_LR.sampleName" : "${this.sample_id}",
 8  "Minimap2_LR.readType" : "PacBioIsoSeq",
 9  "Minimap2_LR.customArguments" : "-G 1250k",
10  "Minimap2_LR.tagsToExtract" : "CB,XM",
11  "Minimap2_LR.keepUnmapped" : "true",
12  "Minimap2_LR.allowSecondary" : "false",
13  "Minimap2_LR.preemptible_tries" : "${3}"
14}

Please note, for the downstream processing with the single cell vignette, it is important that minimap2 is run with config as above including tagsToExtract “CB,XM”. This will retain the cell barcode (CB) and UMI (XM) in the minimap2 aligned bam which are later leveraged by the single cell analysis vignette