blahah / transrate

Understand your transcriptome assembly
http://hibberdlab.com/transrate
Other
100 stars 34 forks source link

Transrate's salmon parameters associated with "missing" mapped reads mystery #201

Open eeflynn opened 8 years ago

eeflynn commented 8 years ago

Looking forward to the next update that moves away from SNAP, but until then, here are some issues I've been having over the past two weeks and what eventually led to a "successful" run. Because the gitter chatroom is difficult to search/follow conversations across time, this seems like a better place to put together errors and possible troubleshooting steps.

Transrate input: vertebrate (fish), PE150 and PE300 libraries n seqs: 1184871 (Trinity assembly) & fragments: 378533616 (Error-corrected & trimmed) sub-sampled fragments: 0.1 M, 1 M, 10 M, and ~126 M

Transrate versions: 1.0.1 (SNAP 1.0beta.18) & 1.0.3 (SNAP 1.0dev.96.) Salmon version: 0.6

Problem 1: SNAP –mcp error Fix 1: mailing list solution

Problem 2: Transrate v1.0.3 stops reporting mapping correctly at 10M reads Example 2: v1.0.1

Total Reads    Aligned, MAPQ >= 10    Aligned, MAPQ < 10     Unaligned              Too Short/Too Many Ns  %Pairs       Reads/s   Time in Aligner (s)
20,000,000     9,155,586 (45.78%)     9,933,367 (49.67%)     910,409 (4.55%)        638 (0.00%)            85.35%%      7,664     2,610
Welcome to SNAP version 1.0beta.18.  

fragments                  10000000
fragments mapped            8860418
p fragments mapped             0.89

v1.0.3

Total Reads    Aligned, MAPQ >= 10    Aligned, MAPQ < 10     Unaligned              Too Short/Too Many Ns  Extra Alignments  %Pairs    Reads/s   Time in Aligner (s)
20,000,000     9,155,669 (45.78%)     9,933,283 (49.67%)     910,410 (4.55%)        638 (0.00%)            16,483,737        85.35%    7,670     2,607               
Welcome to SNAP version 1.0dev.96.

fragments                  10000000
fragments mapped            3425172
p fragments mapped             0.34

Error message 2: From salmon.log (one example of many) [2016-08-04 06:20:50.995] [jointLog] [warning] [Sampler.hpp]: Failed to sample an alignment for this read; this shouldn't happen currentMass = -nan, r = 0.855467 ' Fix 2: Use Transrate v1.0.1 (works on 126 M subset)

Problem 3: Transrate v1.0.1 salmon error with full fragment set Error 3: from salmon.log

============`
Exception : [Error in function boost::math::digamma<double>(double): numeric overflow]
============
/home/ubuntu/transrate-1.0.1-linux-x86_64/bin/salmon alignment-quant was invoked improperly.
For usage information, try /home/ubuntu/transrate-1.0.1-linux-x86_64/bin/salmon quant --help-alignments
Exiting.

[ERROR] 2016-08-08 23:05:50 : Salmon failed

Fix 3: Use *.bam and readcount file from SNAP in Transrate v1.0.1, run Salmon v0.6 independently, use renamed Salmon output to finish in Transrate v1.0.3

Problem 4: Salmon error when using default parameters from salmon.rb Success 4: running this command salmon quant -t ~/data/refseq/GyAc.refseq.Trinity.fasta -l IU -a ADD_R1.cor.P.qtrim.fq.gz.ADD_R2.cor.P.qtrim.fq.gz.GyAc.refseq.Trinity.bam -o salmon_quant -p 6 --sampleOut --sampleUnaligned –useErrorModel

fragments 378533616 fragments mapped 325989958 p fragments mapped 0.86

Fail 4: running this command using the settings from salmon.rb salmon quant -t ~/data/refseq/GyAc.refseq.Trinity.fasta -l IU -a ADD_R1.cor.P.qtrim.fq.gz.ADD_R2.cor.P.qtrim.fq.gz.GyAc.refseq.Trinity.bam -o salmon_quant -p 6 --sampleOut --sampleUnaligned --useErrorModel --biasCorrect --noEffectiveLengthCorrection –useFSPD

fragments 378533616 fragments mapped 132707988 p fragments mapped 0.35

Error 4: From salmon.log, same as Problem 2 [2016-08-10 00:10:01.631] [jointLog] [warning] [Sampler.hpp]: Failed to sample an alignment for this read; this shouldn't happen currentMass = -nan, r = 0.515927'

TLDR: One of the parameter settings in salmon.rb (either –biasCorrect, --noEffectiveLengthCorrection, and/or –useFSPD) results in weird fragments mapped results (35 vs. 86%) which may depend on SNAP version used

jpmam1 commented 8 years ago

I've also experienced problems 1,2 and 3 (and implemented the same fixes as above, where applicable), and I'm 'stuck' at the same point:

Error 4: From salmon.log, same as Problem 2 [2016-08-10 00:10:01.631] [jointLog] [warning] [Sampler.hpp]: Failed to sample an alignment for this read; this shouldn't happen currentMass = -nan, r = 0.515927'

Any ideas for addressing the salmon mapping issue would be very much appreciated!

upendrak commented 7 years ago

I'm also getting this error and I did not find any help regarding this problem elsewhere.


[2017-08-04 10:34:25.252] [jointLog] [warning] [Sampler.hpp]: Failed to sample an alignment for this read; this shouldn't happen
currentMass = -nan, r = 0.491951

[2017-08-04 10:34:25.252] [jointLog] [warning] [Sampler.hpp]: Failed to sample an alignment for this read; this shouldn't happen
currentMass = -nan, r = 0.726042

Any help is much appreciated..

abshah commented 4 years ago

Hi @upendrak and @eeflynn, can you test out my fork (https://github.com/abshah/transrate) of Transrate 1.0.3 and let me know if it works fine for you. I seem to have fixed some of the issues with Salmon.

blahah commented 4 years ago

Great stuff @abshah, thanks! It's not immediately clear to me whether the transrate model still holds with the latest Salmon version. But @rob-p is exactly the person who will know. Rob, any chance you can peek at https://github.com/blahah/transrate/compare/master...abshah:master and say yay or nay whether this is a trivial merge?

If so @abshah we can release a patch version with your fix :)