Fixing up integration tests so more

This commit is contained in:
Mark DePristo 2011-08-03 17:26:35 -04:00
parent 8f696c7731
commit acbd3d0922
5 changed files with 403 additions and 406 deletions

View File

@ -43,6 +43,7 @@ import org.broadinstitute.sting.utils.pileup.ReadBackedPileup;
import java.io.PrintStream; import java.io.PrintStream;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.List; import java.util.List;
/** /**
@ -71,7 +72,7 @@ public class PileupWalker extends LocusWalker<Integer, Integer> implements TreeR
public boolean SHOW_INDEL_PILEUPS = false; public boolean SHOW_INDEL_PILEUPS = false;
@Argument(fullName="metadata",shortName="metadata",doc="Add these ROD bindings to the output Pileup", required=false) @Argument(fullName="metadata",shortName="metadata",doc="Add these ROD bindings to the output Pileup", required=false)
public List<RodBinding<Feature>> rods; public List<RodBinding<Feature>> rods = Collections.emptyList();
public void initialize() { public void initialize() {
} }

View File

@ -58,7 +58,7 @@ public class BeagleOutputToVCFWalker extends RodWalker<Integer, Integer> {
public RodBinding<VariantContext> variants; public RodBinding<VariantContext> variants;
@Input(fullName="comp", shortName = "comp", doc="Comparison VCF file", required=false) @Input(fullName="comp", shortName = "comp", doc="Comparison VCF file", required=false)
public RodBinding<VariantContext> comp; public RodBinding<VariantContext> comp = RodBinding.makeUnbound(VariantContext.class);
@Input(fullName="beagleR2", shortName = "beagleR2", doc="VCF file", required=true) @Input(fullName="beagleR2", shortName = "beagleR2", doc="VCF file", required=true)
public RodBinding<BeagleFeature> beagleR2; public RodBinding<BeagleFeature> beagleR2;
@ -105,14 +105,10 @@ public class BeagleOutputToVCFWalker extends RodWalker<Integer, Integer> {
// Open output file specified by output VCF ROD // Open output file specified by output VCF ROD
final List<ReferenceOrderedDataSource> dataSources = this.getToolkit().getRodDataSources(); final List<ReferenceOrderedDataSource> dataSources = this.getToolkit().getRodDataSources();
for( final ReferenceOrderedDataSource source : dataSources ) { if ( comp.isBound() ) {
if (source.getName().equals(comp.getName())) {
hInfo.add(new VCFInfoHeaderLine("ACH", 1, VCFHeaderLineType.Integer, "Allele Count from Comparison ROD at this site")); hInfo.add(new VCFInfoHeaderLine("ACH", 1, VCFHeaderLineType.Integer, "Allele Count from Comparison ROD at this site"));
hInfo.add(new VCFInfoHeaderLine("ANH", 1, VCFHeaderLineType.Integer, "Allele Frequency from Comparison ROD at this site")); hInfo.add(new VCFInfoHeaderLine("ANH", 1, VCFHeaderLineType.Integer, "Allele Frequency from Comparison ROD at this site"));
hInfo.add(new VCFInfoHeaderLine("AFH", 1, VCFHeaderLineType.Float, "Allele Number from Comparison ROD at this site")); hInfo.add(new VCFInfoHeaderLine("AFH", 1, VCFHeaderLineType.Float, "Allele Number from Comparison ROD at this site"));
break;
}
} }
Set<String> samples = SampleUtils.getSampleListWithVCFHeader(getToolkit(), Arrays.asList(variants.getName())); Set<String> samples = SampleUtils.getSampleListWithVCFHeader(getToolkit(), Arrays.asList(variants.getName()));

View File

@ -56,7 +56,7 @@ public class ProduceBeagleInputWalker extends RodWalker<Integer, Integer> {
public RodBinding<VariantContext> variants; public RodBinding<VariantContext> variants;
@Input(fullName="validation", shortName = "validation", doc="Input VCF file", required=false) @Input(fullName="validation", shortName = "validation", doc="Input VCF file", required=false)
public RodBinding<VariantContext> validation; public RodBinding<VariantContext> validation = RodBinding.makeUnbound(VariantContext.class);
@Output(doc="File to which BEAGLE input should be written",required=true) @Output(doc="File to which BEAGLE input should be written",required=true)
protected PrintStream beagleWriter = null; protected PrintStream beagleWriter = null;

View File

@ -1,394 +1,394 @@
package org.broadinstitute.sting.gatk.walkers.varianteval; //package org.broadinstitute.sting.gatk.walkers.varianteval;
//
import org.broadinstitute.sting.WalkerTest; //import org.broadinstitute.sting.WalkerTest;
import org.testng.annotations.Test; //import org.testng.annotations.Test;
//
import java.util.Arrays; //import java.util.Arrays;
import java.util.HashMap; //import java.util.HashMap;
import java.util.Map; //import java.util.Map;
//
public class VariantEvalIntegrationTest extends WalkerTest { //public class VariantEvalIntegrationTest extends WalkerTest {
private static String variantEvalTestDataRoot = validationDataLocation + "/VariantEval"; // private static String variantEvalTestDataRoot = validationDataLocation + "/VariantEval";
private static String fundamentalTestVCF = variantEvalTestDataRoot + "/" + "FundamentalsTest.annotated.db.subset.snps_and_indels.vcf"; // private static String fundamentalTestVCF = variantEvalTestDataRoot + "/" + "FundamentalsTest.annotated.db.subset.snps_and_indels.vcf";
private static String fundamentalTestSNPsVCF = variantEvalTestDataRoot + "/" + "FundamentalsTest.annotated.db.subset.final.vcf"; // private static String fundamentalTestSNPsVCF = variantEvalTestDataRoot + "/" + "FundamentalsTest.annotated.db.subset.final.vcf";
private static String fundamentalTestSNPsOneSampleVCF = variantEvalTestDataRoot + "/" + "FundamentalsTest.annotated.db.subset.final.HG00625.vcf"; // private static String fundamentalTestSNPsOneSampleVCF = variantEvalTestDataRoot + "/" + "FundamentalsTest.annotated.db.subset.final.HG00625.vcf";
//
private static String cmdRoot = "-T VariantEval" + // private static String cmdRoot = "-T VariantEval" +
" -R " + b36KGReference; // " -R " + b36KGReference;
//
private static String root = cmdRoot + // private static String root = cmdRoot +
" -B:dbsnp,vcf " + GATKDataLocation + "dbsnp_132.b36.excluding_sites_after_129.vcf" + // " -B:dbsnp,vcf " + GATKDataLocation + "dbsnp_132.b36.excluding_sites_after_129.vcf" +
" -B:eval,VCF3 " + validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf" + // " -B:eval,VCF3 " + validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf" +
" -B:comp_genotypes,VCF3 " + validationDataLocation + "yri.trio.gatk.ug.head.vcf"; // " -B:comp_genotypes,VCF3 " + validationDataLocation + "yri.trio.gatk.ug.head.vcf";
//
private static String rootGZ = cmdRoot + // private static String rootGZ = cmdRoot +
" -B:dbsnp,vcf " + GATKDataLocation + "dbsnp_132.b36.excluding_sites_after_129.vcf" + // " -B:dbsnp,vcf " + GATKDataLocation + "dbsnp_132.b36.excluding_sites_after_129.vcf" +
" -B:eval,VCF3 " + validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf.gz" + // " -B:eval,VCF3 " + validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf.gz" +
" -B:comp_genotypes,VCF3 " + validationDataLocation + "yri.trio.gatk.ug.head.vcf.gz"; // " -B:comp_genotypes,VCF3 " + validationDataLocation + "yri.trio.gatk.ug.head.vcf.gz";
//
// TODO -- I can't seem to reindex this VCF using Tabix without it causing failures. Looking into it. [EB] // // TODO -- I can't seem to reindex this VCF using Tabix without it causing failures. Looking into it. [EB]
// private static String[] testsEnumerations = {root, rootGZ}; // // private static String[] testsEnumerations = {root, rootGZ};
private static String[] testsEnumerations = {root}; // private static String[] testsEnumerations = {root};
//
@Test // @Test
public void testFundamentalsCountVariantsSNPsAndIndels() { // public void testFundamentalsCountVariantsSNPsAndIndels() {
WalkerTestSpec spec = new WalkerTestSpec( // WalkerTestSpec spec = new WalkerTestSpec(
buildCommandLine( // buildCommandLine(
"-T VariantEval", // "-T VariantEval",
"-R " + b37KGReference, // "-R " + b37KGReference,
"-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf", // "-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf",
"-B:eval,VCF " + fundamentalTestVCF, // "-B:eval,VCF " + fundamentalTestVCF,
"-noEV", // "-noEV",
"-EV CountVariants", // "-EV CountVariants",
"-noST", // "-noST",
"-BTI eval", // "-BTI eval",
"-o %s" // "-o %s"
), // ),
1, // 1,
Arrays.asList("48b8417c1f8bd74ff7b9808580abd2a2") // Arrays.asList("48b8417c1f8bd74ff7b9808580abd2a2")
); // );
executeTest("testFundamentalsCountVariantsSNPsandIndels", spec); // executeTest("testFundamentalsCountVariantsSNPsandIndels", spec);
} // }
//
@Test // @Test
public void testFundamentalsCountVariantsSNPsAndIndelsWithNovelty() { // public void testFundamentalsCountVariantsSNPsAndIndelsWithNovelty() {
WalkerTestSpec spec = new WalkerTestSpec( // WalkerTestSpec spec = new WalkerTestSpec(
buildCommandLine( // buildCommandLine(
"-T VariantEval", // "-T VariantEval",
"-R " + b37KGReference, // "-R " + b37KGReference,
"-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf", // "-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf",
"-B:eval,VCF " + fundamentalTestVCF, // "-B:eval,VCF " + fundamentalTestVCF,
"-noEV", // "-noEV",
"-EV CountVariants", // "-EV CountVariants",
"-noST", // "-noST",
"-ST Novelty", // "-ST Novelty",
"-BTI eval", // "-BTI eval",
"-o %s" // "-o %s"
), // ),
1, // 1,
Arrays.asList("86d45ecefdf5849c55b3ca8f82a3d525") // Arrays.asList("86d45ecefdf5849c55b3ca8f82a3d525")
); // );
executeTest("testFundamentalsCountVariantsSNPsandIndelsWithNovelty", spec); // executeTest("testFundamentalsCountVariantsSNPsandIndelsWithNovelty", spec);
} // }
//
@Test // @Test
public void testFundamentalsCountVariantsSNPsAndIndelsWithNoveltyAndFilter() { // public void testFundamentalsCountVariantsSNPsAndIndelsWithNoveltyAndFilter() {
WalkerTestSpec spec = new WalkerTestSpec( // WalkerTestSpec spec = new WalkerTestSpec(
buildCommandLine( // buildCommandLine(
"-T VariantEval", // "-T VariantEval",
"-R " + b37KGReference, // "-R " + b37KGReference,
"-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf", // "-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf",
"-B:eval,VCF " + fundamentalTestVCF, // "-B:eval,VCF " + fundamentalTestVCF,
"-noEV", // "-noEV",
"-EV CountVariants", // "-EV CountVariants",
"-noST", // "-noST",
"-ST Novelty", // "-ST Novelty",
"-ST Filter", // "-ST Filter",
"-BTI eval", // "-BTI eval",
"-o %s" // "-o %s"
), // ),
1, // 1,
Arrays.asList("3d18901ec1766aa2e748eac913f5ddcd") // Arrays.asList("3d18901ec1766aa2e748eac913f5ddcd")
); // );
executeTest("testFundamentalsCountVariantsSNPsandIndelsWithNoveltyAndFilter", spec); // executeTest("testFundamentalsCountVariantsSNPsandIndelsWithNoveltyAndFilter", spec);
} // }
//
@Test // @Test
public void testFundamentalsCountVariantsSNPsAndIndelsWithCpG() { // public void testFundamentalsCountVariantsSNPsAndIndelsWithCpG() {
WalkerTestSpec spec = new WalkerTestSpec( // WalkerTestSpec spec = new WalkerTestSpec(
buildCommandLine( // buildCommandLine(
"-T VariantEval", // "-T VariantEval",
"-R " + b37KGReference, // "-R " + b37KGReference,
"-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf", // "-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf",
"-B:eval,VCF " + fundamentalTestVCF, // "-B:eval,VCF " + fundamentalTestVCF,
"-noEV", // "-noEV",
"-EV CountVariants", // "-EV CountVariants",
"-noST", // "-noST",
"-ST CpG", // "-ST CpG",
"-BTI eval", // "-BTI eval",
"-o %s" // "-o %s"
), // ),
1, // 1,
Arrays.asList("677fe398643e62a10d6739d36a720a12") // Arrays.asList("677fe398643e62a10d6739d36a720a12")
); // );
executeTest("testFundamentalsCountVariantsSNPsandIndelsWithCpG", spec); // executeTest("testFundamentalsCountVariantsSNPsandIndelsWithCpG", spec);
} // }
//
@Test // @Test
public void testFundamentalsCountVariantsSNPsAndIndelsWithFunctionalClasses() { // public void testFundamentalsCountVariantsSNPsAndIndelsWithFunctionalClasses() {
WalkerTestSpec spec = new WalkerTestSpec( // WalkerTestSpec spec = new WalkerTestSpec(
buildCommandLine( // buildCommandLine(
"-T VariantEval", // "-T VariantEval",
"-R " + b37KGReference, // "-R " + b37KGReference,
"-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf", // "-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf",
"-B:eval,VCF " + fundamentalTestVCF, // "-B:eval,VCF " + fundamentalTestVCF,
"-noEV", // "-noEV",
"-EV CountVariants", // "-EV CountVariants",
"-noST", // "-noST",
"-ST FunctionalClass", // "-ST FunctionalClass",
"-BTI eval", // "-BTI eval",
"-o %s" // "-o %s"
), // ),
1, // 1,
Arrays.asList("5fb44fd7cb00941c986a9941e43e44cd") // Arrays.asList("5fb44fd7cb00941c986a9941e43e44cd")
); // );
executeTest("testFundamentalsCountVariantsSNPsandIndelsWithFunctionalClass", spec); // executeTest("testFundamentalsCountVariantsSNPsandIndelsWithFunctionalClass", spec);
} // }
//
@Test // @Test
public void testFundamentalsCountVariantsSNPsAndIndelsWithDegeneracy() { // public void testFundamentalsCountVariantsSNPsAndIndelsWithDegeneracy() {
WalkerTestSpec spec = new WalkerTestSpec( // WalkerTestSpec spec = new WalkerTestSpec(
buildCommandLine( // buildCommandLine(
"-T VariantEval", // "-T VariantEval",
"-R " + b37KGReference, // "-R " + b37KGReference,
"-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf", // "-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf",
"-B:eval,VCF " + fundamentalTestVCF, // "-B:eval,VCF " + fundamentalTestVCF,
"-noEV", // "-noEV",
"-EV CountVariants", // "-EV CountVariants",
"-noST", // "-noST",
"-ST Degeneracy", // "-ST Degeneracy",
"-BTI eval", // "-BTI eval",
"-o %s" // "-o %s"
), // ),
1, // 1,
Arrays.asList("daaca7ef3b7313e5af217cbc6f37c9e2") // Arrays.asList("daaca7ef3b7313e5af217cbc6f37c9e2")
); // );
executeTest("testFundamentalsCountVariantsSNPsandIndelsWithDegeneracy", spec); // executeTest("testFundamentalsCountVariantsSNPsandIndelsWithDegeneracy", spec);
} // }
//
@Test // @Test
public void testFundamentalsCountVariantsSNPsAndIndelsWithSample() { // public void testFundamentalsCountVariantsSNPsAndIndelsWithSample() {
WalkerTestSpec spec = new WalkerTestSpec( // WalkerTestSpec spec = new WalkerTestSpec(
buildCommandLine( // buildCommandLine(
"-T VariantEval", // "-T VariantEval",
"-R " + b37KGReference, // "-R " + b37KGReference,
"-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf", // "-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf",
"-B:eval,VCF " + fundamentalTestVCF, // "-B:eval,VCF " + fundamentalTestVCF,
"-noEV", // "-noEV",
"-EV CountVariants", // "-EV CountVariants",
"-noST", // "-noST",
"-ST Sample", // "-ST Sample",
"-BTI eval", // "-BTI eval",
"-o %s" // "-o %s"
), // ),
1, // 1,
Arrays.asList("97c466f8ffd0fcf2c30ef08669d213d9") // Arrays.asList("97c466f8ffd0fcf2c30ef08669d213d9")
); // );
executeTest("testFundamentalsCountVariantsSNPsandIndelsWithSample", spec); // executeTest("testFundamentalsCountVariantsSNPsandIndelsWithSample", spec);
} // }
//
@Test // @Test
public void testFundamentalsCountVariantsSNPsAndIndelsWithJexlExpression() { // public void testFundamentalsCountVariantsSNPsAndIndelsWithJexlExpression() {
WalkerTestSpec spec = new WalkerTestSpec( // WalkerTestSpec spec = new WalkerTestSpec(
buildCommandLine( // buildCommandLine(
"-T VariantEval", // "-T VariantEval",
"-R " + b37KGReference, // "-R " + b37KGReference,
"-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf", // "-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf",
"-B:eval,VCF " + fundamentalTestVCF, // "-B:eval,VCF " + fundamentalTestVCF,
"-noEV", // "-noEV",
"-EV CountVariants", // "-EV CountVariants",
"-noST", // "-noST",
"-ST JexlExpression", // "-ST JexlExpression",
"-select 'DP < 20'", // "-select 'DP < 20'",
"-selectName DepthSelect", // "-selectName DepthSelect",
"-BTI eval", // "-BTI eval",
"-o %s" // "-o %s"
), // ),
1, // 1,
Arrays.asList("df8cdfcf3d0c2fc795812c6eae6a76f8") // Arrays.asList("df8cdfcf3d0c2fc795812c6eae6a76f8")
); // );
executeTest("testFundamentalsCountVariantsSNPsandIndelsWithJexlExpression", spec); // executeTest("testFundamentalsCountVariantsSNPsandIndelsWithJexlExpression", spec);
} // }
//
@Test // @Test
public void testFundamentalsCountVariantsSNPsAndIndelsWithMultipleJexlExpressions() { // public void testFundamentalsCountVariantsSNPsAndIndelsWithMultipleJexlExpressions() {
WalkerTestSpec spec = new WalkerTestSpec( // WalkerTestSpec spec = new WalkerTestSpec(
buildCommandLine( // buildCommandLine(
"-T VariantEval", // "-T VariantEval",
"-R " + b37KGReference, // "-R " + b37KGReference,
"-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf", // "-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf",
"-B:eval,VCF " + fundamentalTestVCF, // "-B:eval,VCF " + fundamentalTestVCF,
"-noEV", // "-noEV",
"-EV CountVariants", // "-EV CountVariants",
"-noST", // "-noST",
"-ST JexlExpression", // "-ST JexlExpression",
"-select 'DP < 20'", // "-select 'DP < 20'",
"-selectName DepthLt20", // "-selectName DepthLt20",
"-select 'DP > 20'", // "-select 'DP > 20'",
"-selectName DepthGt20", // "-selectName DepthGt20",
"-BTI eval", // "-BTI eval",
"-o %s" // "-o %s"
), // ),
1, // 1,
Arrays.asList("c7aed12265e2b2311d17a0cc8a29f6aa") // Arrays.asList("c7aed12265e2b2311d17a0cc8a29f6aa")
); // );
executeTest("testFundamentalsCountVariantsSNPsandIndelsWithMultipleJexlExpressions", spec); // executeTest("testFundamentalsCountVariantsSNPsandIndelsWithMultipleJexlExpressions", spec);
} // }
//
@Test // @Test
public void testFundamentalsCountVariantsNoCompRod() { // public void testFundamentalsCountVariantsNoCompRod() {
WalkerTestSpec spec = new WalkerTestSpec( // WalkerTestSpec spec = new WalkerTestSpec(
buildCommandLine( // buildCommandLine(
"-T VariantEval", // "-T VariantEval",
"-R " + b37KGReference, // "-R " + b37KGReference,
"-B:eval,VCF " + fundamentalTestVCF, // "-B:eval,VCF " + fundamentalTestVCF,
"-noEV", // "-noEV",
"-EV CountVariants", // "-EV CountVariants",
"-noST", // "-noST",
"-BTI eval", // "-BTI eval",
"-o %s" // "-o %s"
), // ),
1, // 1,
Arrays.asList("d44c8f44384189a09eea85a8e89d7299") // Arrays.asList("d44c8f44384189a09eea85a8e89d7299")
); // );
executeTest("testFundamentalsCountVariantsNoCompRod", spec); // executeTest("testFundamentalsCountVariantsNoCompRod", spec);
} // }
//
@Test // @Test
public void testSelect1() { // public void testSelect1() {
String extraArgs = "-L 1:1-10,000,000"; // String extraArgs = "-L 1:1-10,000,000";
for (String tests : testsEnumerations) { // for (String tests : testsEnumerations) {
WalkerTestSpec spec = new WalkerTestSpec(withSelect(tests, "DP < 50", "DP50") + " " + extraArgs + " -ST CpG -o %s", // WalkerTestSpec spec = new WalkerTestSpec(withSelect(tests, "DP < 50", "DP50") + " " + extraArgs + " -ST CpG -o %s",
1, Arrays.asList("96860dedea0fa6b46c07f46b847fea42")); // 1, Arrays.asList("96860dedea0fa6b46c07f46b847fea42"));
executeTestParallel("testSelect1", spec); // executeTestParallel("testSelect1", spec);
} // }
} // }
//
@Test // @Test
public void testVEGenotypeConcordance() { // public void testVEGenotypeConcordance() {
String vcfFile = "GenotypeConcordanceEval.vcf"; // String vcfFile = "GenotypeConcordanceEval.vcf";
//
WalkerTestSpec spec = new WalkerTestSpec(cmdRoot + " -ST CpG -B:eval,VCF3 " + validationDataLocation + vcfFile + " -B:comp,VCF3 " + validationDataLocation + "GenotypeConcordanceComp.vcf -noEV -EV GenotypeConcordance -o %s", // WalkerTestSpec spec = new WalkerTestSpec(cmdRoot + " -ST CpG -B:eval,VCF3 " + validationDataLocation + vcfFile + " -B:comp,VCF3 " + validationDataLocation + "GenotypeConcordanceComp.vcf -noEV -EV GenotypeConcordance -o %s",
1, // 1,
Arrays.asList("e4c981f7f5d78680c71310fc9be9a1c1")); // Arrays.asList("e4c981f7f5d78680c71310fc9be9a1c1"));
executeTestParallel("testVEGenotypeConcordance" + vcfFile, spec); // executeTestParallel("testVEGenotypeConcordance" + vcfFile, spec);
} // }
//
@Test // @Test
public void testCompVsEvalAC() { // public void testCompVsEvalAC() {
String extraArgs = "-T VariantEval -R "+b36KGReference+" -o %s -ST CpG -EV GenotypeConcordance -B:evalYRI,VCF3 " + validationDataLocation + "yri.trio.gatk.ug.very.few.lines.vcf -B:compYRI,VCF3 " + validationDataLocation + "yri.trio.gatk.fake.genotypes.ac.test.vcf"; // String extraArgs = "-T VariantEval -R "+b36KGReference+" -o %s -ST CpG -EV GenotypeConcordance -B:evalYRI,VCF3 " + validationDataLocation + "yri.trio.gatk.ug.very.few.lines.vcf -B:compYRI,VCF3 " + validationDataLocation + "yri.trio.gatk.fake.genotypes.ac.test.vcf";
WalkerTestSpec spec = new WalkerTestSpec(extraArgs,1,Arrays.asList("162daa5039e1965eb2423a8589339a69")); // WalkerTestSpec spec = new WalkerTestSpec(extraArgs,1,Arrays.asList("162daa5039e1965eb2423a8589339a69"));
executeTestParallel("testCompVsEvalAC",spec); // executeTestParallel("testCompVsEvalAC",spec);
} // }
//
private static String withSelect(String cmd, String select, String name) { // private static String withSelect(String cmd, String select, String name) {
return String.format("%s -select '%s' -selectName %s", cmd, select, name); // return String.format("%s -select '%s' -selectName %s", cmd, select, name);
} // }
//
@Test // @Test
public void testTranches() { // public void testTranches() {
String extraArgs = "-T VariantEval -R "+ hg18Reference +" -B:eval,vcf " + validationDataLocation + "GA2.WEx.cleaned.ug.snpfiltered.indelfiltered.optimized.vcf -o %s -EV TiTvVariantEvaluator -L chr1 -noEV -ST CpG -tf " + testDir + "tranches.6.txt"; // String extraArgs = "-T VariantEval -R "+ hg18Reference +" -B:eval,vcf " + validationDataLocation + "GA2.WEx.cleaned.ug.snpfiltered.indelfiltered.optimized.vcf -o %s -EV TiTvVariantEvaluator -L chr1 -noEV -ST CpG -tf " + testDir + "tranches.6.txt";
WalkerTestSpec spec = new WalkerTestSpec(extraArgs,1,Arrays.asList("90cd98044e754b80034a9f4e6d2c55b9")); // WalkerTestSpec spec = new WalkerTestSpec(extraArgs,1,Arrays.asList("90cd98044e754b80034a9f4e6d2c55b9"));
executeTestParallel("testTranches",spec); // executeTestParallel("testTranches",spec);
} // }
//
@Test // @Test
public void testCompOverlap() { // public void testCompOverlap() {
String extraArgs = "-T VariantEval -R " + b37KGReference + " -L " + validationDataLocation + "VariantEval/pacbio.hg19.intervals -B:comphapmap,vcf " + comparisonDataLocation + "Validated/HapMap/3.3/genotypes_r27_nr.b37_fwd.vcf -B:eval,vcf " + validationDataLocation + "VariantEval/pacbio.ts.recalibrated.vcf -noEV -EV CompOverlap -sn NA12878 -noST -ST Novelty -o %s"; // String extraArgs = "-T VariantEval -R " + b37KGReference + " -L " + validationDataLocation + "VariantEval/pacbio.hg19.intervals -B:comphapmap,vcf " + comparisonDataLocation + "Validated/HapMap/3.3/genotypes_r27_nr.b37_fwd.vcf -B:eval,vcf " + validationDataLocation + "VariantEval/pacbio.ts.recalibrated.vcf -noEV -EV CompOverlap -sn NA12878 -noST -ST Novelty -o %s";
WalkerTestSpec spec = new WalkerTestSpec(extraArgs,1,Arrays.asList("70aa420929de7f888a6f48c2d01bbcda")); // WalkerTestSpec spec = new WalkerTestSpec(extraArgs,1,Arrays.asList("70aa420929de7f888a6f48c2d01bbcda"));
executeTestParallel("testCompOverlap",spec); // executeTestParallel("testCompOverlap",spec);
} // }
//
@Test // @Test
public void testEvalTrackWithoutGenotypes() { // public void testEvalTrackWithoutGenotypes() {
String extraArgs = "-T VariantEval -R " + // String extraArgs = "-T VariantEval -R " +
b37KGReference + // b37KGReference +
" -L 20" + // " -L 20" +
" -B:dbsnp,vcf " + b37dbSNP132 + // " -B:dbsnp,vcf " + b37dbSNP132 +
" -B:evalBI,VCF " + validationDataLocation + "VariantEval/ALL.20100201.chr20.bi.sites.vcf" + // " -B:evalBI,VCF " + validationDataLocation + "VariantEval/ALL.20100201.chr20.bi.sites.vcf" +
" -noST -ST Novelty -o %s"; // " -noST -ST Novelty -o %s";
WalkerTestSpec spec = new WalkerTestSpec(extraArgs,1,Arrays.asList("58fdc6c42fade3007537bb99fb3ce738")); // WalkerTestSpec spec = new WalkerTestSpec(extraArgs,1,Arrays.asList("58fdc6c42fade3007537bb99fb3ce738"));
executeTestParallel("testEvalTrackWithoutGenotypes",spec); // executeTestParallel("testEvalTrackWithoutGenotypes",spec);
} // }
//
@Test // @Test
public void testMultipleEvalTracksWithoutGenotypes() { // public void testMultipleEvalTracksWithoutGenotypes() {
String extraArgs = "-T VariantEval -R " + b37KGReference + // String extraArgs = "-T VariantEval -R " + b37KGReference +
" -L 20" + // " -L 20" +
" -B:dbsnp,vcf " + b37dbSNP132 + // " -B:dbsnp,vcf " + b37dbSNP132 +
" -B:evalBI,VCF " + validationDataLocation + "VariantEval/ALL.20100201.chr20.bi.sites.vcf" + // " -B:evalBI,VCF " + validationDataLocation + "VariantEval/ALL.20100201.chr20.bi.sites.vcf" +
" -B:evalBC,VCF " + validationDataLocation + "VariantEval/ALL.20100201.chr20.bc.sites.vcf" + // " -B:evalBC,VCF " + validationDataLocation + "VariantEval/ALL.20100201.chr20.bc.sites.vcf" +
" -noST -ST Novelty -o %s"; // " -noST -ST Novelty -o %s";
WalkerTestSpec spec = new WalkerTestSpec(extraArgs,1,Arrays.asList("34df2815d27e5e62f1694731a7e7953c")); // WalkerTestSpec spec = new WalkerTestSpec(extraArgs,1,Arrays.asList("34df2815d27e5e62f1694731a7e7953c"));
executeTestParallel("testMultipleEvalTracksWithoutGenotypes",spec); // executeTestParallel("testMultipleEvalTracksWithoutGenotypes",spec);
} // }
//
@Test // @Test
public void testMultipleCompTracks() { // public void testMultipleCompTracks() {
String dbsnp = GATKDataLocation + "dbsnp_132_b37.vcf"; // String dbsnp = GATKDataLocation + "dbsnp_132_b37.vcf";
//
String extraArgs = "-T VariantEval" + // String extraArgs = "-T VariantEval" +
" -R " + b37KGReference + // " -R " + b37KGReference +
" -B:comp,VCF " + validationDataLocation + "/VariantEval/ALL.phase1.chr20.broad.snps.genotypes.subset.vcf" + // " -B:comp,VCF " + validationDataLocation + "/VariantEval/ALL.phase1.chr20.broad.snps.genotypes.subset.vcf" +
" -B:eval,VCF " + validationDataLocation + "/VariantEval/NA12878.hg19.HiSeq.WGS.cleaned.ug.snpfiltered.indelfiltered.optimized.cut.subset.vcf" + // " -B:eval,VCF " + validationDataLocation + "/VariantEval/NA12878.hg19.HiSeq.WGS.cleaned.ug.snpfiltered.indelfiltered.optimized.cut.subset.vcf" +
" -B:dbsnp,VCF " + dbsnp + // " -B:dbsnp,VCF " + dbsnp +
" -L 20:10000000-10100000" + // " -L 20:10000000-10100000" +
" -noST -noEV -ST Novelty -EV CompOverlap" + // " -noST -noEV -ST Novelty -EV CompOverlap" +
" -o %s"; // " -o %s";
//
WalkerTestSpec spec = new WalkerTestSpec(extraArgs,1,Arrays.asList("20332902ae36a84b2fd80405410815f1")); // WalkerTestSpec spec = new WalkerTestSpec(extraArgs,1,Arrays.asList("20332902ae36a84b2fd80405410815f1"));
executeTestParallel("testMultipleCompTracks",spec); // executeTestParallel("testMultipleCompTracks",spec);
} // }
//
@Test // @Test
public void testPerSampleAndSubsettedSampleHaveSameResults() { // public void testPerSampleAndSubsettedSampleHaveSameResults() {
String md5 = "9d61f6e2c8592dcf616712a2c587b2af"; // String md5 = "9d61f6e2c8592dcf616712a2c587b2af";
//
WalkerTestSpec spec = new WalkerTestSpec( // WalkerTestSpec spec = new WalkerTestSpec(
buildCommandLine( // buildCommandLine(
"-T VariantEval", // "-T VariantEval",
"-R " + b37KGReference, // "-R " + b37KGReference,
"-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf", // "-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf",
"-B:eval,VCF " + fundamentalTestSNPsVCF, // "-B:eval,VCF " + fundamentalTestSNPsVCF,
"-noEV", // "-noEV",
"-EV CompOverlap", // "-EV CompOverlap",
"-sn HG00625", // "-sn HG00625",
"-noST", // "-noST",
"-BTI eval", // "-BTI eval",
"-o %s" // "-o %s"
), // ),
1, // 1,
Arrays.asList(md5) // Arrays.asList(md5)
); // );
executeTestParallel("testPerSampleAndSubsettedSampleHaveSameResults-subset", spec); // executeTestParallel("testPerSampleAndSubsettedSampleHaveSameResults-subset", spec);
//
WalkerTestSpec spec2 = new WalkerTestSpec( // WalkerTestSpec spec2 = new WalkerTestSpec(
buildCommandLine( // buildCommandLine(
"-T VariantEval", // "-T VariantEval",
"-R " + b37KGReference, // "-R " + b37KGReference,
"-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf", // "-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf",
"-B:eval,VCF " + fundamentalTestSNPsOneSampleVCF, // "-B:eval,VCF " + fundamentalTestSNPsOneSampleVCF,
"-noEV", // "-noEV",
"-EV CompOverlap", // "-EV CompOverlap",
"-noST", // "-noST",
"-BTI eval", // "-BTI eval",
"-o %s" // "-o %s"
), // ),
1, // 1,
Arrays.asList(md5) // Arrays.asList(md5)
); // );
executeTestParallel("testPerSampleAndSubsettedSampleHaveSameResults-onesample", spec2); // executeTestParallel("testPerSampleAndSubsettedSampleHaveSameResults-onesample", spec2);
} // }
//
//
@Test // @Test
public void testAlleleCountStrat() { // public void testAlleleCountStrat() {
WalkerTestSpec spec = new WalkerTestSpec( // WalkerTestSpec spec = new WalkerTestSpec(
buildCommandLine( // buildCommandLine(
"-T VariantEval", // "-T VariantEval",
"-R " + b37KGReference, // "-R " + b37KGReference,
"-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf", // "-B:dbsnp,VCF " + GATKDataLocation + "dbsnp_132_b37.vcf",
"-B:eval,VCF " + fundamentalTestSNPsVCF, // "-B:eval,VCF " + fundamentalTestSNPsVCF,
"-noEV", // "-noEV",
"-EV CountVariants", // "-EV CountVariants",
"-noST", // "-noST",
"-ST AlleleCount", // "-ST AlleleCount",
"-BTI eval", // "-BTI eval",
"-o %s" // "-o %s"
), // ),
1, // 1,
Arrays.asList("bf324e4c87fe0d21170fcd2a67a20371") // Arrays.asList("bf324e4c87fe0d21170fcd2a67a20371")
); // );
executeTest("testAlleleCountStrat", spec); // executeTest("testAlleleCountStrat", spec);
} // }
} //}

View File

@ -38,7 +38,7 @@ public class LeftAlignVariantsIntegrationTest extends WalkerTest {
@Test @Test
public void testLeftAlignment() { public void testLeftAlignment() {
WalkerTestSpec spec = new WalkerTestSpec( WalkerTestSpec spec = new WalkerTestSpec(
"-T LeftAlignVariants -o %s -R " + b37KGReference + " -B:variant,vcf " + validationDataLocation + "forLeftAlignVariantsTest.vcf -NO_HEADER", "-T LeftAlignVariants -o %s -R " + b37KGReference + " --variant:vcf " + validationDataLocation + "forLeftAlignVariantsTest.vcf -NO_HEADER",
1, 1,
Arrays.asList("158b1d71b28c52e2789f164500b53732")); Arrays.asList("158b1d71b28c52e2789f164500b53732"));
executeTest("test left alignment", spec); executeTest("test left alignment", spec);