I want to merge several groups of BAM files in such a way that when I then create an mpileup from the resulting merged files, reads in each group are treated as if they are coming from the same population. Should I do
samtools merge -r 1.bam 1.1.bam 1.2.bam 1.3.bam
samtools merge -r 2.bam 2.1.bam 2.2.bam 2.3.bam
samtools mpileup -R -o 123.mpileup 1.bam 2.bam etc.
should I simply not use -r in samtools merge or -R in samtools mpileup?
Is there a difference?