Search in sources :

Example 66 with IntegrationTestSpec

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

the class ASEReadCounterIntegrationTest method testASEReadCounterWithHighMQ.

@Test
public void testASEReadCounterWithHighMQ() throws Exception {
    IntegrationTestSpec spec = new IntegrationTestSpec("-R " + b37_reference_20_21 + " -I " + largeFileTestDir + "NA12878.RNAseq.bam -V " + aseTestDir + "NA12878.chr20_2444518_2637800.RNAseq.SYNONYMOUS_CODING.vcf -O %s -mmq 60 ", Arrays.asList(aseTestDir + "expected.ASEReadCount.WithHighMQ.table"));
    spec.executeTest("test high mq with no read passing", 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 67 with IntegrationTestSpec

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

the class BQSRPipelineSparkIntegrationTest method testBlowUpOnBroadcastIncompatibleReference.

@Test(groups = "spark")
public void testBlowUpOnBroadcastIncompatibleReference() throws IOException {
    //this should blow up because broadcast requires a 2bit reference
    final String hiSeqBam_chr20 = getResourceDir() + WGS_B37_CH20_1M_1M1K_BAM;
    final String dbSNPb37_chr20 = getResourceDir() + DBSNP_138_B37_CH20_1M_1M1K_VCF;
    BQSRTest params = new BQSRTest(b37_reference_20_21, hiSeqBam_chr20, dbSNPb37_chr20, ".bam", "-indelBQSR -enableBAQ " + "--joinStrategy BROADCAST", getResourceDir() + BQSRTestData.EXPECTED_WGS_B37_CH20_1M_1M1K_RECAL);
    ArgumentsBuilder ab = new ArgumentsBuilder().add(params.getCommandLineNoApiKey());
    IntegrationTestSpec spec = new IntegrationTestSpec(ab.getString(), 1, UserException.Require2BitReferenceForBroadcast.class);
    spec.executeTest("testBQSR-" + params.args, this);
}
Also used : IntegrationTestSpec(org.broadinstitute.hellbender.utils.test.IntegrationTestSpec) ArgumentsBuilder(org.broadinstitute.hellbender.utils.test.ArgumentsBuilder) UserException(org.broadinstitute.hellbender.exceptions.UserException) BaseTest(org.broadinstitute.hellbender.utils.test.BaseTest) Test(org.testng.annotations.Test) CommandLineProgramTest(org.broadinstitute.hellbender.CommandLineProgramTest)

Example 68 with IntegrationTestSpec

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

the class BaseRecalibratorSparkIntegrationTest method testBQSRSpark.

@Test(dataProvider = "BQSRTest", groups = "spark")
public void testBQSRSpark(BQSRTest params) throws IOException {
    ArgumentsBuilder ab = new ArgumentsBuilder().add(params.getCommandLineNoApiKey());
    IntegrationTestSpec spec = new IntegrationTestSpec(ab.getString(), Arrays.asList(params.expectedFileName));
    spec.executeTest("testBQSRSpark-" + params.args, this);
}
Also used : IntegrationTestSpec(org.broadinstitute.hellbender.utils.test.IntegrationTestSpec) ArgumentsBuilder(org.broadinstitute.hellbender.utils.test.ArgumentsBuilder) Test(org.testng.annotations.Test) CommandLineProgramTest(org.broadinstitute.hellbender.CommandLineProgramTest)

Example 69 with IntegrationTestSpec

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

the class BaseRecalibratorSparkShardedIntegrationTest method testBQSRFailWithIncompatibleReference.

@Test(groups = { "spark", "cloud" })
public void testBQSRFailWithIncompatibleReference() throws IOException {
    final String resourceDir = getTestDataDir() + "/" + "BQSR" + "/";
    final String localResources = getResourceDir();
    final String hg19Ref = ReferenceAPISource.URL_PREFIX + ReferenceAPISource.HG19_REF_ID;
    final String HiSeqBam = resourceDir + "NA12878.chr17_69k_70k.dictFix.bam";
    final String dbSNPb37 = getResourceDir() + "dbsnp_132.b37.excluding_sites_after_129.chr17_69k_70k.vcf";
    final BQSRTest params = new BQSRTest(hg19Ref, HiSeqBam, dbSNPb37, "-indelBQSR -enableBAQ ", localResources + BQSRTestData.EXPECTED_WGS_B37_CH20_1M_1M1K_RECAL);
    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 70 with IntegrationTestSpec

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

the class BaseRecalibratorSparkShardedIntegrationTest method testBQSRLocal.

// "local", but we're still getting the reference from the cloud.
//FIXME: disabled because it fails. https://github.com/broadinstitute/gatk/issues/1119
@Test(dataProvider = "BQSRTest", groups = { "spark", "cloud" }, enabled = false)
public void testBQSRLocal(BQSRTest params) throws IOException {
    ArgumentsBuilder ab = new ArgumentsBuilder().add(params.getCommandLine());
    IntegrationTestSpec spec = new IntegrationTestSpec(ab.getString(), Arrays.asList(params.expectedFileName));
    spec.executeTest("testBQSR-" + params.args, this);
}
Also used : IntegrationTestSpec(org.broadinstitute.hellbender.utils.test.IntegrationTestSpec) ArgumentsBuilder(org.broadinstitute.hellbender.utils.test.ArgumentsBuilder) 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