Question: Error Bam File Is Malformed: Premature End Of File Using Gatk Tool Baserecalibrator
gravatar for asphodel6
6.9 years ago by
asphodel620 wrote:

Dear all, i am trying to use BaseRecalibrator tool fron GATK and become this error: ERROR MESSAGE: SAM/BAM file *.bam is malformed: Premature end of file Is this really the problem of my bam or some issues of Java memory usage? How can i check it further?

gatk java • 6.4k views
ADD COMMENTlink modified 6.9 years ago by Pierre Lindenbaum131k • written 6.9 years ago by asphodel620
gravatar for Pierre Lindenbaum
6.9 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum131k wrote:

try to run samtools view -c your.bam just to check that your file is OK.

ADD COMMENTlink written 6.9 years ago by Pierre Lindenbaum131k

Thank you for the hint. I have done this, but became [bam_header_read] EOF marker is absent. The input is probably truncated. I have downloaded my.bam from the galaxy server. So my next question is whether i can manipulate my.bam to get rid of this error.

ADD REPLYlink written 6.9 years ago by asphodel620

You probably can't. The most likely explanation is that the download went wrong somehow. You can give a look to this post for clarifications: error: EOF marker is absent when processing a BAM file

ADD REPLYlink written 6.9 years ago by Fabio Marroni2.6k

Thanks for the tips! Came across an identical issue and used samtools quickcheck your.bam to identify malformed files

ADD REPLYlink written 5 weeks ago by fredjaya10
Please log in to add an answer.


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