I need to merge my all transcripts.gtf from cufflinks output follow this command line :

cuffmerge -o merged_gtf_output -p 15 -s ref.fasta -g anot.gtf assembly.txt

But I have this warning :

[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).
File merge_B3//tmp/mergeSam_fileOaNffV doesn't appear to be a valid BAM file, trying SAM...
[21:40:04] Loading reference annotation.
[21:40:05] Inspecting reads and determining fragment length distribution.
Processed 3921 loci.                        
> Map Properties:
>       Normalized Map Mass: 33242.00
>       Raw Map Mass: 33242.00
>       Fragment Length Distribution: Truncated Gaussian (default)
>                     Default Mean: 200
>                  Default Std Dev: 80

Can someone tell me what this warning means and how to fix it?

  • $\begingroup$ it looks very weird to me, since you are not reading a bam file, some how samtools is called and it throws this warning, see also biostars.org/p/189139 $\endgroup$
    – StupidWolf
    Mar 29, 2020 at 11:26
  • $\begingroup$ Yes it's true that it's weird, but I think it alludes to the files from which the gtf were generated by cufflinks $\endgroup$
    – Diango
    Mar 30, 2020 at 12:18

1 Answer 1


There is a post about this on seqanswers. The poster says the following about cuffmerge behavior:

I kept the temporary files while running cuffmerge. It builgs a SAM file from transcripts.gtf files. Then it seems first it reads it as BAM since I read samtools take the files as BAM default. Then it finds it is not a BAM so it tries SAM. Then it can read it and resume the task.

So it sounds like the BAM file is generated from GTF as a kludge inside cuffmerge, not the other way around.

Did you change any of the intermediate files or delete anything? Is there maybe a different cuffmerge run that it might be colliding with?

Did you get any output? it sounds like this error is frequently observed when actually the command completes fine, e.g. https://www.biostars.org/p/189139/. See other posts by googling the problem maybe, e.g. https://www.biostars.org/p/344439/

(I know this isn't a proper answer but it was too involved for a comment.)

  • $\begingroup$ Thank you for your answer, No I did not delete anything and despite the warning the command was executed well. $\endgroup$
    – Diango
    Apr 1, 2020 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.