problem with stranded single-end library with alignment-based method

125 views
Skip to first unread message

Hien To

unread,
Jan 23, 2017, 8:56:08 PM1/23/17
to Sailfish Users Group
Hi,

I'm trying to run salmon with alignment-based method on our bam files (aligned to transcriptome). Our library is  single-end and reversely stranded, so I used option -l SR
However I realised that in the quant.sf file, the counts include the reads from both strands, not only the reads from the correct strand. 
I have tried other library type -l A and -l U but they return the results exactly the same as -l SR
I'm wondering if there's anything wrong in my command lines:

salmon quant -t ${REF} --fldMean 200 --fldSD 20 --numBootstraps 40 -l SR -a ${BAM}.sorted.bam -o ${BAM}_SR

salmon quant -t ${REF} --fldMean 200 --fldSD 20 --numBootstraps 40 -l U -a ${BAM}.sorted.bam -o ${BAM}_U

salmon quant -t ${REF} --fldMean 200 --fldSD 20 --numBootstraps 40 -l A -a ${BAM}.sorted.bam -o ${BAM}_A


Thank you very much.


Hien

Rob

unread,
Jan 23, 2017, 9:15:16 PM1/23/17
to Sailfish Users Group
Hi Hein,

It's likely the reason you're seeing the behavior you are is because of the way that Salmon's library type is handled as part of the underlying probabilistic model. Specifically, under the default parameters, the library type specifies that alignments that are compatible with the library type should be given a much higher a prior probability than those that are incompatible with it. However, if the only alignments for the fragments are incompatible alignments, they will still be used. If you want Salmon to strictly ignore incompatible fragments, you should pass the parameter `--incompatPrior 0` to Salmon. This will cause incompatible alignments to be given a 0 probability, and hence discarded. Please let me know if this provides the behavior you were expecting.

Best,
Rob

Hien To

unread,
Jan 26, 2017, 7:32:00 AM1/26/17
to Sailfish Users Group
Great thank Rob, it works now!

Best,
Hien

Chadd

unread,
Oct 17, 2017, 11:30:55 PM10/17/17
to Sailfish Users Group
Hi Rob,

I have a related question. My data is single-end and the library was prepared using a Illumina Tru-seq stranded protocol. When I run it with the -l SR, I get a message saying "Greater than 5% of the fragments disagreed with the provided library type; check the file: salmon/lib_format_counts.json for details" and around ~50% of the reads map to the opposing strand as if the library is unstranded. I've had this experience with other datasets prepared in the same way. Is there a reason this might be occurring, or is the most likely explanation that the library isn't actually stranded?

Thanks,

Chad

Fabiano Oliveira

unread,
Nov 10, 2017, 12:27:52 PM11/10/17
to Sailfish Users Group
HI Rob and Chadn737

Did you get any response from your post? I have a similar warning  with about 30% of reads on the SR when my library was SF made. The alignment rate is pretty good (85 to 90%) but I am sure what is the cause of the SR reads. 

Best 

"expected_format": "SF",
    "compatible_fragment_ratio": 0.7387255816471056,
    "num_compatible_fragments": 10235874,
    "num_assigned_fragments": 13856125,
    "num_consistent_mappings": 18638557,
    "num_inconsistent_mappings": 10059016,
    "MSF": 0,
    "OSF": 0,
    "ISF": 0,
    "MSR": 0,
    "OSR": 0,
    "ISR": 0,
    "SF": 18638557,
    "SR": 10059016,
    "MU": 0,
    "OU": 0,
    "IU": 0,
    "U": 0
Reply all
Reply to author
Forward
0 new messages