Hi all, when using Picard 1.113 to verify my BAM files, I end up getting the error "bin field of BAM record does not equal value computed based on alignment start and end, and length of sequence to which read is aligned":
java -jar ValidateSamFile.jar I= 70130.satrFamilyX.GQI35_unique.bam net.sf.picard.sam.ValidateSamFile INPUT=70130.satrFamilyX.GQI35_unique.bam MODE=VERBOSE MAX_OUTPUT=100 IGNORE_WARNINGS=false VALIDATE_INDEX=true IS_BISULFITE_SEQUENCED=false MAX_OPEN_TEMP_FILES=8000 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false Executing on Linux 2.6.32-431.5.1.el6.x86_64 amd64; OpenJDK 64-Bit Server VM 1.7.0_51-mockbuild_2014_01_10_10_19-b00; Picard version: 1.113(1962) IntelDeflater ERROR: Record 1564981, Read name HWI-ST1206:32:C3VGTACXX:5:2305:12309:67018, bin field of BAM record does not equal value computed based on alignment start and end, and length of sequence to which read is aligned ERROR: Record 1564982, Read name HWI-ST1206:32:C3VGTACXX:5:2305:13183:74032, bin field of BAM record does not equal value computed based on alignment start and end, and length of sequence to which read is aligned ERROR: Record 1564983, Read name HWI-ST1206:32:C3VGTACXX:5:2306:8170:17042, bin field of BAM record does not equal value computed based on alignment start and end, and length of sequence to which read is aligned Specifically Picard finds 84554 reads with the same problem. These reads occur almost in a consecutive genomic region (chrUn - which is composed of sequences for which no chromosome anchoring information exist) close to the end of the file. Following the suggestions on a similar issue here in the forum (http://sourceforge.net/p/samtools/mailman/message/31853465/), I first tried to convert the SAM file into BAM using SamFormatConverter, which yielded the following error: java -jar SamFormatConverter.jar INPUT=out.sam OUTPUT=out.bam net.sf.picard.sam.SamFormatConverter INPUT=out.sam OUTPUT=out.bam VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false Executing on Linux 2.6.32-431.5.1.el6.x86_64 amd64; OpenJDK 64-Bit Server VM 1.7.0_51-mockbuild_2014_01_10_10_19-b00; Picard version: 1.113(1962) IntelDeflater INFO 2014-07-21 13:14:44 SamFormatConverter Processed 1,000,000 records. Elapsed time: 00:00:24s. Time for last 1,000,000: 24s. Last read position: chrUn:175,188,973 net.sf.picard.sam.SamFormatConverter done. Elapsed time: 0.61 minutes. Runtime.totalMemory()=3500146688 To get help, see http://picard.sourceforge.net/index.shtml#GettingHelp Exception in thread "main" java.lang.IllegalArgumentException: Value (65544) to large to be written as ushort. at net.sf.samtools.util.BinaryCodec.writeUShort(BinaryCodec.java:324) at net.sf.samtools.BAMRecordCodec.encode(BAMRecordCodec.java:128) at net.sf.samtools.BAMFileWriter.writeAlignment(BAMFileWriter.java:133) at net.sf.samtools.SAMFileWriterImpl.addAlignment(SAMFileWriterImpl.java:177) at net.sf.picard.sam.SamFormatConverter.doWork(SamFormatConverter.java:73) at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:179) at net.sf.picard.cmdline.CommandLineProgram.instanceMainWithExit(CommandLineProgram.java:120) at net.sf.picard.sam.SamFormatConverter.main(SamFormatConverter.java:57) Although I have to say, that I used a SAM file generated by samtools from the original BAM file. Using SamFormatConverter did not work here either. The second suggestion was to use FixBamFile, which similarly crashed: java -classpath sam-1.113.jar net.sf.samtools.FixBAMFile 70130.satrFamilyX.GQI35_unique.bam fixed.bam Exception in thread "main" java.lang.IllegalArgumentException: Value (65544) to large to be written as ushort. at net.sf.samtools.util.BinaryCodec.writeUShort(BinaryCodec.java:324) at net.sf.samtools.BAMRecordCodec.encode(BAMRecordCodec.java:128) at net.sf.samtools.BAMFileWriter.writeAlignment(BAMFileWriter.java:133) at net.sf.samtools.SAMFileWriterImpl.addAlignment(SAMFileWriterImpl.java:177) at net.sf.samtools.FixBAMFile.main(FixBAMFile.java:41) Thus I was wondering 1) what the actual problem might be and 2) how to fix it? Thanks a lot! ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ Samtools-help mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/samtools-help
