Fix bug introduced recently in the VariantAnnotator where only the last -comp was being annotated at a site.
Trivial fix, added integration test to cover it.
This commit is contained in:
parent
6d69c7dc71
commit
5f5c90e65c
|
|
@ -172,6 +172,14 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
|
||||||
executeTest("getting DB tag with HM3", spec);
|
executeTest("getting DB tag with HM3", spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDBTagWithTwoComps() {
|
||||||
|
WalkerTestSpec spec = new WalkerTestSpec(
|
||||||
|
baseTestString() + " --comp:H3 " + privateTestDir + "fakeHM3.vcf --comp:foo " + privateTestDir + "fakeHM3.vcf -G Standard --variant " + privateTestDir + "vcfexample3empty.vcf -L " + privateTestDir + "vcfexample3empty.vcf", 1,
|
||||||
|
Arrays.asList("6afbf05090ae139f53467cf6e0e71cf4"));
|
||||||
|
executeTest("getting DB tag with 2 comps", spec);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testNoQuals() {
|
public void testNoQuals() {
|
||||||
WalkerTestSpec spec = new WalkerTestSpec(
|
WalkerTestSpec spec = new WalkerTestSpec(
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ public final class VariantOverlapAnnotator {
|
||||||
VariantContext annotated = vcToAnnotate;
|
VariantContext annotated = vcToAnnotate;
|
||||||
final GenomeLoc loc = getLoc(vcToAnnotate);
|
final GenomeLoc loc = getLoc(vcToAnnotate);
|
||||||
for ( final Map.Entry<RodBinding<VariantContext>, String> overlapBinding : overlapBindings.entrySet() ) {
|
for ( final Map.Entry<RodBinding<VariantContext>, String> overlapBinding : overlapBindings.entrySet() ) {
|
||||||
annotated = annotateOverlap(tracker.getValues(overlapBinding.getKey(), loc), overlapBinding.getValue(), vcToAnnotate);
|
annotated = annotateOverlap(tracker.getValues(overlapBinding.getKey(), loc), overlapBinding.getValue(), annotated);
|
||||||
}
|
}
|
||||||
|
|
||||||
return annotated;
|
return annotated;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue