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
|
||||
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;
|
||||
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);
|
||||
|
||||
// ensure that the variation we're looking at is bi-allelic
|
||||
if (eval != null && !eval.isBiallelic())
|
||||
if ( eval != null && ! eval.isBiallelic() )
|
||||
eval = null;
|
||||
|
||||
if (eval != null)
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ import org.broadinstitute.sting.WalkerTest;
|
|||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author aaron
|
||||
|
|
@ -18,8 +17,9 @@ public class VariantEvalWalkerIntegrationTest extends WalkerTest {
|
|||
|
||||
@Test
|
||||
public void testEvalVariantROD() {
|
||||
List<String> md5 = new ArrayList<String>();
|
||||
md5.add("86582b57ec27dd9c4a6e0252eb010376");
|
||||
HashMap<String, String> md5 = new HashMap<String, String>();
|
||||
md5.put("", "86582b57ec27dd9c4a6e0252eb010376");
|
||||
md5.put("-A", "ead904e334956435e6b586b697cd1905");
|
||||
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
"-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" +
|
||||
" -T VariantEval" +
|
||||
" --DBSNP /humgen/gsa-scr1/GATK_Data/dbsnp_129_b36.rod" +
|
||||
" -L 1:10,000,000-11,000,000" +
|
||||
" --outerr %s" +
|
||||
" --supressDateInformation",
|
||||
1, // just one output file
|
||||
md5);
|
||||
List<File> result = executeTest("testEvalVariantROD", spec).getFirst();
|
||||
for ( Map.Entry<String, String> e : md5.entrySet() ) {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
"-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" +
|
||||
" -T VariantEval" +
|
||||
" --DBSNP /humgen/gsa-scr1/GATK_Data/dbsnp_129_b36.rod" +
|
||||
" -L 1:10,000,000-11,000,000" +
|
||||
" --outerr %s" +
|
||||
" --supressDateInformation " + e.getKey(),
|
||||
1, // just one output file
|
||||
Arrays.asList(e.getValue()));
|
||||
List<File> result = executeTest("testEvalVariantROD", spec).getFirst();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Reference in New Issue