use of org.broadinstitute.hellbender.tools.exome.orientationbiasvariantfilter.OrientationSampleTransitionSummary in project gatk-protected by broadinstitute.
the class FilterByOrientationBiasIntegrationTest method testNoVariantsNoSamplesRun.
@Test
public void testNoVariantsNoSamplesRun() throws IOException {
final File outputFile = File.createTempFile("ob_no_variants_no_sample", ".vcf");
final List<String> arguments = new ArrayList<>();
arguments.add("-" + FilterByOrientationBias.PRE_ADAPTER_METRICS_DETAIL_FILE_SHORT_NAME);
arguments.add(preAdapterQFile);
arguments.add("-" + StandardArgumentDefinitions.VARIANT_SHORT_NAME);
arguments.add(emptyVcfNoSamples);
arguments.add("-" + StandardArgumentDefinitions.OUTPUT_SHORT_NAME);
arguments.add(outputFile.getAbsolutePath());
runCommandLine(arguments);
Assert.assertTrue(outputFile.exists());
final List<VariantContext> variantContexts = new ArrayList<>();
final FeatureDataSource<VariantContext> featureDataSource = new FeatureDataSource<>(outputFile);
for (final VariantContext vc : featureDataSource) {
variantContexts.add(vc);
}
Assert.assertEquals(variantContexts.size(), 0);
Assert.assertTrue(FileUtils.sizeOf(outputFile) > 0);
final File summaryFile = new File(outputFile.getAbsolutePath() + FilterByOrientationBias.SUMMARY_FILE_SUFFIX);
Assert.assertTrue(summaryFile.exists());
Assert.assertTrue(FileUtils.sizeOf(summaryFile) > 0);
final List<OrientationSampleTransitionSummary> summaries = OrientationBiasUtils.readOrientationBiasSummaryTable(summaryFile);
Assert.assertEquals(summaries.size(), 0);
}
Aggregations