Search in sources :

Example 71 with IntegrationTestSpec

use of org.broadinstitute.hellbender.utils.test.IntegrationTestSpec in project gatk by broadinstitute.

the class PrintReadsSparkIntegrationTest method testReadFiltering_asIntegrationTestSpec.

@Test(groups = "spark")
public void testReadFiltering_asIntegrationTestSpec() throws IOException {
    final File samWithOneMalformedRead = new File(getTestDataDir(), "print_reads_one_malformed_read.sam");
    final IntegrationTestSpec spec = new IntegrationTestSpec(" --" + StandardArgumentDefinitions.INPUT_LONG_NAME + " " + samWithOneMalformedRead.getCanonicalPath() + " --" + StandardArgumentDefinitions.OUTPUT_LONG_NAME + " " + "%s", Arrays.asList(new File(getTestDataDir(), "expected.print_reads_one_malformed_read.bam").getCanonicalPath()));
    spec.executeTest("testReadFiltering_asIntegrationTestSpec", this);
}
Also used : IntegrationTestSpec(org.broadinstitute.hellbender.utils.test.IntegrationTestSpec) File(java.io.File) BaseTest(org.broadinstitute.hellbender.utils.test.BaseTest) Test(org.testng.annotations.Test) CommandLineProgramTest(org.broadinstitute.hellbender.CommandLineProgramTest)

Example 72 with IntegrationTestSpec

use of org.broadinstitute.hellbender.utils.test.IntegrationTestSpec in project gatk by broadinstitute.

the class VariantFiltrationIntegrationTest method testFilter2.

@Test
public void testFilter2() throws IOException {
    final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString("vcfexample2.vcf", " -filter 'AlleleBalance < 70.0 && FisherStrand == 1.4' -filterName bar "), Arrays.asList(getToolTestDataDir() + "expected/" + "testVariantFiltration_testFilter2.vcf"));
    spec.executeTest("testFilter2", this);
}
Also used : IntegrationTestSpec(org.broadinstitute.hellbender.utils.test.IntegrationTestSpec) Test(org.testng.annotations.Test) CommandLineProgramTest(org.broadinstitute.hellbender.CommandLineProgramTest)

Example 73 with IntegrationTestSpec

use of org.broadinstitute.hellbender.utils.test.IntegrationTestSpec in project gatk by broadinstitute.

the class VariantFiltrationIntegrationTest method testClusteredSnps.

@Test
public void testClusteredSnps() throws IOException {
    final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString("vcfexample2.vcf", " -window 10 "), Arrays.asList(getToolTestDataDir() + "expected/" + "testVariantFiltration_testClusteredSnps.vcf"));
    spec.executeTest("testClusteredSnps", this);
}
Also used : IntegrationTestSpec(org.broadinstitute.hellbender.utils.test.IntegrationTestSpec) Test(org.testng.annotations.Test) CommandLineProgramTest(org.broadinstitute.hellbender.CommandLineProgramTest)

Example 74 with IntegrationTestSpec

use of org.broadinstitute.hellbender.utils.test.IntegrationTestSpec in project gatk by broadinstitute.

the class VariantFiltrationIntegrationTest method testInvertJexlFilter.

@Test
public void testInvertJexlFilter() throws IOException {
    //Note: the "invert" in the name refers to the logic being the opposite of testFilterWithSeparateNames (and same as testInvertFilter)
    //Note: Output differs from testInvertFilter because FILTER description uses the -genotypeFilterExpression argument
    final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString("vcfexample2.vcf", " --filterName ABF -filter 'AlleleBalance >= 0.7' --filterName FSF -filter 'FisherStrand != 1.4' "), Arrays.asList(getToolTestDataDir() + "expected/" + "testVariantFiltration_testInvertJexlFilter.vcf"));
    spec.executeTest("testInvertJexlFilter", this);
}
Also used : IntegrationTestSpec(org.broadinstitute.hellbender.utils.test.IntegrationTestSpec) Test(org.testng.annotations.Test) CommandLineProgramTest(org.broadinstitute.hellbender.CommandLineProgramTest)

Example 75 with IntegrationTestSpec

use of org.broadinstitute.hellbender.utils.test.IntegrationTestSpec in project gatk by broadinstitute.

the class VariantFiltrationIntegrationTest method testFilteringZfromFORMATAndFailMissing.

// Same comment as above.
@Test
public void testFilteringZfromFORMATAndFailMissing() throws IOException {
    final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString("filteringZInFormatWithMissing.vcf", " --missingValuesInExpressionsShouldEvaluateAsFailing --genotypeFilterExpression 'Z < 10' --genotypeFilterName lowZ "), Arrays.asList(getToolTestDataDir() + "expected/" + "testVariantFiltration_testFilteringZfromFORMATAndFailMissing.vcf"));
    spec.executeTest("testFilteringZfromFORMATAndFailMissing", this);
}
Also used : IntegrationTestSpec(org.broadinstitute.hellbender.utils.test.IntegrationTestSpec) Test(org.testng.annotations.Test) CommandLineProgramTest(org.broadinstitute.hellbender.CommandLineProgramTest)

Aggregations

IntegrationTestSpec (org.broadinstitute.hellbender.utils.test.IntegrationTestSpec)201 CommandLineProgramTest (org.broadinstitute.hellbender.CommandLineProgramTest)200 Test (org.testng.annotations.Test)200 BaseTest (org.broadinstitute.hellbender.utils.test.BaseTest)80 UserException (org.broadinstitute.hellbender.exceptions.UserException)25 ArgumentsBuilder (org.broadinstitute.hellbender.utils.test.ArgumentsBuilder)14 File (java.io.File)10 Configuration (org.apache.hadoop.conf.Configuration)2 org.apache.hadoop.fs (org.apache.hadoop.fs)2 MiniDFSCluster (org.apache.hadoop.hdfs.MiniDFSCluster)2 SimpleInterval (org.broadinstitute.hellbender.utils.SimpleInterval)2 Path (org.apache.hadoop.fs.Path)1