Thanks Rob!
That makes sense. Is there any consensus on what would be better here? Mapping mode or Alignment mode + the ONT flag?
Hello,
I am trying to understand the difference between alignment and mapping mode in salmon. I ran it on my bulk RNASeq samples in both modes, and compared the quant.sf files,
while the effective length seems to be associated with the length column in mapping mode,
Name Length EffectiveLength TPM NumReads
ENST00000456328.2 1657 1407.000 0.000000 0.000
ENST00000450305.2 632 382.000 0.000000 0.000
ENST00000488147.1 1351 1101.000 1.534484 2.426
ENST00000619216.1 68 2.848 0.000000 0.000
ENST00000473358.1 712 462.000 0.000000 0.000
ENST00000469289.1 535 285.000 0.000000 0.000
ENST00000607096.1 138 4.663 0.000000 0.000
ENST00000417324.1 1187 937.000 0.000000 0.000
ENST00000461467.1 590 340.000 0.000000 0.000
it is not the case in alignment mode (it is a list of 100.000).
Name Length EffectiveLength TPM NumReads
ENST00000456328.2 1657 100.000 0.818424 14.291
ENST00000450305.2 632 100.000 0.000000 0.000
ENST00000488147.1 1351 100.000 1.353094 23.627
ENST00000619216.1 68 100.000 0.000000 0.000
ENST00000473358.1 712 100.000 0.000000 0.000
ENST00000469289.1 535 100.000 0.000000 0.000
ENST00000607096.1 138 100.000 0.000000 0.000
ENST00000417324.1 1187 100.000 0.000000 0.000
ENST00000461467.1 590 100.000 0.000000 0.000
These are the commands that I used:
mapping:
salmon quant -i $salmon_index \
--libType A -r $FASTQ/$sample.fastq.gz \
--validateMappings -p ${SLURM_CPUS_PER_TASK} \
--dumpEq --useEM -o $OUTPUT_FOLDER
alignment:
salmon quant -t $REFERENCE_FASTA --libType U -a $BAM_FOLDER/$sample.bam \
-o $OUTPUT_FOLDER --ont --noErrorModel -p 10
Any insights would be appreciated! Thanks!
This is because in alignment mode you have run with the --ont flag. The --ont flag turns off length correction (because ONT protocols don't perform fragmentation upstream of sequencing), and this is why you see an EffectiveLength of 100 for all transcripts. Also, as an aside, the --ont flag implements an error model explicitly designed for long-read alignments, so you shouldn't have to also specify --noErrorModel with this flag.
Thanks Rob!
That makes sense. Is there any consensus on what would be better here? Mapping mode or Alignment mode + the ONT flag?
Log in to answer this question.