This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Adding read groups to mark duplicated bam file

hi

I have a mark duplicated bam file and I want to use it to variant calling using GATK. GATK needs read groups and I want to add read groups to mark duplicated bam file. Now my question is: Can I add read groups via Picard to the mentioned file or should I do it immediately after mapping reads to reference?

picard gatk

1 answer

You have several options depending on what is most convenient to you: during alignment (you can provide read group information to BWA mem), or at any point afterward (before GATK processing) as a separate step with Picard AddOrReplaceReadGroups. The GATK development team recommends doing it as early as possible for data management reasons, but there is no penalty in terms of quality if you do it after marking duplicates, as long as you are doing alignment and duplicate marking separately per read group (assuming you have multiple read groups per sample -- if not, then you can ignore this point).

Log in to answer this question.