Fix for long-term VariantEval bug plus new intergration test to catch it

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1951 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
depristo 2009-10-31 00:00:33 +00:00
parent 99337df929
commit 7d0ac7c6f2
2 changed files with 19 additions and 17 deletions

View File

@ -72,7 +72,7 @@ public class VariantEvalWalker extends RodWalker<Integer, Integer> {
// the types of analysis we support, and the string tags we associate with the enumerated value // the types of analysis we support, and the string tags we associate with the enumerated value
enum ANALYSIS_TYPE { enum ANALYSIS_TYPE {
ALL_SNPS("all"), SINGLETON_SNPS("singletons"), TWOHIT_SNPS("2plus_hit"), KNOWN_SNPS("2plus_hit"), NOVEL_SNPS("2plus_hit"); ALL_SNPS("all"), SINGLETON_SNPS("singletons"), TWOHIT_SNPS("2plus_hit"), KNOWN_SNPS("known"), NOVEL_SNPS("novel");
private final String value; private final String value;
ANALYSIS_TYPE(String value) { this.value = value;} ANALYSIS_TYPE(String value) { this.value = value;}

View File

@ -4,8 +4,7 @@ import org.broadinstitute.sting.WalkerTest;
import org.junit.Test; import org.junit.Test;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.*;
import java.util.List;
/** /**
* @author aaron * @author aaron
@ -18,8 +17,9 @@ public class VariantEvalWalkerIntegrationTest extends WalkerTest {
@Test @Test
public void testEvalVariantROD() { public void testEvalVariantROD() {
List<String> md5 = new ArrayList<String>(); HashMap<String, String> md5 = new HashMap<String, String>();
md5.add("86582b57ec27dd9c4a6e0252eb010376"); md5.put("", "86582b57ec27dd9c4a6e0252eb010376");
md5.put("-A", "ead904e334956435e6b586b697cd1905");
/** /**
* the above MD5 was calculated from running the following command: * the above MD5 was calculated from running the following command:
@ -34,6 +34,7 @@ public class VariantEvalWalkerIntegrationTest extends WalkerTest {
* --rodBind eval,Variants,/humgen/gsa-scr1/GATK_Data/Validation_Data/NA12878.1kg.p2.chr1_10mb_11_mb.SLX.lod5.variants.geli.calls * --rodBind eval,Variants,/humgen/gsa-scr1/GATK_Data/Validation_Data/NA12878.1kg.p2.chr1_10mb_11_mb.SLX.lod5.variants.geli.calls
* *
*/ */
for ( Map.Entry<String, String> e : md5.entrySet() ) {
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
"-R /broad/1KG/reference/human_b36_both.fasta" + "-R /broad/1KG/reference/human_b36_both.fasta" +
" --rodBind eval,Variants,/humgen/gsa-scr1/GATK_Data/Validation_Data/NA12878.1kg.p2.chr1_10mb_11_mb.SLX.lod5.variants.geli.calls" + " --rodBind eval,Variants,/humgen/gsa-scr1/GATK_Data/Validation_Data/NA12878.1kg.p2.chr1_10mb_11_mb.SLX.lod5.variants.geli.calls" +
@ -41,11 +42,12 @@ public class VariantEvalWalkerIntegrationTest extends WalkerTest {
" --DBSNP /humgen/gsa-scr1/GATK_Data/dbsnp_129_b36.rod" + " --DBSNP /humgen/gsa-scr1/GATK_Data/dbsnp_129_b36.rod" +
" -L 1:10,000,000-11,000,000" + " -L 1:10,000,000-11,000,000" +
" --outerr %s" + " --outerr %s" +
" --supressDateInformation", " --supressDateInformation " + e.getKey(),
1, // just one output file 1, // just one output file
md5); Arrays.asList(e.getValue()));
List<File> result = executeTest("testEvalVariantROD", spec).getFirst(); List<File> result = executeTest("testEvalVariantROD", spec).getFirst();
} }
}
@Test @Test
public void testEvalVariantRODConfSix() { public void testEvalVariantRODConfSix() {