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:
parent
99337df929
commit
7d0ac7c6f2
|
|
@ -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;}
|
||||||
|
|
@ -226,7 +226,7 @@ public class VariantEvalWalker extends RodWalker<Integer, Integer> {
|
||||||
Variation eval = (Variation) tracker.lookup("eval", null);
|
Variation eval = (Variation) tracker.lookup("eval", null);
|
||||||
|
|
||||||
// ensure that the variation we're looking at is bi-allelic
|
// ensure that the variation we're looking at is bi-allelic
|
||||||
if (eval != null && !eval.isBiallelic())
|
if ( eval != null && ! eval.isBiallelic() )
|
||||||
eval = null;
|
eval = null;
|
||||||
|
|
||||||
if (eval != null)
|
if (eval != null)
|
||||||
|
|
|
||||||
|
|
@ -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,17 +34,19 @@ 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
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
for ( Map.Entry<String, String> e : md5.entrySet() ) {
|
||||||
"-R /broad/1KG/reference/human_b36_both.fasta" +
|
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||||
" --rodBind eval,Variants,/humgen/gsa-scr1/GATK_Data/Validation_Data/NA12878.1kg.p2.chr1_10mb_11_mb.SLX.lod5.variants.geli.calls" +
|
"-R /broad/1KG/reference/human_b36_both.fasta" +
|
||||||
" -T VariantEval" +
|
" --rodBind eval,Variants,/humgen/gsa-scr1/GATK_Data/Validation_Data/NA12878.1kg.p2.chr1_10mb_11_mb.SLX.lod5.variants.geli.calls" +
|
||||||
" --DBSNP /humgen/gsa-scr1/GATK_Data/dbsnp_129_b36.rod" +
|
" -T VariantEval" +
|
||||||
" -L 1:10,000,000-11,000,000" +
|
" --DBSNP /humgen/gsa-scr1/GATK_Data/dbsnp_129_b36.rod" +
|
||||||
" --outerr %s" +
|
" -L 1:10,000,000-11,000,000" +
|
||||||
" --supressDateInformation",
|
" --outerr %s" +
|
||||||
1, // just one output file
|
" --supressDateInformation " + e.getKey(),
|
||||||
md5);
|
1, // just one output file
|
||||||
List<File> result = executeTest("testEvalVariantROD", spec).getFirst();
|
Arrays.asList(e.getValue()));
|
||||||
|
List<File> result = executeTest("testEvalVariantROD", spec).getFirst();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue