I am running the HaplotypeCaller as a part of the GATK pipeline on a single BAM file. I keep getting the error:
A USER ERROR has occurred: Argument --emitRefConfidence has a bad value: Can only be used in single sample mode currently.
Use the sample_name argument to run on a single sample out of a multi-sample BAM file.
However, I am fairly confident that there is only one sample in the BAM file. I tried neglecting the -ERC GVCF
as per some suggestions (haplotypecaller can not run in single bam file) but get this message instead:
htsjdk.samtools.util.RuntimeIOException: Unable to close index for file: ...
...
Caused by: java.io.IOException: Terminator block not found after closing BGZF file: ...
However, as some people suggested (https://gatkforums.broadinstitute.org/gatk/discussion/11202/haplotypecaller-error-in-the-middle-of-processing), I increased the memory to over 100G and it didn't solve the problem.
Does anyone have any suggestions?
In the above, you can see that you have multiple sample names (text following "SM:"), thus GATK is treating this as a multi-sample BAM file.
your bam contains more than one sample (
SM:...
)In that case, do you know how to resolve the error regarding
you have to change the header of your bam to change those multiple @SM into one. For example use: https://software.broadinstitute.org/gatk/documentation/tooldocs/4.0.0.0/picard_sam_AddOrReplaceReadGroups.php
if
samtools view your.bam
fails too, it means that your bam is corrupted and you 'll have to re-generateit.Have you solved your problem? I have the same question with you,but I can't solve it using website: https://software.broadinstitute.org/gatk/documentation/tooldocs/4.0.0.0/picard_sam_AddOrReplaceReadGroups.php