-Seperating out normal (unit) tests and integration tests. From now on if your test are more of an integration test (i.e. you're testing a walker and all the subunits it relies on) please name the test "______IntegrationTest.java" instead of "______Test.java".
-Bamboo will now run the integration tests once a day, and the normal units tests on each check-in. -Also added a bunch of unit tests for VariantEval walker git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1555 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
eeb9b6eb13
commit
0df6a9da5c
23
build.xml
23
build.xml
|
|
@ -249,6 +249,29 @@
|
||||||
<fileset dir="${test.classes}">
|
<fileset dir="${test.classes}">
|
||||||
<include name="**/${single}.class"/>
|
<include name="**/${single}.class"/>
|
||||||
<exclude name="**/BaseTest.class"/>
|
<exclude name="**/BaseTest.class"/>
|
||||||
|
<exclude name="**/*IntegrationTest.class"/>
|
||||||
|
</fileset>
|
||||||
|
</batchtest>
|
||||||
|
</junit>
|
||||||
|
<fail message="test failed" if="test.failure" />
|
||||||
|
</target>
|
||||||
|
<!-- Our long tests, tests that are more software integration and test -->
|
||||||
|
<target name="integrationtest" depends="test.compile"
|
||||||
|
description="Run the long integration unit tests">
|
||||||
|
<mkdir dir="${report}"/>
|
||||||
|
<echo message="Sting: Running integration test cases!"/>
|
||||||
|
<junit printsummary="yes" showoutput="yes" clonevm="yes" haltonfailure="yes" failureProperty="test.failure">
|
||||||
|
<formatter type="${testOutput}" usefile="${usefile}" />
|
||||||
|
<classpath>
|
||||||
|
<path refid="runtime.dependencies"/>
|
||||||
|
<pathelement location="build"/>
|
||||||
|
<pathelement location="${test.classes}"/>
|
||||||
|
<pathelement location="lib/junit-4.4.jar"/>
|
||||||
|
</classpath>
|
||||||
|
|
||||||
|
<batchtest fork="yes" todir="${report}">
|
||||||
|
<fileset dir="${test.classes}">
|
||||||
|
<include name="**/*IntegrationTest.class"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
</junit>
|
</junit>
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,14 @@
|
||||||
package org.broadinstitute.sting.gatk.walkers.genotyper;
|
package org.broadinstitute.sting.gatk.walkers.genotyper;
|
||||||
|
|
||||||
import org.broadinstitute.sting.BaseTest;
|
|
||||||
import org.broadinstitute.sting.WalkerTest;
|
import org.broadinstitute.sting.WalkerTest;
|
||||||
import org.broadinstitute.sting.utils.genotype.Variant;
|
|
||||||
import org.broadinstitute.sting.utils.genotype.GenotypeWriterFactory;
|
|
||||||
import org.broadinstitute.sting.utils.cmdLine.Argument;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.broadinstitute.sting.gatk.GATKArgumentCollection;
|
|
||||||
import org.broadinstitute.sting.gatk.GenomeAnalysisEngine;
|
|
||||||
import org.broadinstitute.sting.gatk.executive.Accumulator;
|
|
||||||
|
|
||||||
import java.io.*;
|
import java.util.Arrays;
|
||||||
import java.util.*;
|
import java.util.HashMap;
|
||||||
import java.security.MessageDigest;
|
import java.util.List;
|
||||||
import java.math.BigInteger;
|
import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.Assert;
|
public class SingleSampleGenotyperIntegrationTest extends WalkerTest {
|
||||||
|
|
||||||
public class SingleSampleGenotyperTest extends WalkerTest {
|
|
||||||
public static String baseTestString() {
|
public static String baseTestString() {
|
||||||
return "-T SingleSampleGenotyper -R /broad/1KG/reference/human_b36_both.fasta -I /humgen/gsa-scr1/GATK_Data/Validation_Data/NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -varout %s";
|
return "-T SingleSampleGenotyper -R /broad/1KG/reference/human_b36_both.fasta -I /humgen/gsa-scr1/GATK_Data/Validation_Data/NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -varout %s";
|
||||||
}
|
}
|
||||||
|
|
@ -5,7 +5,7 @@ import org.junit.Test;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
public class IntervalsTest extends WalkerTest {
|
public class IntervalsIntegrationTest extends WalkerTest {
|
||||||
@Test
|
@Test
|
||||||
public void testIntervals() {
|
public void testIntervals() {
|
||||||
|
|
||||||
|
|
@ -9,7 +9,7 @@ import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
public class RecalibrationWalkersTest extends WalkerTest {
|
public class RecalibrationWalkersIntegrationTest extends WalkerTest {
|
||||||
static HashMap<String, String> paramsFiles = new HashMap<String, String>();
|
static HashMap<String, String> paramsFiles = new HashMap<String, String>();
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
@ -0,0 +1,148 @@
|
||||||
|
package org.broadinstitute.sting.playground.gatk.walkers.varianteval;
|
||||||
|
|
||||||
|
import org.broadinstitute.sting.WalkerTest;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author aaron
|
||||||
|
* <p/>
|
||||||
|
* Class VariantEvalWalkerTest
|
||||||
|
* <p/>
|
||||||
|
* test out the variant eval walker under different runtime conditions.
|
||||||
|
*/
|
||||||
|
public class VariantEvalWalkerIntegrationTest extends WalkerTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEvalVariantROD() {
|
||||||
|
List<String> md5 = new ArrayList<String>();
|
||||||
|
md5.add("094c0adb8e4ae4de424f26482fd43152");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the above MD5 was calculated from running the following command:
|
||||||
|
*
|
||||||
|
* java -jar ./dist/GenomeAnalysisTK.jar \
|
||||||
|
* -R /broad/1KG/reference/human_b36_both.fasta \
|
||||||
|
* -T VariantEval \
|
||||||
|
* --DBSNP /humgen/gsa-scr1/GATK_Data/dbsnp_129_b36.rod \
|
||||||
|
* -L 1:10,000,000-11,000,000 \
|
||||||
|
* --outerr myVariantEval \
|
||||||
|
* --supressDateInformation \
|
||||||
|
* --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();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEvalVariantRODConfSix() {
|
||||||
|
List<String> md5 = new ArrayList<String>();
|
||||||
|
md5.add("eb8716965fa1df93954c5a22b0aeda7c");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the above MD5 was calculated from running the following command:
|
||||||
|
*
|
||||||
|
* java -jar ./dist/GenomeAnalysisTK.jar \
|
||||||
|
* -R /broad/1KG/reference/human_b36_both.fasta \
|
||||||
|
* -T VariantEval \
|
||||||
|
* --DBSNP /humgen/gsa-scr1/GATK_Data/dbsnp_129_b36.rod \
|
||||||
|
* -L 1:10,000,000-11,000,000 \
|
||||||
|
* --outerr myVariantEval \
|
||||||
|
* --supressDateInformation \
|
||||||
|
* --rodBind eval,Variants,/humgen/gsa-scr1/GATK_Data/Validation_Data/NA12878.1kg.p2.chr1_10mb_11_mb.SLX.lod5.variants.geli.calls \
|
||||||
|
* -minConfidenceScore 6
|
||||||
|
*/
|
||||||
|
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" +
|
||||||
|
" -minConfidenceScore 6",
|
||||||
|
1, // just one output file
|
||||||
|
md5);
|
||||||
|
List<File> result = executeTest("testEvalVariantRODConfSix", spec).getFirst();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEvalVariantRODOutputViolations() {
|
||||||
|
List<String> md5 = new ArrayList<String>();
|
||||||
|
md5.add("9449cfb668f5175013161d2f287c30ff");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the above MD5 was calculated from running the following command:
|
||||||
|
*
|
||||||
|
* java -jar ./dist/GenomeAnalysisTK.jar \
|
||||||
|
* -R /broad/1KG/reference/human_b36_both.fasta \
|
||||||
|
* -T VariantEval \
|
||||||
|
* --DBSNP /humgen/gsa-scr1/GATK_Data/dbsnp_129_b36.rod \
|
||||||
|
* -L 1:10,000,000-11,000,000 \
|
||||||
|
* --outerr myVariantEval \
|
||||||
|
* --supressDateInformation \
|
||||||
|
* --rodBind eval,Variants,/humgen/gsa-scr1/GATK_Data/Validation_Data/NA12878.1kg.p2.chr1_10mb_11_mb.SLX.lod5.variants.geli.calls \
|
||||||
|
* --includeViolations
|
||||||
|
*/
|
||||||
|
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" +
|
||||||
|
" --includeViolations",
|
||||||
|
1, // just one output file
|
||||||
|
md5);
|
||||||
|
List<File> result = executeTest("testEvalVariantRODOutputViolations", spec).getFirst();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEvalGenotypeROD() {
|
||||||
|
List<String> md5 = new ArrayList<String>();
|
||||||
|
md5.add("ff2bf8987e288198b28201b5c3121c0e");
|
||||||
|
/**
|
||||||
|
* the above MD5 was calculated after running the following command:
|
||||||
|
*
|
||||||
|
* java -jar ./dist/GenomeAnalysisTK.jar \
|
||||||
|
* -R /broad/1KG/reference/human_b36_both.fasta \
|
||||||
|
* -T VariantEval \
|
||||||
|
* --DBSNP /humgen/gsa-scr1/GATK_Data/dbsnp_129_b36.rod \
|
||||||
|
* -L 1:10,000,000-11,000,000 \
|
||||||
|
* --outerr myVariantEval \
|
||||||
|
* --supressDateInformation \
|
||||||
|
* --evalContainsGenotypes \
|
||||||
|
* --rodBind eval,Variants,/humgen/gsa-scr1/GATK_Data/Validation_Data/NA12878.1kg.p2.chr1_10mb_11_mb.SLX.lod5.genotypes.geli.calls \
|
||||||
|
* --rodBind hapmap-chip,GFF,/humgen/gsa-scr1/GATK_Data/1KG_gffs/NA12878.1kg.gff
|
||||||
|
*/
|
||||||
|
|
||||||
|
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.genotypes.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" +
|
||||||
|
" --evalContainsGenotypes" +
|
||||||
|
" --rodBind hapmap-chip,GFF,/humgen/gsa-scr1/GATK_Data/1KG_gffs/NA12878.1kg.gff",
|
||||||
|
1, // just one output file
|
||||||
|
md5);
|
||||||
|
List<File> result = executeTest("testEvalGenotypeROD", spec).getFirst();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
package org.broadinstitute.sting.playground.gatk.walkers.varianteval;
|
|
||||||
|
|
||||||
import org.broadinstitute.sting.WalkerTest;
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author aaron
|
|
||||||
* <p/>
|
|
||||||
* Class VariantEvalWalkerTest
|
|
||||||
* <p/>
|
|
||||||
* test out the variant eval walker under a bunch of different runtime conditions.
|
|
||||||
*/
|
|
||||||
public class VariantEvalWalkerTest extends WalkerTest {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void emptyTest() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testEvalVariantROD() {
|
|
||||||
List <String> md5 = new ArrayList<String>();
|
|
||||||
md5.add("094c0adb8e4ae4de424f26482fd43152");
|
|
||||||
|
|
||||||
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();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue