Gatk Baserecalibrator Error
0
0
Entering edit mode
10.7 years ago
youngcsong ▴ 100

So here's a problem that's having me rip my hair out for past couple of hours. I am trying to follow through some of the data pre-processing procedures as described by GATK's Best Practices page. So far, I got to the point where I ran IndelRealigner without a problem, and producing an output BAM file that is supposed to be used as input file for BaseRecalibrator. Now, here's where I am having a problem. I am going to copy/paste the error messages here, and hopefully someone could give me some ideas on how to diagnose this issue.

##### ERROR ------------------------------------------------------------------------------------------
##### ERROR A USER ERROR has occurred (version 2.8-1-g932cd3a): 
##### ERROR
##### ERROR This means that one or more arguments or inputs in your command are incorrect.
##### ERROR The error message below tells you what is the problem.
##### ERROR
##### ERROR If the problem is an invalid argument, please check the online documentation guide
##### ERROR (or rerun your command with --help) to view allowable command-line arguments for this tool.
##### ERROR
##### ERROR Visit our website and forum for extensive documentation and answers to 
##### ERROR commonly asked questions http://www.broadinstitute.org/gatk
##### ERROR
##### ERROR Please do NOT post this error to the GATK forum unless you have really tried to fix it yourself.
##### ERROR
##### ERROR MESSAGE: SAM/BAM file /projects/seqdev/ysong_snp_indel/GATK_preproc_recalibrate/H0D21ADXX_1.linked.bam is malformed: Premature EOF.     Expected 352 but only received 306; BinaryCodec in readmode; file: /projects/seqdev/ysong_snp_indel/GATK_preproc_recalibrate/H0D21ADXX_1.linked.bam
##### ERROR ------------------------------------------------------------------------------------------

Funny thing is after I run this command, I get a 0 byte on the input BAM file, so I am forced to re-run IndelRealigner from the scratch (in fact, I have to go back and run this again). Do I have to use samtools view, and convert the BAM to SAM to see the format of the file itself?

Thanks in advance,

Young

gatk • 4.6k views
ADD COMMENT
0
Entering edit mode

That's annoying that the input bam file gets set to 0...I'm pretty sure you are not doing this, but are you setting the output (-o) to the same file as the input in your command? very weird.

When you reran IndelRealigner did you get the same error again?

ADD REPLY
0
Entering edit mode

I am not setting the output as the same file as the input. Basically, I got tired of running around in circle, so I decided to make a copy of the IndelRealigner output as a backup, just in case things go unruly again. Just trying to do some things as described in the previous thread Error BAM file is malformed: Premature end of file using GATK tool BaseRecalibrator.

ADD REPLY
0
Entering edit mode

samtools view -c bam_file didn't produce any error and already tried converting bam to sam and checking the last couple lines...doesn't seem like there anything wrong at all with what the IndelRealigner produces.

ADD REPLY
0
Entering edit mode

okay...so I somehow got this thing to work...I had to go back to IndelRealigner and instead of of using -known, I used --knowAlleles. Not sure how this solves the problem, but things are back to normal again.

ADD REPLY

Login before adding your answer.

Traffic: 1659 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6