I am using samtools mpileup to generate a mpileup file from 64 bam files using a set of chromosomal positions in bed format. The mpileup file does not contain the names of the samples of the input bam files. Is there a way by which you could keep the names of the samples intact in the pileup output? I have multiple samples from normal and heart failure tissue and it would be helpful if I could figure out any snps/indels in heart failure vs control samples. I used the following command:
samtools mpileup -f hg19.fa -l test.bed -b bamfile_list.txt > test.mpileup *test.bed contains the positions for which pileup should be generated. *bamfile_list.txt is my list of bam files, one file per line.
Also, will the tool take each file in order of its occurence in the bamfile_list.txt and create the columns? If yes, I could know which column belongs to which sample in the output by looking at the order at bamfile_list.txt.