In addition to the @RG line in the SAM header, every single read belonging to that read group has to declare this in its tags - and that part means adding this requires a lot of IO and will be comparatively slow.
If all you want to do is add some information to an existing read group, you just need to edit the SAM header. Using samtools reheader let's you modify this efficiently in a BAM file.
Last edited by maubp; 10-19-2011 at 01:12 AM.
Reason: Typo
|