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:
Eric Banks 2013-07-05 00:04:52 -04:00
parent 6d69c7dc71
commit 5f5c90e65c
2 changed files with 9 additions and 1 deletions

View File

@ -172,6 +172,14 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
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
public void testNoQuals() {
WalkerTestSpec spec = new WalkerTestSpec(

View File

@ -136,7 +136,7 @@ public final class VariantOverlapAnnotator {
VariantContext annotated = vcToAnnotate;
final GenomeLoc loc = getLoc(vcToAnnotate);
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;