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.

Tagged with →  
Share →

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

  1. Dan says:

    This is very helpful, thanks!

Leave a Reply

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