EOF marker is absent in merged bam file
2
2
Entering edit mode
9.3 years ago

Hi all,

I have sequenced (WES, single end protocol) and aligned (BWA aln) the same DNA sample twice obtaining 2 BAM files. I decided to merge these 2 BAMs into a single one. I used MergeSamFiles (BAM as inputs) from Picard. Thus, when I inspected the merged bam file using samtools view -H merged.BAM it returns the message:

[bam_header_read] EOF marker is absent. The input is probably truncated.

Because no messages appear when I inspect the two source BAMs to be merged, I suppose that problem is some how related to MergeSamFiles step.

Is it necessary to set specific parameters in MergeSamFiles to specify that BAM files contain single end reads?

I checked similar problems but I didn't find solution that match my case. Could you provide me some suggestions to solve the problem? Thank you.

genome sequence-alignment next-gen-sequencing • 8.9k views
ADD COMMENT
1
Entering edit mode
9.3 years ago

I figured out that the the merged BAM file was truncated because of errors at SAM validation steps reporting that MAPQ should be 0 for specific unmapped reads. I decided to ignore this error setting Picard parameter VALIDATION_STRINGENCY=LENIENT. Picard highlights the error but it continues the workflow and the merged BAM file is generated.

ADD COMMENT
0
Entering edit mode
9.3 years ago

Nothing special needs to be done for single end reads. If you don't get any sensible output with samtools view -H on the original BAM files then the problem is with them. If you do get sensible output then you're probably running out of space somewhere (e.g., you don't have coordinate sorted BAM files and picard's tmp files for sorting are filling up /tmp).

ADD COMMENT
0
Entering edit mode

Hi Devon, thank you for the help.

The 2 input BAMs are coordinate sorted (as indicated in SO field of both headers SO:coordinate). Indeed Picard states that:

INFO    Input files are in same order as output so sorting to temp directory is not needed.

I run the command MergeSamFiles with 12GB of the JVM. Now I'll re-run with 2GB as recommended to check if something will change.

ADD REPLY

Login before adding your answer.

Traffic: 2592 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