Could you please direct me to an example which uses addreplacerg across an entire bamfile (i.e. I would need to add a read group tag for each read based on the original run/bamfile that it came from, it's not clear to me from the addreplacerg documentation how to do this).
Additionally, I found another discussion thread on this topic that suggested the use of the samtools flag function - is this a sound approach?
samtools view -f 0x2 -b in.bam > out.bam