This is a test version of Biostars. For the public version, visit https://www.biostars.org.
correct header with samtools mpileup

Hello, Samtools Mpileup does not generate correct headers Have error, when piling several files in the folder with samtools mpileup -A -E -f $reference $INPATH/*.bam > piled. When trying to run downstream applications (and view header with samtools view), I get error like "fail to read the header of file.bam" Headers in my sam and bam files are correct

Anyone else has this problem? thank you :)

assembly

Do you try to see the output mpileup with samtools?

they are ASCII text, with very long lines and no header

NC_045512.2     12      A       9       ^].^].^].^].^].^].^].^].^].     EEEEEEEEE
NC_045512.2     13      T       10      .........^].    DFFBFGFFF>
NC_045512.2     14      A       10      ..........      FFFFG>GFGD
NC_045512.2     15      C       10      ..........      8BFEFDEFFF

Yes of course, that is the mpileup format. What actually were you expecting?

So I should not expect any header? OK, will try to check out, why my downstream tool is asking for it

Thanks!

Pileup files have no header. Bam files absolutely do have headers. You don't run samtools view on a pileup file.

the output of samtools pileup is NOT a SAM/BAM format.

0 answers

No answers yet.

Log in to answer this question.