From 4e83ba411f67cb6ccf5c3147cd23ed2f06d291cf Mon Sep 17 00:00:00 2001 From: ebanks Date: Wed, 15 Sep 2010 00:18:17 +0000 Subject: [PATCH] We now do lazy loading for the genotype data in VCF. Practically, almost all walkers end of loading the genotype data because we need to be smarter about transfering the unparsed genotype string when modifying VariantContexts; however, this does solve the problem for VR's piece to generate clusters (shaved off 75% of runtime for Ryan's large case). That further optimization will happen later. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4279 348d0f76-0448-11de-a6fe-93d51630548a --- .../oneoffprojects/walkers/TestVariantContextWalker.java | 4 ++++ .../VariantRecalibrationWalkersIntegrationTest.java | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/TestVariantContextWalker.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/TestVariantContextWalker.java index 165c39da6..8282fbf51 100755 --- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/TestVariantContextWalker.java +++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/TestVariantContextWalker.java @@ -77,6 +77,10 @@ public class TestVariantContextWalker extends RodWalker { int n = 0; for (VariantContext vc : tracker.getAllVariantContexts(ref, allowedTypes, context.getLocation(), onlyContextsStartinAtCurrentPosition, takeFirstOnly) ) { + + // we need to trigger decoding of the genotype string to pass integration tests + vc.getGenotypes(); + if ( writer != null && n == 0 ) { if ( ! wroteHeader ) { writer.writeHeader(VariantContextAdaptors.createVCFHeader(null, vc)); diff --git a/java/test/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantRecalibrationWalkersIntegrationTest.java b/java/test/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantRecalibrationWalkersIntegrationTest.java index 3b2bb1584..75278b2a9 100755 --- a/java/test/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantRecalibrationWalkersIntegrationTest.java +++ b/java/test/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantRecalibrationWalkersIntegrationTest.java @@ -44,7 +44,7 @@ public class VariantRecalibrationWalkersIntegrationTest extends WalkerTest { public void testVariantRecalibrator() { HashMap> e = new HashMap>(); e.put( validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf", - Arrays.asList("e7dc06c6d4d8c2cdd03bfdac483aa92b", "038c31c5bb46a4df89b8ee69ec740812","7d42bbdfb69fdfb18cbda13a63d92602")); // Each test checks the md5 of three output files + Arrays.asList("9e4509be067284eefc31e91378faba6a", "038c31c5bb46a4df89b8ee69ec740812","7d42bbdfb69fdfb18cbda13a63d92602")); // Each test checks the md5 of three output files e.put( validationDataLocation + "lowpass.N3.chr1.raw.vcf", Arrays.asList("80243bd6731f6b0341fa1762c095a72e", "661360e85392af9c97e386399871854a","371e5a70a4006420737c5ab259e0e23e")); // Each test checks the md5 of three output files @@ -83,7 +83,7 @@ public class VariantRecalibrationWalkersIntegrationTest extends WalkerTest { @Test public void testApplyVariantCuts() { HashMap e = new HashMap(); - e.put( validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf", "ee22087a813aadf7d9426cab5a6a2164" ); + e.put( validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf", "5fc641e291ad7330985ad94d4a347511" ); e.put( validationDataLocation + "lowpass.N3.chr1.raw.vcf", "d9e00e6fe8269b3218880d2c084804c6" ); for ( Map.Entry entry : e.entrySet() ) {