Cannot get AddOrReplaceReadGroups to run
GATK version 4.0.12
Trying to merge several bams and run `HaplotypeCaller`, but that gives a `java.lang.IllegalArgumentException: samples cannot be empty` error. Ran `ValidateSamFile` and got the `ERROR:MISSING_READ_GROUP`. So trying to fix that with `AddOrReplaceReadGroups`, but I cannot find any possible combination of syntax to get it to run. Example:
```gatk --java-options "-Xmx360G" AddOrReplaceReadGroups \
-I $merge_bam \
-O $merge_bam2 \
-LB bar \
-PL illumina \
-PU foo \
-SM merged \
-CREATE_INDEX True
```
Returns `Invalid argument 'bar'.`
Full commands:
```
# merge bams
gatk --java-options "-Xmx360G" MergeSamFiles \
--USE_THREADING true \
--arguments_file $bams_to_merge\
-O $merge_bam
# samtools merge -f -@ $threads -b $bams_to_merge $merge_bam
gatk --java-options "-Xmx360G" AddOrReplaceReadGroups \
-I $merge_bam \
-O $merge_bam2 \
-LB bar \
-PL illumina \
-PU foo \
-SM merged \
-CREATE_INDEX True
#############call variants##############
# merge calls
samtools index -@ $threads $merge_bam
gatk --java-options "-Xmx360G" HaplotypeCaller \
-R $genome_ref \
-D $dbSNP \
--genotyping-mode DISCOVERY \
-stand-call-conf 30 \
-I $merge_bam \
-O $merge_vcf
```
-
I updated to gatk4.1.4.1 and the command ran without issue.
-
Thank you for the update Robert Butler
Please sign in to leave a comment.
2 comments