Added a back door so that integration tests can reset the sequence dictionary
in the reference. Reset routine is not accessible to any class outside GenomeLocParser's package. We'll have to do something more intelligent with this when the GATK goes distributed. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4275 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
dbb641280e
commit
7fa6b2135b
|
|
@ -135,6 +135,14 @@ public class GenomeLocParser {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* A package-protected method that can be used by the test system to reset the sequence dictionary
|
||||
* being used. Use this method sparingly.
|
||||
*/
|
||||
static void clearRefContigOrdering() {
|
||||
contigInfo = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* parse a genome interval, from a location string
|
||||
*
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ package org.broadinstitute.sting;
|
|||
import junit.framework.Assert;
|
||||
import org.broadinstitute.sting.gatk.CommandLineExecutable;
|
||||
import org.broadinstitute.sting.gatk.CommandLineGATK;
|
||||
import org.broadinstitute.sting.utils.GenomeLocParserTestUtils;
|
||||
import org.broadinstitute.sting.utils.exceptions.ReviewedStingException;
|
||||
import org.broadinstitute.sting.utils.collections.Pair;
|
||||
import org.broadinstitute.sting.utils.Utils;
|
||||
|
|
@ -274,6 +275,8 @@ public class WalkerTest extends BaseTest {
|
|||
* @return a pair of file and string lists
|
||||
*/
|
||||
private Pair<List<File>, List<String>> executeTest(String name, List<String> md5s, List<File> tmpFiles, String args, Class expectedException) {
|
||||
GenomeLocParserTestUtils.clearSequenceDictionary();
|
||||
|
||||
CommandLineGATK instance = new CommandLineGATK();
|
||||
String[] command;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright (c) 2010, The Broad Institute
|
||||
*
|
||||
* 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.utils;
|
||||
|
||||
/**
|
||||
* A suite of utilities for working with the GenomeLocParser
|
||||
* in the context of the sequence dictionary.
|
||||
*/
|
||||
public class GenomeLocParserTestUtils {
|
||||
/**
|
||||
* Clear out the sequence dictionary associated with
|
||||
* the genomeloc creator.
|
||||
*/
|
||||
public static void clearSequenceDictionary() {
|
||||
GenomeLocParser.clearRefContigOrdering();
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue