## Errors about read group (RG) informationCommon Problems | Created 2012-07-23 | Last updated 2016-01-04

See the Dictionary entry on read groups.

As detailed in the FAQs about input requirements, GATK expects all read groups appearing in the read data to be specified in the file header, and will fail with an error if it does not find that information (whether there is no read group information in the file, or a subset of reads do not have read groups).

Typically you should read group information when you perform the original alignments (with e.g. BWA, which has an option to do so). So what do you do if you forgot to do that, and you don't want to have to rerun BWA all over again?

### Solution

Here's an example:

# throws an error
java -jar GenomeAnalysisTK.jar \
-T HaplotypeCaller \
-R reference.fasta \
-o output.vcf

SORT_ORDER=coordinate \
RGID=foo \
RGLB=bar \
RGPL=illumina \
RGSM=Sample1 \
CREATE_INDEX=True

# runs without error
java -jar GenomeAnalysisTK.jar \
-T HaplotypeCaller \
-R reference.fasta \
-o output.vcf