Merge pull request #367 from broadinstitute/md_hc_ref_fix

Bugfix for ReferenceConfidenceModel
This commit is contained in:
Eric Banks 2013-08-06 20:37:08 -07:00
commit dd0e6409c6
2 changed files with 16 additions and 3 deletions

View File

@ -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();
}

View File

@ -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);
}
}