FORUMCategory: BioinformaticsMissing ReadGroup in bam
zhibin Staff asked 4 years ago

When I ran GATK HaplotypeCaller, GATK complained that my bam file was missing read group (RG) tag. How do I fix my bam file?

1 Answers
Best Answer
Eloi Mercier answered 4 years ago

You can use the AddOrReplaceReadGroups function from GATK to add the RG tags (

java -jar picard.jar AddOrReplaceReadGroups \
 I=input.bam \
 O=output.bam \
 RGID=4 \
 RGLB=lib1 \
 RGPL=illumina \
 RGPU=unit1 \

If you do not know what to put in the read group, you need to contact the person who performed the sequencing and ask them to give you this information.

zhibin Staff replied 4 years ago

Thanks, problem solved!