Question: Getting "Mismatch between read length and quals length" error in SortSam.
0
gravatar for claudiadast
10 months ago by
claudiadast0 wrote:

I am running Picard's SortSam (with VALIDATION_STRINGENCY = LENIENT) and I'm getting the following error. The SAM file was generated using BWA mem. I'm not familiar with this issue and haven't found much information on it. How can I resolve this?

Here is the stack trace:

Exception in thread "main" java.lang.RuntimeException: Mismatch between read length and quals length writing read E00170:444:HG3MJALXX:2:1210:10216:16059; read length: 151; quals length: 32 
      at htsjdk.samtools.BAMRecordCodec.encode(BAMRecordCodec.java:170) 
      at htsjdk.samtools.BAMRecordCodec.encode(BAMRecordCodec.java:40) 
      at htsjdk.samtools.util.SortingCollection.spillToDisk(SortingCollection.java:255) 
      at htsjdk.samtools.util.SortingCollection.doneAdding(SortingCollection.java:220) 
      at htsjdk.samtools.util.SortingCollection.iterator(SortingCollection.java:291) 
      at htsjdk.samtools.SAMFileWriterImpl.close(SAMFileWriterImpl.java:223) at picard.sam.SortSam.doWork(SortSam.java:167) 
      at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:282)
      at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:103) 
      at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:113)
sortsam picard genome • 334 views
ADD COMMENTlink modified 10 months ago • written 10 months ago by claudiadast0

show us the output of

grep -F  'E00170:444:HG3MJALXX:2:1210:10216:16059' in.sam
ADD REPLYlink written 10 months ago by Pierre Lindenbaum121k

The output is:

E00170:444:HG3MJALXX:2:1210:10216:16059 99      chr2    91792176        42      151M    =       91792243     218      AGCCCTTCTCAATAGCCATTTTGAAATATATCAAGGAAATATATTTAGGGGTAAAATATATTAGTTTCCCTCATACAGCTATAAAACATACAGGAATAATTTTTGTCAATGTCTACTACAAATCCAATATAGCAGTAATTATAAAACTCAC       ?<<==>><=<==<=====<====<==<=<=<<
ADD REPLYlink written 10 months ago by claudiadast0
1

you sam file is truncated. That's not a problem with picard but with your upstream process.

ADD REPLYlink written 10 months ago by Pierre Lindenbaum121k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1301 users visited in the last hour