use of org.broadinstitute.hellbender.utils.test.IntegrationTestSpec in project gatk by broadinstitute.
the class SelectVariantsIntegrationTest method testNotFileVcfException.
/**
* Test with a VCF file that is not a file
*/
@Test
public void testNotFileVcfException() throws IOException {
final String testFile = getToolTestDataDir();
final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString("", testFile), 1, UserException.CouldNotReadInputFile.class);
spec.executeTest("testNotFileVcfException--" + testFile, this);
}
use of org.broadinstitute.hellbender.utils.test.IntegrationTestSpec in project gatk by broadinstitute.
the class SelectVariantsIntegrationTest method testSampleSelection.
@Test
public void testSampleSelection() throws IOException {
final String testFile = getToolTestDataDir() + "vcfexample2.vcf";
final IntegrationTestSpec spec = new IntegrationTestSpec(" -R " + hg19MiniReference + " --variant " + testFile + " -sn NA11918 " + // suppress reference file path in output for test differencing
" -sr " + " -O %s " + " --addOutputVCFCommandLine false", Collections.singletonList(getToolTestDataDir() + "expected/" + "testSelectVariants_SimpleSelection.vcf"));
spec.executeTest("testSampleSelection--" + testFile, this);
}
use of org.broadinstitute.hellbender.utils.test.IntegrationTestSpec in project gatk by broadinstitute.
the class SelectVariantsIntegrationTest method testNonExistentSampleFile.
@Test
public void testNonExistentSampleFile() throws IOException {
final String testFile = getToolTestDataDir() + "vcfexample2.vcf";
final File nonExistentFile = BaseTest.getSafeNonExistentFile("nonexistentSamples.list");
final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString(" -sn A -sn Z -sn Q -sn " + nonExistentFile, testFile), 1, CommandLineException.class);
spec.executeTest("testNonExistentSampleFile--" + testFile, this);
}
use of org.broadinstitute.hellbender.utils.test.IntegrationTestSpec in project gatk by broadinstitute.
the class SelectVariantsIntegrationTest method testMaxNoCall0_5.
@Test
public void testMaxNoCall0_5() throws IOException {
final String testFile = getToolTestDataDir() + "vcfexample.forNoCallFiltering.vcf";
final IntegrationTestSpec spec = new IntegrationTestSpec(baseTestString(" --maxNOCALLfraction 0.5", testFile), Collections.singletonList(getToolTestDataDir() + "expected/" + "testSelectVariants_maxNOCALLnumber2.vcf"));
spec.executeTest("testMaxNoCall0_5--" + testFile, this);
}
use of org.broadinstitute.hellbender.utils.test.IntegrationTestSpec in project gatk by broadinstitute.
the class SelectVariantsIntegrationTest method testFileWithoutInfoLineInHeader.
private void testFileWithoutInfoLineInHeader(final String name, final Class<? extends Exception> expectedException) throws IOException {
final String testFile = getToolTestDataDir() + "missingHeaderLine.vcf";
final String outFile = getToolTestDataDir() + "expected/" + name + ".vcf";
final String cmd = baseTestString(" -sn NA12892 " + (expectedException == null ? " --lenient" : ""), testFile);
IntegrationTestSpec spec = expectedException != null ? new IntegrationTestSpec(cmd, 1, expectedException) : new IntegrationTestSpec(cmd, Collections.singletonList(outFile));
spec.executeTest(name, this);
}
Aggregations