Question: [bam_header_read] EOF marker is absent. The input is probably truncated.
gravatar for Mic
3.0 years ago by
Mic70 wrote:
Hello, I did the following steps:

1. Prinseq 
2. Sickle
3. BWA for Illumina and 
4. SAM to BAM
5. MarkDuplicates 

After MakrDuplicates, I got the following error:

[bam_header_read] EOF marker is absent. The input is probably truncated.
[bam_header_read] invalid BAM binary header (this is not a BAM file).
[bam_index_core] Invalid BAM header.[bam_index_build2] fail to index the BAM file.
Fatal error: Exit code 1 ()
Picked up _JAVA_OPTIONS: -Xmx2048m -Xms256m
Ignoring SAM validation error: ERROR: Record 579, Read name NS500334:41:HLLLKBGXX:3:21601:2035:8235, MAPQ should be 0 for unmapped read.
Exception in thread "main" htsjdk.samtools.SAMException: Value was put into PairInfoMap more than once.  370: C_BATCH2:NS500334:41:HLLLKBGXX:1:21102:18509:10014
	at htsjdk.samtools.CoordinateSortedPairInfoMap.ensureSequenceLoaded(
	at htsjdk.samtools.CoordinateSortedPairInfoMap.remove(
	at picard.sam.markduplicates.util.DiskBasedReadEndsForMarkDuplicatesMap.remove(
	at picard.sam.markduplicates.MarkDuplicates.buildSortedReadEndLists(
	at picard.sam.markduplicates.MarkDuplicates.doWork(
	at picard.cmdline.CommandLineProgram.instanceMain(
	at picard.cmdline.PicardCommandLine.instanceMain(
	at picard.cmdline.PicardCommandLine.main(
[bam_header_read] bgzf_check_EOF: Invalid argument

I was able to fix it with samtools view -h Galaxy62-\[SAM-to-BAM_on_data_10_and_data_54__converted_BAM\].bam | grep -v null | samtools view -bS - > Galaxy62.bam

I just wonder whether it is possible to do it anyhow to fix it in Galaxy or is it possible to fix the FASTQ files after PrinSeq and Sickle?

Thank you in advance.








ADD COMMENTlink modified 3.0 years ago by Jennifer Hillman Jackson25k • written 3.0 years ago by Mic70
gravatar for Jennifer Hillman Jackson
3.0 years ago by
United States
Jennifer Hillman Jackson25k wrote:


Are you working in Galaxy? This forum focuses on that usage. If running tools line-command, help from the 3rd party tools (either manual or dedicated help lists) and several other common bioinformatics forums could be a better troubleshooting resource (, http://seqanswers.com

If you loaded to Galaxy mid-analysis, then double checking that upload was successful is a good place to start when a tool runs into a malformed input:

Should a header be removed during a step with Galaxy (would not be expected when performing an operation on a BAM dataset, but can occur with a SAM dataset), it can be replaced with the tool Picard: ReplaceSamHeader replace header in a SAM/BAM dataset.

Thanks, Jen, Galaxy team

ADD COMMENTlink written 3.0 years ago by Jennifer Hillman Jackson25k
Please log in to add an answer.


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