Python: Adding Read Group (@RG) tags to BAM or SAM files

The SAM specification now requires @RG tags to be included in all SAM/BAM alignments. If you are using GATK you have probably noticed that it will not run without them. Since @RG tags weren’t standard until recently, I’ve written a script to add them  in post hoc. You’ll need to install pysam and python2.7 to get it to work.

One thought on “Python: Adding Read Group (@RG) tags to BAM or SAM files

Leave a Reply

Your email address will not be published. Required fields are marked *