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
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.