remove testing code from tribble track builder, set the command line program in walker test to null to reclaim memory in integration tests, and removed some orphaned intergration tests.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4046 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
aaron 2010-08-16 23:52:01 +00:00
parent 3a4977c75e
commit c1df293feb
3 changed files with 6 additions and 90 deletions

View File

@ -65,12 +65,6 @@ public class TribbleRMDTrackBuilder extends PluginManager<FeatureCodec> 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<FeatureCodec> 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<FeatureCodec> 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();
}

View File

@ -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<File>, List<String>>(tmpFiles, assertMatchingMD5s(name, tmpFiles, md5s));
}

View File

@ -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);
}
}