Search in sources :

Example 6 with IntegrationTestSpec

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

the class BaseRecalibratorIntegrationTest method testBQSRFailWithIncompatibleReference.

@Test
public void testBQSRFailWithIncompatibleReference() throws IOException {
    final String resourceDir = getTestDataDir() + "/" + "BQSR" + "/";
    final String HiSeqBam_Hg18 = resourceDir + "HiSeq.1mb.1RG.2k_lines.bam";
    final String NO_ARGS = "";
    final BQSRTest params = new BQSRTest(hg19MiniReference, HiSeqBam_Hg18, hg19_chr1_1M_dbSNP, NO_ARGS, resourceDir + "expected.txt");
    IntegrationTestSpec spec = new IntegrationTestSpec(params.getCommandLine(), 1, UserException.IncompatibleSequenceDictionaries.class);
    spec.executeTest("testBQSRFailWithIncompatibleReference", this);
}
Also used : IntegrationTestSpec(org.broadinstitute.hellbender.utils.test.IntegrationTestSpec) UserException(org.broadinstitute.hellbender.exceptions.UserException) Test(org.testng.annotations.Test) CommandLineProgramTest(org.broadinstitute.hellbender.CommandLineProgramTest)

Example 7 with IntegrationTestSpec

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

the class SelectVariantsIntegrationTest method testKeepOriginalAC.

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

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

the class SelectVariantsIntegrationTest method testMaxFilteredGenotypesSelection.

@Test
public void testMaxFilteredGenotypesSelection() throws IOException {
    final String testFile = getToolTestDataDir() + "filteredSamples.vcf";
    final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString(" --maxFilteredGenotypes 1 ", testFile), Collections.singletonList(getToolTestDataDir() + "expected/" + "testSelectVariants_MaxFilteredGenotypesSelection.vcf"));
    spec.executeTest("testMaxFilteredGenotypesSelection--" + 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 9 with IntegrationTestSpec

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

the class CalculateGenotypePosteriorsIntegrationTest method testFamilyPriors.

@Test
public void testFamilyPriors() throws IOException {
    final IntegrationTestSpec spec = new IntegrationTestSpec("-useACoff" + " -O %s" + " -ped " + CEUtrioFamilyFile + " -V " + CEUtrioTest + " -supporting " + CEUtrioPopPriorsTest + " -addOutputVCFCommandLine false", Collections.singletonList(dir + "expectedCGP_testFamilyPriors_chr1.vcf"));
    spec.executeTest("testFamilyPriors", this);
}
Also used : IntegrationTestSpec(org.broadinstitute.hellbender.utils.test.IntegrationTestSpec) Test(org.testng.annotations.Test) CommandLineProgramTest(org.broadinstitute.hellbender.CommandLineProgramTest)

Example 10 with IntegrationTestSpec

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

the class CalculateGenotypePosteriorsIntegrationTest method testUsingDiscoveredAF.

@Test
public //use the first 20 variants to save time; they have a nice range of AC from 4 to over 4000
void testUsingDiscoveredAF() throws IOException {
    final IntegrationTestSpec spec = new IntegrationTestSpec(" -O %s" + " -R " + //NOTE: we need a reference for -L
    b37_reference_20_21 + " -L 20:10,000,000-10,001,432" + " -V " + largeDir + "1000G.phase3.broad.withGenotypes.chr20.10100000.vcf" + " -addOutputVCFCommandLine false", Collections.singletonList(largeDir + "CalculateGenotypePosteriors/expectedCGP_testUsingDiscoveredAF.vcf"));
    spec.executeTest("testUsingDiscoveredAF", 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