Hi Maddy,
It would appear that the BAM in question is missing the end of file (EOF)
block, which indicates that the tool that created it might not have
finished writing to it (perhaps the array job ran out of time, or your disk
is full).
Are you able to try generating that BAM again to see if the problem
persists?
I think the fact you are able to use samtools flagstat on this file could
be a bug in flagstat.
Sam
On Mon, Jan 9, 2017 at 7:05 PM, Madolyn Macdonald <mm...@udel.edu> wrote:
> Hello,
>
> I am trying to calculate the mapping statistics of a BAM file. I am using
> SAMtools 1.3.1 and am able to get statistics on the BAM file using samtools
> flagstat. However, when I try samtools stats, which I would like to use, I
> get the following error:
>
> [W::bam_hdr_read] EOF marker is absent. The input is probably truncated.
> [E::inflate_block] inflate failed: progress temporarily not possible, or
> in() / out() returned an error
> [E::bgzf_read_block] inflate_block error -1
> [E::bgzf_read] bgzf_read_block error -1 after 0 of 4 bytes
> Failure while decoding file
>
> Does anyone have any suggestions what could cause this and how I could fix
> it?
>
> Thank you,
> Maddy MacDonald
>
>
>
> --
> Madolyn Stinner (formerly Madolyn MacDonald)
> UDel Bioinformatics and Systems Biology, PhD student
> Graduate Research Assistant in Kelvin Lee Lab, DBI Room 270
>
> ------------------------------------------------------------
> ------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> _______________________________________________
> Samtools-help mailing list
> Samtools-help@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/samtools-help
>
>
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Samtools-help mailing list
Samtools-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/samtools-help