Search in sources :

Example 11 with IntegrationTestSpec

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

the class SelectVariantsIntegrationTest method testSampleExclusionFromFileAndSeparateSample.

/**
     * Test excluding samples from file and sample name
     */
@Test
public void testSampleExclusionFromFileAndSeparateSample() throws IOException {
    final String testFile = getToolTestDataDir() + "vcfexample2.vcf";
    final String samplesFile = getToolTestDataDir() + "samples.list";
    final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString(" -xl_sn NA11894 -xl_sn " + samplesFile, testFile), Collections.singletonList(getToolTestDataDir() + "expected/" + "testSelectVariants_SampleExclusionFromFileAndSeparateSample.vcf"));
    spec.executeTest("testSampleExclusionFromFileAndSeparateSample--" + 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 12 with IntegrationTestSpec

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

the class SelectVariantsIntegrationTest method testKeepOriginalACAndENV.

@Test
public void testKeepOriginalACAndENV() throws IOException {
    final String testFile = getToolTestDataDir() + "vcfexample.loseAlleleInSelection.vcf";
    final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString(" --keepOriginalAC -sn NA12892 -env -trimAlternates ", testFile), Collections.singletonList(getToolTestDataDir() + "expected/" + "testSelectVariants_KeepOriginalACAndENV.vcf"));
    spec.executeTest("testKeepOriginalACAndENV--" + 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 13 with IntegrationTestSpec

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

the class SelectVariantsIntegrationTest method testHaploid.

@Test
public void testHaploid() throws IOException {
    final String testFile = getToolTestDataDir() + "haploid-multisample.vcf";
    final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString(" -sn HG00610 -select 'DP > 7' -trimAlternates ", testFile), Collections.singletonList(getToolTestDataDir() + "expected/" + "testSelectVariants_Haploid.vcf"));
    spec.executeTest("testHaploid--" + 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 14 with IntegrationTestSpec

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

the class SelectVariantsIntegrationTest method testRemoveMLE.

@Test
public void testRemoveMLE() throws IOException {
    final String testFile = getToolTestDataDir() + "vcfexample.withMLE.vcf";
    final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString(" -sn NA12892 ", testFile), Collections.singletonList(getToolTestDataDir() + "expected/" + "testSelectVariants_RemoveMLE.vcf"));
    spec.executeTest("testRemoveMLE--" + 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 15 with IntegrationTestSpec

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

the class SelectVariantsIntegrationTest method testMinIndelLengthSelection.

/**
     * Test excluding indels that are smaller than the specified size
     */
@Test
public void testMinIndelLengthSelection() throws IOException {
    final String testFile = getToolTestDataDir() + "complexExample1.vcf";
    final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString(" -selectType INDEL --minIndelSize 2 ", testFile), Collections.singletonList(getToolTestDataDir() + "expected/" + "testSelectVariants_MinIndelLengthSelection.vcf"));
    spec.executeTest("testMinIndelLengthSelection--" + 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