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( 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