Merge pull request #367 from broadinstitute/md_hc_ref_fix
Bugfix for ReferenceConfidenceModel
This commit is contained in:
commit
dd0e6409c6
|
|
@ -791,9 +791,13 @@ public class HaplotypeCaller extends ActiveRegionWalker<List<VariantContext>, In
|
|||
if( DEBUG ) { logger.info("----------------------------------------------------------------------------------"); }
|
||||
|
||||
if ( emitReferenceConfidence() ) {
|
||||
return referenceConfidenceModel.calculateRefConfidence(assemblyResult.getRefHaplotype(),
|
||||
calledHaplotypes.getCalledHaplotypes(), assemblyResult.paddedReferenceLoc, assemblyResult.regionForGenotyping,
|
||||
stratifiedReadMap, calledHaplotypes.getCalls());
|
||||
if ( calledHaplotypes.getCalls().isEmpty() ) {
|
||||
// no called all of the potential haplotypes
|
||||
return referenceModelForNoVariation(originalActiveRegion, false);
|
||||
} else
|
||||
return referenceConfidenceModel.calculateRefConfidence(assemblyResult.getRefHaplotype(),
|
||||
calledHaplotypes.getCalledHaplotypes(), assemblyResult.paddedReferenceLoc, assemblyResult.regionForGenotyping,
|
||||
stratifiedReadMap, calledHaplotypes.getCalls());
|
||||
} else {
|
||||
return calledHaplotypes.getCalls();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,4 +85,13 @@ public class HaplotypeCallerGVCFIntegrationTest extends WalkerTest {
|
|||
final WalkerTestSpec spec = new WalkerTestSpec(commandLine + " -o %s", Arrays.asList(md5));
|
||||
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