From 2307bed7428f6873e280b1672f28a80e318a6ca4 Mon Sep 17 00:00:00 2001 From: ebanks Date: Tue, 3 Aug 2010 16:51:10 +0000 Subject: [PATCH] VariantEval now uses the "standard" modules only by default. You can add other modules with the -E argument and not use all of the standard ones with -noStandard (they can be added back individually with -E). Generalized some of the packaging code from VariantAnnotator. Matt might want to take a look to make this nicer...? git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3925 348d0f76-0448-11de-a6fe-93d51630548a --- .../walkers/annotator/VariantAnnotator.java | 4 +- .../annotator/VariantAnnotatorEngine.java | 118 +++++------------- .../gatk/walkers/varianteval/CompOverlap.java | 2 +- .../walkers/varianteval/CountVariants.java | 2 +- .../varianteval/GenotypeConcordance.java | 2 +- .../varianteval/SimpleMetricsByAC.java | 3 +- .../walkers/varianteval/StandardEval.java | 28 +++++ .../varianteval/TiTvVariantEvaluator.java | 2 +- .../varianteval/VariantEvalWalker.java | 34 ++--- .../sting/utils/classloader/PackageUtils.java | 21 +++- .../VariantEvalIntegrationTest.java | 22 ++-- 11 files changed, 112 insertions(+), 126 deletions(-) create mode 100755 java/src/org/broadinstitute/sting/gatk/walkers/varianteval/StandardEval.java diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotator.java b/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotator.java index ca696e664..c7eb45085 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotator.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotator.java @@ -63,7 +63,7 @@ public class VariantAnnotator extends RodWalker { protected String[] annotationsToUse = {}; @Argument(fullName="group", shortName="G", doc="One or more classes/groups of annotations to apply to variant calls", required=false) - protected String[] annotationClassesToUse = { }; + protected String[] annotationGroupsToUse = {}; @Argument(fullName="useAllAnnotations", shortName="all", doc="Use all possible annotations (not for the faint of heart)", required=false) protected Boolean USE_ALL_ANNOTATIONS = false; @@ -131,7 +131,7 @@ public class VariantAnnotator extends RodWalker { if ( USE_ALL_ANNOTATIONS ) engine = new VariantAnnotatorEngine(getToolkit()); else - engine = new VariantAnnotatorEngine(getToolkit(), annotationClassesToUse, annotationsToUse); + engine = new VariantAnnotatorEngine(getToolkit(), annotationGroupsToUse, annotationsToUse); // setup the header fields Set hInfo = new HashSet(); diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotatorEngine.java b/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotatorEngine.java index 0ebf5ecf4..c51349408 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotatorEngine.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotatorEngine.java @@ -60,8 +60,8 @@ public class VariantAnnotatorEngine { public static final String dbPrefix = "comp"; - private ArrayList requestedInfoAnnotations; - private ArrayList requestedGenotypeAnnotations; + private List requestedInfoAnnotations; + private List requestedGenotypeAnnotations; private HashMap dbAnnotations = new HashMap(); @@ -82,16 +82,14 @@ public class VariantAnnotatorEngine { // use this constructor if you want all possible annotations public VariantAnnotatorEngine(GenomeAnalysisEngine engine) { - List> infoAnnotationClasses = PackageUtils.getClassesImplementingInterface(InfoFieldAnnotation.class); - requestedInfoAnnotations = getInstances(infoAnnotationClasses); - List> genotypeAnnotationClasses = PackageUtils.getClassesImplementingInterface(GenotypeAnnotation.class); - requestedGenotypeAnnotations = getInstances(genotypeAnnotationClasses); - + requestedInfoAnnotations = PackageUtils.getInstancesOfClassesImplementingInterface(InfoFieldAnnotation.class); + requestedGenotypeAnnotations = PackageUtils.getInstancesOfClassesImplementingInterface(GenotypeAnnotation.class); initialize(engine); } // use this constructor if you want to select specific annotations (and/or interfaces) - public VariantAnnotatorEngine(GenomeAnalysisEngine engine, String[] annotationClassesToUse, String[] annotationsToUse) { + public VariantAnnotatorEngine(GenomeAnalysisEngine engine, String[] annotationGroupsToUse, String[] annotationsToUse) { + // create a map for all annotation classes which implement our top-level interfaces HashMap classMap = new HashMap(); for ( Class c : PackageUtils.getClassesImplementingInterface(InfoFieldAnnotation.class) ) @@ -103,7 +101,7 @@ public class VariantAnnotatorEngine { HashSet classes = new HashSet(); // get the classes from the provided groups (interfaces) - for ( String group : annotationClassesToUse ) { + for ( String group : annotationGroupsToUse ) { Class interfaceClass = classMap.get(group); if ( interfaceClass == null ) interfaceClass = classMap.get(group + "Annotation"); @@ -128,31 +126,14 @@ public class VariantAnnotatorEngine { for ( Class c : classes ) { // note that technically an annotation can work on both the INFO and FORMAT fields if ( InfoFieldAnnotation.class.isAssignableFrom(c) ) - requestedInfoAnnotations.add((InfoFieldAnnotation)getInstance(c)); + requestedInfoAnnotations.add((InfoFieldAnnotation)PackageUtils.getSimpleInstance(c)); if ( GenotypeAnnotation.class.isAssignableFrom(c) ) - requestedGenotypeAnnotations.add((GenotypeAnnotation)getInstance(c)); + requestedGenotypeAnnotations.add((GenotypeAnnotation)PackageUtils.getSimpleInstance(c)); } initialize(engine); } - private static ArrayList getInstances(List> classes) { - ArrayList objects = new ArrayList(); - for ( Class c : classes ) - objects.add((T)getInstance(c)); - return objects; - } - - private static T getInstance(Class c) { - try { - return c.newInstance(); - } catch (InstantiationException e) { - throw new StingException(String.format("Cannot instantiate annotation class '%s': must be concrete class", c.getSimpleName())); - } catch (IllegalAccessException e) { - throw new StingException(String.format("Cannot instantiate annotation class '%s': must have no-arg constructor", c.getSimpleName())); - } - } - private void initialize(GenomeAnalysisEngine engine) { // check to see whether comp rods were included @@ -181,15 +162,8 @@ public class VariantAnnotatorEngine { return descriptions; } - /** - * A slightly simplified interface for when you don't have any reads, so the stratifiedContexts aren't necessary, and - * you only permit a single return value - * - * @param tracker - * @param ref - * @param vc - * @return - */ + // A slightly simplified interface for when you don't have any reads, so the stratifiedContexts aren't necessary, and + // you only permit a single return value public VariantContext annotateContext(RefMetaDataTracker tracker, ReferenceContext ref, VariantContext vc) { Collection results = this.annotateContext(tracker, ref, EMPTY_STRATIFIED_ALIGNMENT_CONTEXT, vc); @@ -278,13 +252,7 @@ public class VariantAnnotatorEngine { return returnValue; } - /** - * Finish processing data from GenomicAnnotation. - * - * @param infoAnnotationOutputsList - * @param annotationsForCurrentLocusFromAllAnnotatorInputTables - * @return - */ + // Finish processing data from GenomicAnnotation. private List> processGenomicAnnotation( List> infoAnnotationOutputsList, Map annotationsForCurrentLocusFromAllAnnotatorInputTables) { @@ -330,15 +298,8 @@ public class VariantAnnotatorEngine { return infoAnnotationOutputsList; } - /** - * Performs a join between the an info field record represented by outputRecordInfoField and the infoAnnotationOutputsList. - * - * @param infoAnnotationOutputsList - * @param outputRecordInfoField - * @param joinTable - * @return - */ - private List> performJoin( List> infoAnnotationOutputsList, Map outputRecordInfoField, JoinTable joinTable) + // Performs a join between the an info field record represented by outputRecordInfoField and the infoAnnotationOutputsList. + private List> performJoin( List> infoAnnotationOutputsList, Map outputRecordInfoField, JoinTable joinTable) { //System.err.println("Looking at: " + joinTable.getLocalBindingName()+ "- join to " + joinTable.getExternalBindingName() + "." + joinTable.getExternalColumnName() ); //for the current joinTable, for each output line, find the externalJoinColumnValue and see if it matches the joinColumnValue of any record(s) in this joinTable. @@ -413,16 +374,10 @@ public class VariantAnnotatorEngine { } - /** - * Implements not-oneToMany mode, where the output lines have a one-to-one relationship - * with the input variants, and all multiple-match records are collapsed into the single info field. - * The collapsing is done by appending an _i to each key name (where 'i' is a record counter), as well - * as a special bindingName.numMatchingRecords=n key-value pair which specifies the upper limit of the counter. - * - * @param infoAnnotationOutputsList - * @param matchingRecords - * @param bindingName - */ + // Implements not-oneToMany mode, where the output lines have a one-to-one relationship + // with the input variants, and all multiple-match records are collapsed into the single info field. + // The collapsing is done by appending an _i to each key name (where 'i' is a record counter), as well + // as a special bindingName.numMatchingRecords=n key-value pair which specifies the upper limit of the counter. private void addToExistingAnnotationOutputs( final List> infoAnnotationOutputsList, final List> matchingRecords, @@ -470,19 +425,12 @@ public class VariantAnnotatorEngine { } } - /** - * Implements oneToMany mode. Takes the current infoAnnotationOutputsList - * (where each element represents a line in the output VCF file), and - * generates a new infoAnnotationOutputsList which contains one copy of the current - * infoAnnotationOutputs for each record matchingRecords. - * The returned list will have size: - * infoAnnotationOutputsList.size() * matchingRecords.size() - * - * @param infoAnnotationOutputsList - * @param matchingRecords - * @param bindingName - * @return - */ + // Implements oneToMany mode. Takes the current infoAnnotationOutputsList + // (where each element represents a line in the output VCF file), and + // generates a new infoAnnotationOutputsList which contains one copy of the current + // infoAnnotationOutputs for each record matchingRecords. + // The returned list will have size: + // infoAnnotationOutputsList.size() * matchingRecords.size() private List> explodeInfoAnnotationOutputsList( final List> infoAnnotationOutputsList, final List> matchingRecords, @@ -515,8 +463,8 @@ public class VariantAnnotatorEngine { * Records statistics for the explodeInfoAnnotationOutputsList(..) calculation. * @param bindingName The table from which annotations were gotten * @param numNewVCFRecordsAnnotatedWithBindingNameData The number of new output VCF records created with annotations from this table - * @param infoAnnotationOutputsList - * @parma matchingRecordsSize + * @param infoAnnotationOutputsList output list + * @param matchingRecordsSize matching records size */ private void recordStats( final String bindingName, int numNewVCFRecordsAnnotatedWithBindingNameData, final List> infoAnnotationOutputsList, int matchingRecordsSize ) { @@ -549,13 +497,7 @@ public class VariantAnnotatorEngine { } - - /** - * Applies the -S arg to the results - * - * @param infoAnnotationOutputsList - * @return The new newInfoAnnotationOutputList with -S arg applied. - */ + // Applies the -S arg to the results private List> applySelectArg( final List> infoAnnotationOutputsList ) { final List> newInfoAnnotationOutputList = new LinkedList>(); @@ -614,7 +556,7 @@ public class VariantAnnotatorEngine { * * See class-level comments for more details. * - * @param oneToMany + * @param oneToMany true if we should break out from one to many */ public void setOneToMany(boolean oneToMany) { this.oneToMany = oneToMany; @@ -694,9 +636,7 @@ public class VariantAnnotatorEngine { } - /** - * Returns a map containing stats on how many output vcf records were annotated from each database - */ + //Returns a map containing stats on how many output vcf records were annotated from each database public Map getInputTableHitCounter() { return Collections.unmodifiableMap(inputTableHitCounter); } diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/CompOverlap.java b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/CompOverlap.java index 6ddf54106..f8d72fa6d 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/CompOverlap.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/CompOverlap.java @@ -18,7 +18,7 @@ import org.broadinstitute.sting.playground.utils.report.tags.DataPoint; * the Broad Institute nor MIT can be responsible for its use, misuse, or functionality. */ @Analysis(name = "Comp Overlap", description = "the overlap between eval and comp sites") -public class CompOverlap extends VariantEvaluator { +public class CompOverlap extends VariantEvaluator implements StandardEval { @DataPoint(name = "eval sites", description = "number of eval SNP sites") long nEvalSNPs = 0; diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/CountVariants.java b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/CountVariants.java index e9654cda4..dd078c8ed 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/CountVariants.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/CountVariants.java @@ -11,7 +11,7 @@ import org.broadinstitute.sting.utils.StingException; @Analysis(name = "Count Variants", description = "Counts different classes of variants in the sample") -public class CountVariants extends VariantEvaluator { +public class CountVariants extends VariantEvaluator implements StandardEval { // the following fields are in output order: diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/GenotypeConcordance.java b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/GenotypeConcordance.java index ddc5dda4c..bf9185800 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/GenotypeConcordance.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/GenotypeConcordance.java @@ -37,7 +37,7 @@ import java.util.*; */ @Analysis(name = "Genotype Concordance", description = "Determine the genotype concordance between the genotypes in difference tracks") -public class GenotypeConcordance extends VariantEvaluator { +public class GenotypeConcordance extends VariantEvaluator implements StandardEval { private static final boolean PRINT_INTERESTING_SITES = true; protected final static Logger logger = Logger.getLogger(GenotypeConcordance.class); diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/SimpleMetricsByAC.java b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/SimpleMetricsByAC.java index fac6f60d5..bbc1c06de 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/SimpleMetricsByAC.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/SimpleMetricsByAC.java @@ -8,7 +8,6 @@ import org.broadinstitute.sting.playground.utils.report.tags.Analysis; import org.broadinstitute.sting.playground.utils.report.tags.DataPoint; import org.broadinstitute.sting.playground.utils.report.utils.TableType; import org.broadinstitute.sting.utils.StingException; -import org.broad.tribble.vcf.VCFGenotypeRecord; import java.util.ArrayList; @@ -43,7 +42,7 @@ import java.util.ArrayList; */ @Analysis(name = "Quality Metrics by allele count", description = "Shows various stats binned by allele count") -public class SimpleMetricsByAC extends VariantEvaluator { +public class SimpleMetricsByAC extends VariantEvaluator implements StandardEval { // a mapping from quality score histogram bin to Ti/Tv ratio @DataPoint(name="TiTv by AC", description = "TiTv by allele count") MetricsByAc metrics = null; diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/StandardEval.java b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/StandardEval.java new file mode 100755 index 000000000..351d65db8 --- /dev/null +++ b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/StandardEval.java @@ -0,0 +1,28 @@ +/* + * 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.gatk.walkers.varianteval; + +public interface StandardEval {} \ No newline at end of file diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/TiTvVariantEvaluator.java b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/TiTvVariantEvaluator.java index 992e7770d..f1b2e6ee6 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/TiTvVariantEvaluator.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/TiTvVariantEvaluator.java @@ -8,7 +8,7 @@ import org.broadinstitute.sting.playground.utils.report.tags.Analysis; import org.broadinstitute.sting.playground.utils.report.tags.DataPoint; @Analysis(name = "Ti/Tv Variant Evaluator", description = "Ti/Tv Variant Evaluator") -public class TiTvVariantEvaluator extends VariantEvaluator { +public class TiTvVariantEvaluator extends VariantEvaluator implements StandardEval { @DataPoint(name = "ti_count", description = "number of transition loci") long nTi = 0; diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/VariantEvalWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/VariantEvalWalker.java index 884174879..3f387c6a4 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/VariantEvalWalker.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/VariantEvalWalker.java @@ -136,11 +136,11 @@ public class VariantEvalWalker extends RodWalker { // // Arguments for choosing which modules to run // - @Argument(fullName="evalModule", shortName="E", doc="One or more specific eval modules to apply to the eval track(s)", required=false) + @Argument(fullName="evalModule", shortName="E", doc="One or more specific eval modules to apply to the eval track(s) (in addition to the standard modules, unless -noStandard is specified)", required=false) protected String[] modulesToUse = {}; - @Argument(fullName="useNoModules", shortName="none", doc="Use no eval modules", required=false) - protected Boolean USE_NO_MODULES = false; + @Argument(fullName="doNotUseAllStandardModules", shortName="noStandard", doc="Do not use the standard modules by default (instead, only those that are specified with the -E option)") + protected Boolean NO_STANDARD = false; @Argument(fullName="list", shortName="ls", doc="List the available eval modules and exit") protected Boolean LIST = false; @@ -272,7 +272,7 @@ public class VariantEvalWalker extends RodWalker { } // Dynamically determined variantEvaluation classes - private List> evaluationClasses = null; + private Set> evaluationClasses = null; /** output writer for interesting sites */ private VCFWriter writer = null; @@ -392,21 +392,23 @@ public class VariantEvalWalker extends RodWalker { for ( Class c : PackageUtils.getClassesImplementingInterface(VariantEvaluator.class) ) classMap.put(c.getSimpleName(), c); - if ( USE_NO_MODULES ) { - evaluationClasses = new ArrayList>(0); - } else if ( modulesToUse.length == 0 ) { - evaluationClasses = new ArrayList>(classMap.values()); - } else { - // get the specific classes provided - evaluationClasses = new ArrayList>(modulesToUse.length); - for ( String module : modulesToUse ) { - Class moduleClass = classMap.get(module); - if ( moduleClass == null ) - throw new StingException("Class " + module + " is not found; please check that you have specified the class name correctly"); - evaluationClasses.add(moduleClass); + evaluationClasses = new HashSet>(); + + // by default, use standard eval modules + if ( !NO_STANDARD ) { + for ( Class myClass : PackageUtils.getClassesImplementingInterface(StandardEval.class) ) { + if ( classMap.containsKey(myClass.getSimpleName()) ) + evaluationClasses.add(classMap.get(myClass.getSimpleName())); } } + // get the specific classes provided + for ( String module : modulesToUse ) { + if ( !classMap.containsKey(module) ) + throw new StingException("Class " + module + " is not found; please check that you have specified the class name correctly"); + evaluationClasses.add(classMap.get(module)); + } + for ( VariantEvaluator e : instantiateEvalationsSet() ) { // for collecting purposes variantEvaluationNames.add(e.getName()); diff --git a/java/src/org/broadinstitute/sting/utils/classloader/PackageUtils.java b/java/src/org/broadinstitute/sting/utils/classloader/PackageUtils.java index 45a344c98..4fe8a6cec 100755 --- a/java/src/org/broadinstitute/sting/utils/classloader/PackageUtils.java +++ b/java/src/org/broadinstitute/sting/utils/classloader/PackageUtils.java @@ -28,10 +28,9 @@ package org.broadinstitute.sting.utils.classloader; import org.reflections.Reflections; import org.reflections.scanners.ResourcesScanner; import org.reflections.scanners.SubTypesScanner; -import org.reflections.util.ClasspathHelper; import org.reflections.util.ConfigurationBuilder; import org.reflections.util.ManifestAwareClasspathHelper; -import org.slf4j.LoggerFactory; +import org.broadinstitute.sting.utils.StingException; import java.net.URL; import java.util.Set; @@ -81,6 +80,24 @@ public class PackageUtils { return concreteTypes; } + public static List getInstancesOfClassesImplementingInterface(Class iface) { + List> classes = PackageUtils.getClassesImplementingInterface(iface); + List instances = new ArrayList(); + for ( Class c : classes ) + instances.add(getSimpleInstance(c)); + return instances; + } + + public static T getSimpleInstance(Class c) { + try { + return c.newInstance(); + } catch (InstantiationException e) { + throw new StingException(String.format("Cannot instantiate class '%s': must be concrete class", c.getSimpleName())); + } catch (IllegalAccessException e) { + throw new StingException(String.format("Cannot instantiate class '%s': must have no-arg constructor", c.getSimpleName())); + } + } + /** * Return the interface classes that extend the specified interface. * diff --git a/java/test/org/broadinstitute/sting/gatk/walkers/varianteval/VariantEvalIntegrationTest.java b/java/test/org/broadinstitute/sting/gatk/walkers/varianteval/VariantEvalIntegrationTest.java index 903efe35b..cb346e567 100755 --- a/java/test/org/broadinstitute/sting/gatk/walkers/varianteval/VariantEvalIntegrationTest.java +++ b/java/test/org/broadinstitute/sting/gatk/walkers/varianteval/VariantEvalIntegrationTest.java @@ -29,7 +29,7 @@ public class String extraArgs = "-L 1:1-10,000,000"; for (String tests : testsEnumerations) { WalkerTestSpec spec = new WalkerTestSpec(withSelect(tests, "DP < 50", "DP50") + " " + extraArgs + " -o %s", - 1, Arrays.asList("119601d7e9e67a1053663b2e546250ed")); + 1, Arrays.asList("a12bd969ca3bc676752e078d205c730a")); executeTest("testSelect1", spec); } } @@ -38,7 +38,7 @@ public class public void testSelect2() { String extraArgs = "-L 1:1-10,000,000"; WalkerTestSpec spec = new WalkerTestSpec( withSelect(withSelect(root, "DP < 50", "DP50"), "set==\"Intersection\"", "intersection") + " " + extraArgs + " -o %s", - 1, Arrays.asList("06d495ab8169a2570eebdc54ecdffe10")); + 1, Arrays.asList("2c1a99b225b55dcf605410ba5e6be789")); executeTest("testSelect2", spec); } @@ -46,7 +46,7 @@ public class public void testVEGenotypeConcordance() { String vcfFiles[] = {"GenotypeConcordanceEval.vcf", "GenotypeConcordanceEval.vcf.gz"}; for (String vcfFile : vcfFiles) { - WalkerTestSpec spec = new WalkerTestSpec(cmdRoot + " -B eval,VCF," + validationDataLocation + vcfFile + " -B comp,VCF," + validationDataLocation + "GenotypeConcordanceComp.vcf -E GenotypeConcordance -reportType CSV -o %s", + WalkerTestSpec spec = new WalkerTestSpec(cmdRoot + " -B eval,VCF," + validationDataLocation + vcfFile + " -B comp,VCF," + validationDataLocation + "GenotypeConcordanceComp.vcf -noStandard -E GenotypeConcordance -reportType CSV -o %s", 1, Arrays.asList("15d1075d384da2bb7445f7493f2b6a07")); executeTest("testVEGenotypeConcordance" + vcfFile, spec); @@ -57,8 +57,8 @@ public class @Test public void testVESimple() { HashMap expectations = new HashMap(); - expectations.put("-L 1:1-10,000,000", "629b8b124306435ff56b66357354dfbc"); - expectations.put("-L 1:1-10,000,000 -family NA19238+NA19239=NA19240 -MVQ 0", "f51c299d500b347d098c7ab25f54a436"); + expectations.put("-L 1:1-10,000,000", "a48e4ca3a019bf46eb3a178a6a80822f"); + expectations.put("-L 1:1-10,000,000 -family NA19238+NA19239=NA19240 -MVQ 0 -E MendelianViolationEvaluator", "bc35dfefce72899d4c673bfc37c9a7f3"); for ( Map.Entry entry : expectations.entrySet() ) { String extraArgs = entry.getKey(); @@ -75,15 +75,15 @@ public class @Test public void testVEComplex() { HashMap expectations = new HashMap(); - String extraArgs1 = "-L " + validationDataLocation + "chr1_b36_pilot3.interval_list -family NA19238+NA19239=NA19240 -MVQ 30" + + String extraArgs1 = "-L " + validationDataLocation + "chr1_b36_pilot3.interval_list -family NA19238+NA19239=NA19240 -MVQ 30 -E MendelianViolationEvaluator" + " -B dbsnp_130,dbSNP," + GATKDataLocation + "dbsnp_130_b36.rod" + " -B comp_hapmap,VCF," + validationDataLocation + "CEU_hapmap_nogt_23.vcf"; - String matchingMD5 = "d01725ce4e46c8fea0855a923c1598fd"; + String matchingMD5 = "38c8906cc364d04ba39a437d93d752d3"; expectations.put("", matchingMD5); expectations.put(" -known comp_hapmap -known dbsnp", matchingMD5); - expectations.put(" -known comp_hapmap", "a50be9240f6c90503fb6333d8a78b974"); + expectations.put(" -known comp_hapmap", "b839c8e9f26b01281899f86362b5323c"); for (String tests : testsEnumerations) { for (Map.Entry entry : expectations.entrySet()) { String extraArgs2 = entry.getKey(); @@ -103,7 +103,7 @@ public class "-R " + oneKGLocation + "reference/human_b36_both.fasta " + "-L 21 " + "-D " + GATKDataLocation + "dbsnp_129_b36.rod " + - "-E CountFunctionalClasses " + + "-E CountFunctionalClasses -noStandard " + "-B eval,VCF," + validationDataLocation + "test.filtered.maf_annotated.vcf " + "-o %s"; String md5 = "d41d8cd98f00b204e9800998ecf8427e"; @@ -114,11 +114,11 @@ public class @Test public void testVEWriteVCF() { - String extraArgs = "-L 1:1-10,000,000 -family NA19238+NA19239=NA19240 -MVQ 30"; + String extraArgs = "-L 1:1-10,000,000 -family NA19238+NA19239=NA19240 -MVQ 30 -E MendelianViolationEvaluator"; for (String tests : testsEnumerations) { WalkerTestSpec spec = new WalkerTestSpec(tests + " " + extraArgs + " -o %s -outputVCF %s", 2, - Arrays.asList("483f821ce96f4cf571e9bba356c9f325", "989bc30dea6c8a4cf771cd1b9fdab488")); + Arrays.asList("8059c6b53ba15598bf89d65c79742566", "989bc30dea6c8a4cf771cd1b9fdab488")); executeTest("testVEWriteVCF", spec); } }