Search in sources :

Example 31 with IntegrationTestSpec

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

the class SelectVariantsIntegrationTest method testComplexSelection.

@Test
public void testComplexSelection() throws IOException {
    final String testFile = getToolTestDataDir() + "vcfexample2.vcf";
    final String samplesFile = getToolTestDataDir() + "samples.list";
    final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString(" -sn NA11894 -se 'NA069*' -sn " + samplesFile + " -select 'RMSMAPQ < 170.0'", testFile), Collections.singletonList(getToolTestDataDir() + "expected/" + "testSelectVariants_ComplexSelection.vcf"));
    spec.executeTest("testComplexSelection--" + testFile, this);
}
Also used : IntegrationTestSpec(org.broadinstitute.hellbender.utils.test.IntegrationTestSpec) BaseTest(org.broadinstitute.hellbender.utils.test.BaseTest) Test(org.testng.annotations.Test) CommandLineProgramTest(org.broadinstitute.hellbender.CommandLineProgramTest)

Example 32 with IntegrationTestSpec

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

the class SelectVariantsIntegrationTest method testKeepSelectionIDLiteral.

/**
     * Test selecting variants with literal rsIDs
     */
@Test
public void testKeepSelectionIDLiteral() throws IOException {
    final String testFile = getToolTestDataDir() + "complexExample1.vcf";
    final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString(" -IDs testid1", testFile), Collections.singletonList(getToolTestDataDir() + "expected/" + "testSelectVariants_KeepSelectionID.vcf"));
    spec.executeTest("testKeepSelectionIDLiteral--" + testFile, this);
}
Also used : IntegrationTestSpec(org.broadinstitute.hellbender.utils.test.IntegrationTestSpec) BaseTest(org.broadinstitute.hellbender.utils.test.BaseTest) Test(org.testng.annotations.Test) CommandLineProgramTest(org.broadinstitute.hellbender.CommandLineProgramTest)

Example 33 with IntegrationTestSpec

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

the class SelectVariantsIntegrationTest method testMaxNoCall0_25.

@Test
public void testMaxNoCall0_25() throws IOException {
    final String testFile = getToolTestDataDir() + "vcfexample.forNoCallFiltering.vcf";
    final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString(" --maxNOCALLfraction 0.25", testFile), Collections.singletonList(getToolTestDataDir() + "expected/" + "testSelectVariants_maxNOCALLnumber1.vcf"));
    spec.executeTest("testMaxNoCall0_25--" + testFile, this);
}
Also used : IntegrationTestSpec(org.broadinstitute.hellbender.utils.test.IntegrationTestSpec) BaseTest(org.broadinstitute.hellbender.utils.test.BaseTest) Test(org.testng.annotations.Test) CommandLineProgramTest(org.broadinstitute.hellbender.CommandLineProgramTest)

Example 34 with IntegrationTestSpec

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

the class SelectVariantsIntegrationTest method testExcludeSelectionIDLiteral.

/**
     * Test excluding variants with literal rsIDs
     */
@Test
public void testExcludeSelectionIDLiteral() throws IOException {
    final String testFile = getToolTestDataDir() + "complexExample1.vcf";
    final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString(" -xlIDs testid1", testFile), Collections.singletonList(getToolTestDataDir() + "expected/" + "testSelectVariants_ExcludeSelectionID.vcf"));
    spec.executeTest("testExcludeSelectionIDLiteral--" + testFile, this);
}
Also used : IntegrationTestSpec(org.broadinstitute.hellbender.utils.test.IntegrationTestSpec) BaseTest(org.broadinstitute.hellbender.utils.test.BaseTest) Test(org.testng.annotations.Test) CommandLineProgramTest(org.broadinstitute.hellbender.CommandLineProgramTest)

Example 35 with IntegrationTestSpec

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

the class SelectVariantsIntegrationTest method testMultipleRecordsAtOnePosition.

@Test
public void testMultipleRecordsAtOnePosition() throws IOException {
    final String testFile = getToolTestDataDir() + "selectVariants.onePosition.vcf";
    final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString(" -select 'KG_FREQ < 0.5' ", testFile), Collections.singletonList(getToolTestDataDir() + "expected/" + "testSelectVariants_MultipleRecordsAtOnePosition.vcf"));
    spec.executeTest("testMultipleRecordsAtOnePosition--" + testFile, this);
}
Also used : IntegrationTestSpec(org.broadinstitute.hellbender.utils.test.IntegrationTestSpec) BaseTest(org.broadinstitute.hellbender.utils.test.BaseTest) 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