diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/TribbleRMDTrackBuilder.java b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/TribbleRMDTrackBuilder.java index 03af27f26..a224bc5a3 100644 --- a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/TribbleRMDTrackBuilder.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/TribbleRMDTrackBuilder.java @@ -65,12 +65,6 @@ public class TribbleRMDTrackBuilder extends PluginManager implemen */ private static Logger logger = Logger.getLogger(TribbleRMDTrackBuilder.class); - // what index to use - static boolean useLinearIndex = true; - - // our bin size - static int binSize = 1600; - // the linear index extension public static final String indexExtension = ".idx"; @@ -197,11 +191,8 @@ public class TribbleRMDTrackBuilder extends PluginManager implemen // create the index file name, locking on the index file name File indexFile = null; - if (useLinearIndex) - indexFile = new File(inputFile.getAbsoluteFile() + indexExtension); - else - indexFile = new File(inputFile.getAbsoluteFile() + ".tdx"); - + indexFile = new File(inputFile.getAbsoluteFile() + indexExtension); + FSLockWithShared lock = new FSLockWithShared(indexFile); // acquire a lock on the file @@ -317,13 +308,7 @@ public class TribbleRMDTrackBuilder extends PluginManager implemen // this can take a while, let them know what we're doing logger.info("Creating Tribble index in memory for file " + inputFile); IndexCreator creator; - if (useLinearIndex) { - creator = new LinearIndexCreator(inputFile,codec,null); - ((LinearIndexCreator)creator).setBinWidth(binSize); - } else { - creator = new IntervalIndexCreator(inputFile, codec, null); - ((IntervalIndexCreator)creator).setFeaturesPerInterval(binSize); - } + creator = new LinearIndexCreator(inputFile, codec, null); return creator.createIndex(); } diff --git a/java/test/org/broadinstitute/sting/WalkerTest.java b/java/test/org/broadinstitute/sting/WalkerTest.java index f090c7b52..089630e8b 100755 --- a/java/test/org/broadinstitute/sting/WalkerTest.java +++ b/java/test/org/broadinstitute/sting/WalkerTest.java @@ -284,7 +284,9 @@ public class WalkerTest extends BaseTest { if (CommandLineExecutable.result != 0) { throw new RuntimeException("Error running the GATK with arguments: " + args); } - + // clean up some memory + instance = null; + cmd2 = null; return new Pair, List>(tmpFiles, assertMatchingMD5s(name, tmpFiles, md5s)); } diff --git a/java/test/org/broadinstitute/sting/playground/gatk/walkers/vcftools/VariantSelectIntegrationTest.java b/java/test/org/broadinstitute/sting/playground/gatk/walkers/vcftools/VariantSelectIntegrationTest.java deleted file mode 100755 index edefa76f2..000000000 --- a/java/test/org/broadinstitute/sting/playground/gatk/walkers/vcftools/VariantSelectIntegrationTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2010. - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following - * conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -package org.broadinstitute.sting.playground.gatk.walkers.vcftools; - -import org.broadinstitute.sting.WalkerTest; -import org.junit.Test; - -import java.util.Arrays; - -public class VariantSelectIntegrationTest extends WalkerTest { - - public static String baseTestString() { - return "-T VariantSelect -o %s -R " + b36KGReference; - } - - - @Test - public void testVCFSelect1() { - WalkerTestSpec spec = new WalkerTestSpec( - baseTestString() + " -B variant,VCF," + validationDataLocation + "vcfexample3.vcf -match 'AF == 0.50' -L 1:10001290-10048590 ", 1, - Arrays.asList("8fd97a99174483920f84aaf54eeb9dd9")); - executeTest("testVCFSelect1", spec); - } - - @Test - public void testVCFSelect2() { - WalkerTestSpec spec = new WalkerTestSpec( - baseTestString() + " -B variant,VCF," + validationDataLocation + "vcfexample3.vcf -match 'HomopolymerRun == 6' -L 1:10001290-10048590 ", 1, - Arrays.asList("ecb61d798ff5e0b003d2986500bf4462")); - executeTest("testVCFSelect2", spec); - } - - @Test - public void testVCFSelectOr() { - WalkerTestSpec spec = new WalkerTestSpec( - baseTestString() + " -B variant,VCF," + validationDataLocation + "vcfexample3.vcf -match 'HomopolymerRun == 6' -match 'AF == 0.50' -L 1:10001290-10048590 ", 1, - Arrays.asList("7c23412a0abe28057a78cd532b752019")); - executeTest("testVCFSelectOr", spec); - } - - @Test - public void testVCFSelectAnd() { - WalkerTestSpec spec = new WalkerTestSpec( - baseTestString() + " -B variant,VCF," + validationDataLocation + "vcfexample3.vcf -match 'HomopolymerRun == 6 && AF == 0.50' -L 1:10001290-10048590 ", 1, - Arrays.asList("71cc18348a9d5de7270613bedb79880a")); - executeTest("testVCFSelectAnd", spec); - } -} \ No newline at end of file