Bugfix for ReferenceConfidenceModel
-- In the case where there's some variation to assembly and evaluate but the resulting haplotypes don't result in any called variants, the reference model would exception out with "java.lang.IllegalArgumentException: calledHaplotypes must contain the refHaplotype". Now we detect this case and emit the standard no variation output. -- [delivers #54625060]
This commit is contained in:
parent
6dfd17122f
commit
40bc7d6a9c
|
|
@ -791,9 +791,13 @@ public class HaplotypeCaller extends ActiveRegionWalker<List<VariantContext>, In
|
||||||
if( DEBUG ) { logger.info("----------------------------------------------------------------------------------"); }
|
if( DEBUG ) { logger.info("----------------------------------------------------------------------------------"); }
|
||||||
|
|
||||||
if ( emitReferenceConfidence() ) {
|
if ( emitReferenceConfidence() ) {
|
||||||
return referenceConfidenceModel.calculateRefConfidence(assemblyResult.getRefHaplotype(),
|
if ( calledHaplotypes.getCalls().isEmpty() ) {
|
||||||
calledHaplotypes.getCalledHaplotypes(), assemblyResult.paddedReferenceLoc, assemblyResult.regionForGenotyping,
|
// no called all of the potential haplotypes
|
||||||
stratifiedReadMap, calledHaplotypes.getCalls());
|
return referenceModelForNoVariation(originalActiveRegion, false);
|
||||||
|
} else
|
||||||
|
return referenceConfidenceModel.calculateRefConfidence(assemblyResult.getRefHaplotype(),
|
||||||
|
calledHaplotypes.getCalledHaplotypes(), assemblyResult.paddedReferenceLoc, assemblyResult.regionForGenotyping,
|
||||||
|
stratifiedReadMap, calledHaplotypes.getCalls());
|
||||||
} else {
|
} else {
|
||||||
return calledHaplotypes.getCalls();
|
return calledHaplotypes.getCalls();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,4 +85,13 @@ public class HaplotypeCallerGVCFIntegrationTest extends WalkerTest {
|
||||||
final WalkerTestSpec spec = new WalkerTestSpec(commandLine + " -o %s", Arrays.asList(md5));
|
final WalkerTestSpec spec = new WalkerTestSpec(commandLine + " -o %s", Arrays.asList(md5));
|
||||||
executeTest(name, spec);
|
executeTest(name, spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testERCRegionWithNoCalledHaplotypes() {
|
||||||
|
final String commandLine = String.format("-T HaplotypeCaller -R %s -I %s -L %s -ERC GVCF",
|
||||||
|
b37KGReference, privateTestDir + "noCallRefModel.bam", "20:17000001-18000001");
|
||||||
|
final WalkerTestSpec spec = new WalkerTestSpec(commandLine + " -o %s", Arrays.asList(""));
|
||||||
|
spec.disableShadowBCF();
|
||||||
|
executeTest("testERCRegionWithNoCalledHaplotypes", spec);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue