Bug fix for Chris: convert comp tracks to VC so that we can respect the filter field. Added an integration test to cover this.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3949 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
84ca2f27bb
commit
227c4b10f0
|
|
@ -188,8 +188,14 @@ public class VariantAnnotatorEngine {
|
|||
if ( dbsnp != null && (!vc.hasAttribute(VariantContext.ID_KEY) || vc.getAttribute(VariantContext.ID_KEY).equals(VCFConstants.EMPTY_ID_FIELD)) )
|
||||
infoAnnotations.put(VariantContext.ID_KEY, dbsnp.getRsID());
|
||||
} else {
|
||||
List<Object> dbRod = tracker.getReferenceMetaData(dbSet.getKey());
|
||||
infoAnnotations.put(dbSet.getValue(), dbRod.size() == 0 ? false : true);
|
||||
boolean overlapsComp = false;
|
||||
for ( VariantContext comp : tracker.getVariantContexts(ref, dbSet.getKey(), null, ref.getLocus(), false, false) ) {
|
||||
if ( !comp.isFiltered() ) {
|
||||
overlapsComp = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
infoAnnotations.put(dbSet.getValue(), overlapsComp ? true : false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -84,10 +84,18 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testDBTag() {
|
||||
public void testDBTagWithDbsnp() {
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
baseTestString() + " -D " + GATKDataLocation + "dbsnp_129_b36.rod -G \"Standard\" -B variant,VCF," + validationDataLocation + "vcfexample3empty.vcf -BTI variant", 1,
|
||||
Arrays.asList("24d9649943be876e78f76bbf9ff5b501"));
|
||||
executeTest("getting DB tag", spec);
|
||||
executeTest("getting DB tag with dbSNP", spec);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDBTagWithHapMap() {
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
baseTestString() + " -B compH3,VCF," + validationDataLocation + "fakeHM3.vcf -G \"Standard\" -B variant,VCF," + validationDataLocation + "vcfexample3empty.vcf -BTI variant", 1,
|
||||
Arrays.asList("77980e4f741c09d88f7a91faf86037c6"));
|
||||
executeTest("getting DB tag with HM3", spec);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue