Hi Sam and John,
Thank you for the quick replies! The commands were:

samtools stats chr7.bam
samtools flagstat chr7.bam

After doing samtools stats, I ran samtools flagstat and it only produced
the 'EOF marker is absent. The input is probably truncated.' error, but
worked. I will try creating by bam file again to see if that fixes the
problem.
Thanks,
Maddy

On Thu, Jan 12, 2017 at 9:28 AM, John Marshall <j...@sanger.ac.uk> wrote:

> On 9 Jan 2017, at 19:05, Madolyn Macdonald <mm...@udel.edu> wrote:
> > 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
>
> Samtools flagstat and stats use the same code to read BAM files, so it
> would be surprising if one but not the other produced these messages when
> reading the same file.  Please show us the complete command lines you are
> using for both flagstat and stats.  After samtools stats has given those
> errors, does a subsequent samtools flagstat still work or does it produce
> similar messages?
>
>     John
>
> --
>  The Wellcome Trust Sanger Institute is operated by Genome Research
>  Limited, a charity registered in England with number 1021457 and a
>  company registered in England with number 2742969, whose registered
>  office is 215 Euston Road, London, NW1 2BE.
>



-- 
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

Reply via email to