Search in sources :

Example 1 with StructuralVariantReadMetrics

use of gridss.analysis.StructuralVariantReadMetrics in project gridss by PapenfussLab.

the class ExtractSVReadsTest method should_write_metrics.

@Test
public void should_write_metrics() {
    createInput();
    ExtractSVReads extract = new ExtractSVReads();
    extract.INPUT = input;
    extract.OUTPUT = output;
    extract.METRICS_OUTPUT = new File(output.getAbsolutePath() + ".metrics");
    extract.setup(getHeader(), extract.INPUT);
    extract.acceptFragment(ImmutableList.of(Read(0, 1, "50M50S")), null);
    extract.finish();
    assertTrue(extract.METRICS_OUTPUT.exists());
    StructuralVariantReadMetrics metric = Iterators.getOnlyElement(Iterables.filter(MetricsFile.readBeans(extract.METRICS_OUTPUT), StructuralVariantReadMetrics.class).iterator(), null);
    assertEquals(1, metric.SOFT_CLIPPED_READS);
}
Also used : StructuralVariantReadMetrics(gridss.analysis.StructuralVariantReadMetrics) MetricsFile(htsjdk.samtools.metrics.MetricsFile) File(java.io.File) IndexedFastaSequenceFile(htsjdk.samtools.reference.IndexedFastaSequenceFile) IntermediateFilesTest(au.edu.wehi.idsv.IntermediateFilesTest) Test(org.junit.Test)

Aggregations

IntermediateFilesTest (au.edu.wehi.idsv.IntermediateFilesTest)1 StructuralVariantReadMetrics (gridss.analysis.StructuralVariantReadMetrics)1 MetricsFile (htsjdk.samtools.metrics.MetricsFile)1 IndexedFastaSequenceFile (htsjdk.samtools.reference.IndexedFastaSequenceFile)1 File (java.io.File)1 Test (org.junit.Test)1