To use VALIDATION_STRINGENCY=LENIENT is the right thing to do. However, if you don't, it is a big deal if you don't since the output that Picard produced will be truncated.
Hi everyone, I run my trasncriptome Data against 16a and 23s using BWA. I recovered the unaligned samples, but when convert them back to fastq (using Picard) I get the following error message:
Exception in thread "main" net.sf.samtools.SAMFormatException: Error parsing text SAM file. MAPQ should be 0 for unmapped read.; Line 31992
Is that really important? I believe I might be losing part of the data that could also be analysed.
The whole message is bellow: $ picard-tools SamToFastq I=/S4/S_4_unaligned.sam F=/S4/S_4_unaligned.fastq [Thu Mar 28 07:26:02 PDT 2013] net.sf.picard.sam.SamToFastq INPUT=/S4/S_4_unaligned.sam FASTQ=/S4/S_4_unaligned.fastq OUTPUT_PER_RG=false RE_REVERSE=true INCLUDE_NON_PF_READS=false READ1_TRIM=0 READ2_TRIM=0 TMP_DIR=/tmp/joas VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false [Thu Mar 28 07:26:03 PDT 2013] net.sf.picard.sam.SamToFastq done. Elapsed time: 0.02 minutes. Runtime.totalMemory()=123928576
Exception in thread "main" net.sf.samtools.SAMFormatException: Error parsing text SAM file. MAPQ should be 0 for unmapped read.; Line 31992 Line: H-161:169:c10paacxx:2:1102:16019:35189 20 gi|448814763:1471846-1473382 4674 37 50M * 0 0 TTAGAAAGGAGGTGATCCAGCCGCACCTTCCGGTACGGCTACCTTGTTAC ##C=IHEG@@C=B8=8IIIFJIGG?JJJIJIJJIIJJHHHHHFFFFFCCC XT:A:U NM:i:1 X0:i:1 X1:i:0 XM:i:1 XO:i:0 XG:i:0 MD:Z:0C1 at net.sf.samtools.SAMTextReader.reportErrorParsingLine(SAMTextReader.java:224) at net.sf.samtools.SAMTextReader.access$500(SAMTextReader.java:40) at net.sf.samtools.SAMTextReader$RecordIterator.parseLine(SAMTextReader.java:428) at net.sf.samtools.SAMTextReader$RecordIterator.next(SAMTextReader.java:272) at net.sf.samtools.SAMTextReader$RecordIterator.next(SAMTextReader.java:244) at net.sf.samtools.SAMFileReader$AssertableIterator.next(SAMFileReader.java:629) at net.sf.samtools.SAMFileReader$AssertableIterator.next(SAMFileReader.java:607) at net.sf.picard.sam.SamToFastq.doWork(SamToFastq.java:121) at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:158) at net.sf.picard.sam.SamToFastq.main(SamToFastq.java:112)
Thanks
2 answers
I dont think you would be loosing much data. Read the explanation for that error here:http://sourceforge.net/apps/mediawiki/picard/index.php?title=Main_Page#Q:_Why_am_I_getting_errors_from_Picard_like_.22MAPQ_should_be_0_for_unmapped_read.22_or_.22CIGAR_should_have_zero_elements_for_unmapped_read.3F.22
Yes, that's a top hit on Google for the error message. It's an annoying issue and it comes up a lot. See also this thread here, Question: Final solution for "MAPQ should be 0 for unmapped read.
Log in to answer this question.