Hi,
I'm struggling to merge many bam files respecting the original read groups with samtools. Some of the input files have the same read group, other files have others. If I don't use "-c" each "duplicate" RGs are assigned a random suffix (which I don't want to, they are the same RG). If I use "-c", RGs are not altered, but then only one RG line is printed in the header.
Does any one have a clue on how to solve this?
Ideally, with "-c" samtools should print any RG header line that is different from the others in the merged bam.
Many thanks Federico
Which version of samtools are you using? I recall that there were modifications to handle this relatively recently.
Thanks for the feedback, Devon. I am using Version: 1.2 (using htslib 1.2.1). I have looked at the latest version (1.3) but don't see anything about this.
I've read in other post that for this kind of situation picard-tools is the right way to go. Wish samtools change this.