From ff0df1a2da6d65dcd44e6f527707a08e2f04b92c Mon Sep 17 00:00:00 2001 From: aaron Date: Tue, 12 Oct 2010 18:39:56 +0000 Subject: [PATCH] A fix for an integration test that was broken by on-the-fly indexing. Also, better reporting of Tribble exceptions in GATK integration tests. Trying to get the tests back up and running... git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4483 348d0f76-0448-11de-a6fe-93d51630548a --- .../gatk/refdata/tracks/builders/RMDTrackBuilder.java | 4 ++-- .../oneoffprojects/walkers/TestVariantContextWalker.java | 8 +------- .../variantcontext/VariantContextIntegrationTest.java | 4 ++-- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/RMDTrackBuilder.java b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/RMDTrackBuilder.java index bc8f025d6..681a114d3 100644 --- a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/RMDTrackBuilder.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/RMDTrackBuilder.java @@ -166,7 +166,7 @@ public class RMDTrackBuilder extends PluginManager { try { return new Pair(BasicFeatureSource.getFeatureSource(inputFile.getAbsolutePath(), createCodec(targetClass, name)),null); } catch (TribbleException e) { - throw new UserException(e.getTribbleExceptionMessage(), e); + throw new UserException(e.getMessage(), e); } } @@ -208,7 +208,7 @@ public class RMDTrackBuilder extends PluginManager { createCodec(targetClass, name)), dictFromIndex); } catch (TribbleException e) { - throw new UserException(e.getTribbleExceptionMessage()); + throw new UserException(e.getMessage()); } catch (IOException e) { throw new UserException("Unable to create the index file for " + inputFile, e); } diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/TestVariantContextWalker.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/TestVariantContextWalker.java index 8282fbf51..eaa933b2f 100755 --- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/TestVariantContextWalker.java +++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/TestVariantContextWalker.java @@ -59,16 +59,10 @@ public class TestVariantContextWalker extends RodWalker { boolean printContexts = false; @Argument(fullName="outputVCF", doc="If provided, we'll convert the first input context into a VCF", required=false) - String outputVCF = null; + VCFWriter writer = null; - private VCFWriter writer = null; private boolean wroteHeader = false; - public void initialize() { - if ( outputVCF != null ) - writer = new StandardVCFWriter(new File(outputVCF)); - } - public Integer map(RefMetaDataTracker tracker, ReferenceContext ref, AlignmentContext context) { if ( ref == null ) return 0; diff --git a/java/test/org/broadinstitute/sting/gatk/contexts/variantcontext/VariantContextIntegrationTest.java b/java/test/org/broadinstitute/sting/gatk/contexts/variantcontext/VariantContextIntegrationTest.java index b5be80195..3f8324afa 100755 --- a/java/test/org/broadinstitute/sting/gatk/contexts/variantcontext/VariantContextIntegrationTest.java +++ b/java/test/org/broadinstitute/sting/gatk/contexts/variantcontext/VariantContextIntegrationTest.java @@ -46,7 +46,7 @@ public class VariantContextIntegrationTest extends WalkerTest { public void testToVCF() { // this really just tests that we are seeing the same number of objects over all of chr1 - WalkerTestSpec spec = new WalkerTestSpec( cmdRoot + " -B:vcf,VCF " + validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.500.vcf -L 1:1-1000000 -o %s --outputVCF %s", + WalkerTestSpec spec = new WalkerTestSpec( cmdRoot + " -NO_HEADER -B:vcf,VCF " + validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.500.vcf -L 1:1-1000000 -o %s --outputVCF %s", 2, // just one output file Arrays.asList("e3c35d0c4b5d4935c84a270f9df0951f", "f4db5f7346792b1155693722bc190f63")); executeTest("testToVCF", spec); @@ -57,7 +57,7 @@ public class VariantContextIntegrationTest extends WalkerTest { // this really just tests that we are seeing the same number of objects over all of chr1 WalkerTestSpec spec = new WalkerTestSpec( root + " -L 1" + " -o %s", 1, // just one output file - Arrays.asList("3fcdd982df080e6abc0afaba6abdf386")); + Arrays.asList("d2a3f2fe329a0a64145cfd19fde45b99")); executeTest("testLargeScaleConversion", spec); } }