erroneous bam file from indel realigner

Hi Team,

I get an error with gatk in variant calling steps, using BAM file from realignment step.
The error indicated something wrong with the bai file.
So I tried to create it new. But then this comes up, saying there is something wrong with the bam (see below)
This bam was created with IndelRealigner (no errors)

Thanks!
Alexander

$ picard 1 BuildBamIndex INPUT=B57.3.bam
[Sun Mar 15 22:37:46 CET 2015] picard.sam.BuildBamIndex INPUT=B57.3.bam    VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false
[Sun Mar 15 22:37:46 CET 2015] Executing as [email protected] on Linux 2.6.32-431.29.2.el6.x86_64 amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_31-b13; Picard version: 1.129(b508b2885562a4e932d3a3a60b8ea283b7ec78e2_1424706677) IntelDeflater
[Sun Mar 15 22:41:19 CET 2015] picard.sam.BuildBamIndex done. Elapsed time: 3,55 minutes.
Runtime.totalMemory()=855638016
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
Exception in thread "main" htsjdk.samtools.FileTruncatedException: Premature end of file
    at htsjdk.samtools.util.BlockCompressedInputStream.readBlock(BlockCompressedInputStream.java:382)
    at htsjdk.samtools.util.BlockCompressedInputStream.available(BlockCompressedInputStream.java:127)
    at htsjdk.samtools.util.BlockCompressedInputStream.read(BlockCompressedInputStream.java:252)
    at java.io.DataInputStream.read(DataInputStream.java:149)
    at htsjdk.samtools.util.BinaryCodec.readBytesOrFewer(BinaryCodec.java:404)
    at htsjdk.samtools.util.BinaryCodec.readBytes(BinaryCodec.java:380)
    at htsjdk.samtools.util.BinaryCodec.readBytes(BinaryCodec.java:366)
    at htsjdk.samtools.BAMRecordCodec.decode(BAMRecordCodec.java:199)
    at htsjdk.samtools.BAMFileReader$BAMFileIterator.getNextRecord(BAMFileReader.java:660)
    at htsjdk.samtools.BAMFileReader$BAMFileIterator.advance(BAMFileReader.java:634)
    at htsjdk.samtools.BAMFileReader$BAMFileIterator.next(BAMFileReader.java:628)
    at htsjdk.samtools.BAMFileReader$BAMFileIterator.next(BAMFileReader.java:598)
    at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:527)
    at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:501)
    at htsjdk.samtools.BAMIndexer.createIndex(BAMIndexer.java:287)
    at htsjdk.samtools.BAMIndexer.createIndex(BAMIndexer.java:271)
    at picard.sam.BuildBamIndex.doWork(BuildBamIndex.java:138)
    at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:187)
    at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:95)
    at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:105)

Comments

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Hi Alexander,

    This error does indeed mean your file is damaged. Either the job that produced it failed before it was complete (which, depending on how you ran it -- through a script or other indirect method --, may not have produced an obvious error message) or it was copied with errors (or incompletely) from a different place on the filesystem. Unfortunately the only solution is to generate it again using the original command.

Sign In or Register to comment.