Search in sources :

Example 16 with IntegrationTestSpec

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

the class SelectVariantsIntegrationTest method testRepeatedLineSelectionAndExludeFiltered.

@Test
public void testRepeatedLineSelectionAndExludeFiltered() throws IOException {
    final String testFile = getToolTestDataDir() + "test.dup.vcf";
    final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString(" -sn A -sn B -sn C -ef ", testFile), Collections.singletonList(getToolTestDataDir() + "expected/" + "testSelectVariants_RepeatedLineSelection.vcf"));
    spec.executeTest("testRepeatedLineSelection--" + 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 17 with IntegrationTestSpec

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

the class SelectVariantsIntegrationTest method testSampleInclusionWithNonexistingSamples.

/**
     * Test including samples that are not in the VCF
     */
@Test
public void testSampleInclusionWithNonexistingSamples() throws IOException {
    final String testFile = getToolTestDataDir() + "vcfexample2.vcf";
    final String samplesFile = getToolTestDataDir() + "samples.list";
    final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString(" -sn A -sn Z -sn Q -sn " + samplesFile, testFile), 1, UserException.BadInput.class);
    spec.executeTest("testSampleInclusionWithNonexistingSamples--" + testFile, this);
}
Also used : IntegrationTestSpec(org.broadinstitute.hellbender.utils.test.IntegrationTestSpec) UserException(org.broadinstitute.hellbender.exceptions.UserException) BaseTest(org.broadinstitute.hellbender.utils.test.BaseTest) Test(org.testng.annotations.Test) CommandLineProgramTest(org.broadinstitute.hellbender.CommandLineProgramTest)

Example 18 with IntegrationTestSpec

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

the class SelectVariantsIntegrationTest method testSACNonDiploid.

@Test
public void testSACNonDiploid() throws IOException {
    final String testFile = getToolTestDataDir() + "tetraploid-multisample-sac.g.vcf";
    final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString(" -sn NA12891 -trimAlternates", testFile), Collections.singletonList(getToolTestDataDir() + "expected/" + "testSelectVariants_SACNonDiploid.vcf"));
    spec.executeTest("testSACNonDiploid" + 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 19 with IntegrationTestSpec

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

the class SelectVariantsIntegrationTest method testMinFilteredGenotypesSelection.

@Test
public void testMinFilteredGenotypesSelection() throws IOException {
    final String testFile = getToolTestDataDir() + "filteredSamples.vcf";
    final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString(" --minFilteredGenotypes 2 ", testFile), Collections.singletonList(getToolTestDataDir() + "expected/" + "testSelectVariants_MinFilteredGenotypesSelection.vcf"));
    spec.executeTest("testMinFilteredGenotypesSelection--" + 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 20 with IntegrationTestSpec

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

the class SelectVariantsIntegrationTest method testExcludeSelectionIDFromFile.

/**
     * Test excluding variants with rsIDs from a file
     */
@Test
public void testExcludeSelectionIDFromFile() throws IOException {
    final String testFile = getToolTestDataDir() + "complexExample1.vcf";
    final String idFile = getToolTestDataDir() + "complexExample1.vcf.id.list";
    final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString(" -xlIDs " + idFile, testFile), Collections.singletonList(getToolTestDataDir() + "expected/" + "testSelectVariants_ExcludeSelectionID.vcf"));
    spec.executeTest("testExcludeSelectionIDFile--" + 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