Merge pull request #1370 from broadinstitute/ldg_fixBQresMQ
Add fix and test for finalizing MQ annotation at BP resolution for va…
This commit is contained in:
commit
edd9fcb7e5
|
|
@ -212,8 +212,14 @@ public abstract class RMSAnnotation extends InfoFieldAnnotation implements Reduc
|
||||||
numOfReads += Integer.parseInt(vc.getAttributeAsString(VCFConstants.DEPTH_KEY, "-1"));
|
numOfReads += Integer.parseInt(vc.getAttributeAsString(VCFConstants.DEPTH_KEY, "-1"));
|
||||||
if(vc.hasGenotypes()) {
|
if(vc.hasGenotypes()) {
|
||||||
for(Genotype gt : vc.getGenotypes()) {
|
for(Genotype gt : vc.getGenotypes()) {
|
||||||
if(gt.isHomRef() && gt.hasExtendedAttribute("MIN_DP")) //site-level DP contribution will come from MIN_DP for gVCF-called reference variants
|
if(gt.isHomRef()) {
|
||||||
numOfReads -= Integer.parseInt(gt.getExtendedAttribute("MIN_DP").toString());
|
//site-level DP contribution will come from MIN_DP for gVCF-called reference variants or DP for BP resolution
|
||||||
|
if (gt.hasExtendedAttribute("MIN_DP"))
|
||||||
|
numOfReads -= Integer.parseInt(gt.getExtendedAttribute("MIN_DP").toString());
|
||||||
|
else if (gt.hasDP())
|
||||||
|
numOfReads -= gt.getDP();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return numOfReads;
|
return numOfReads;
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ public class GenotypeGVCFsIntegrationTest extends WalkerTest {
|
||||||
" -V:sample3 " + privateTestDir + "combine.single.sample.pipeline.3.vcf" +
|
" -V:sample3 " + privateTestDir + "combine.single.sample.pipeline.3.vcf" +
|
||||||
" -L 20:10,000,000-11,000,000", b37KGReference),
|
" -L 20:10,000,000-11,000,000", b37KGReference),
|
||||||
1,
|
1,
|
||||||
Arrays.asList("d3fab0d45f0054b71aa1d031876a4bbb"));
|
Arrays.asList("c9edd4ca8c2801c4681322087d82e781"));
|
||||||
executeTest("combineSingleSamplePipelineGVCF", spec);
|
executeTest("combineSingleSamplePipelineGVCF", spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -158,7 +158,7 @@ public class GenotypeGVCFsIntegrationTest extends WalkerTest {
|
||||||
" -V:sample3 " + privateTestDir + "combine.single.sample.pipeline.3.vcf" +
|
" -V:sample3 " + privateTestDir + "combine.single.sample.pipeline.3.vcf" +
|
||||||
" -L 20:10,000,000-20,000,000", b37KGReference),
|
" -L 20:10,000,000-20,000,000", b37KGReference),
|
||||||
1,
|
1,
|
||||||
Arrays.asList("54a86ade63b84c87ff4e537e276987fc"));
|
Arrays.asList("f48114bc6348cdc9dc4f0960f5dcf5f8"));
|
||||||
executeTest("combineSingleSamplePipelineGVCFHierarchical", spec);
|
executeTest("combineSingleSamplePipelineGVCFHierarchical", spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -170,10 +170,21 @@ public class GenotypeGVCFsIntegrationTest extends WalkerTest {
|
||||||
" -V:sample3 " + privateTestDir + "combine.single.sample.pipeline.3.vcf" +
|
" -V:sample3 " + privateTestDir + "combine.single.sample.pipeline.3.vcf" +
|
||||||
" -L 20:10,000,000-11,000,000 --dbsnp " + b37dbSNP132, b37KGReference),
|
" -L 20:10,000,000-11,000,000 --dbsnp " + b37dbSNP132, b37KGReference),
|
||||||
1,
|
1,
|
||||||
Arrays.asList("1a2728e7295a6ffca6c2ba5a01af3593"));
|
Arrays.asList("f88841deb5c2ce4f3bbea1e914a13898"));
|
||||||
executeTest("combineSingleSamplePipelineGVCF_addDbsnp", spec);
|
executeTest("combineSingleSamplePipelineGVCF_addDbsnp", spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test(enabled = true)
|
||||||
|
public void combineBPresGVCFs() {
|
||||||
|
WalkerTestSpec spec = new WalkerTestSpec(
|
||||||
|
baseTestString(" -V " + privateTestDir + "NA12891.BPres.g.vcf" +
|
||||||
|
" -V " + privateTestDir + "NA12892.BPres.g.vcf" +
|
||||||
|
" -L 20:10433000-10436909", b37KGReference),
|
||||||
|
1,
|
||||||
|
Arrays.asList("f342872f485e6978501facc78c354078"));
|
||||||
|
executeTest("combineBPresGVCFs", spec);
|
||||||
|
}
|
||||||
|
|
||||||
@Test(enabled = true)
|
@Test(enabled = true)
|
||||||
public void testJustOneSample() {
|
public void testJustOneSample() {
|
||||||
WalkerTestSpec spec = new WalkerTestSpec(
|
WalkerTestSpec spec = new WalkerTestSpec(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue