This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Pileup file and order of the individuals

Hello,

I created a pileup file from a list containing names of several bam files:

samtools mpileup -B -f ref.fa -b bam_list.txt > ouput.mpileup

The bam_list.txt looks like that:

  • Ind1.bam
  • Ind2.bam
  • Ind3.bam

Since the pileup format does not contain the individul IDs, it is difficult to know which columns correspond to what individual.

Does samtools give information following exactly the given list? E.g. columns 4 to 6 would correspond to Ind1.bam, 7 to 9, Ind2.bam ...etc (see example of pileup format: https://en.wikipedia.org/wiki/Pileup_format)

It's hard to tell and I need to make sure of what the order is.

Thanks!

samtools mpileup order

1 answer

After multiple testing, I can confirm that columns in the pileup file are placed in the same order as in the list of bam files provided for the analysis. In other words, columns 4 to 6 would correspond to Ind1.bam, 7 to 9 to Ind2.bam...etc

Log in to answer this question.