Search in sources :

Example 1 with SeqVertex

use of org.broadinstitute.hellbender.tools.walkers.haplotypecaller.graphs.SeqVertex in project gatk-protected by broadinstitute.

the class ReadThreadingAssemblerUnitTest method testMismatchInFirstKmer.

@Test
public void testMismatchInFirstKmer() {
    final TestAssembler assembler = new TestAssembler(3);
    final String ref = "ACAACTGA";
    final String alt = "AGCTGA";
    assembler.addSequence(ref.getBytes(), true);
    assembler.addSequence(alt.getBytes(), false);
    final SeqGraph graph = assembler.assemble();
    graph.simplifyGraph();
    graph.removeSingletonOrphanVertices();
    final Set<SeqVertex> sources = graph.getSources();
    final Set<SeqVertex> sinks = graph.getSinks();
    Assert.assertEquals(sources.size(), 1);
    Assert.assertEquals(sinks.size(), 1);
    Assert.assertNotNull(graph.getReferenceSourceVertex());
    Assert.assertNotNull(graph.getReferenceSinkVertex());
    final List<KBestHaplotype> paths = new KBestHaplotypeFinder(graph);
    Assert.assertEquals(paths.size(), 1);
}
Also used : KBestHaplotype(org.broadinstitute.hellbender.tools.walkers.haplotypecaller.graphs.KBestHaplotype) SeqGraph(org.broadinstitute.hellbender.tools.walkers.haplotypecaller.graphs.SeqGraph) KBestHaplotypeFinder(org.broadinstitute.hellbender.tools.walkers.haplotypecaller.graphs.KBestHaplotypeFinder) SeqVertex(org.broadinstitute.hellbender.tools.walkers.haplotypecaller.graphs.SeqVertex) BaseTest(org.broadinstitute.hellbender.utils.test.BaseTest) Test(org.testng.annotations.Test)

Example 2 with SeqVertex

use of org.broadinstitute.hellbender.tools.walkers.haplotypecaller.graphs.SeqVertex in project gatk by broadinstitute.

the class ReadThreadingAssemblerUnitTest method testMismatchInFirstKmer.

@Test
public void testMismatchInFirstKmer() {
    final TestAssembler assembler = new TestAssembler(3);
    final String ref = "ACAACTGA";
    final String alt = "AGCTGA";
    assembler.addSequence(ref.getBytes(), true);
    assembler.addSequence(alt.getBytes(), false);
    final SeqGraph graph = assembler.assemble();
    graph.simplifyGraph();
    graph.removeSingletonOrphanVertices();
    final Set<SeqVertex> sources = graph.getSources();
    final Set<SeqVertex> sinks = graph.getSinks();
    Assert.assertEquals(sources.size(), 1);
    Assert.assertEquals(sinks.size(), 1);
    Assert.assertNotNull(graph.getReferenceSourceVertex());
    Assert.assertNotNull(graph.getReferenceSinkVertex());
    final List<KBestHaplotype> paths = new KBestHaplotypeFinder(graph);
    Assert.assertEquals(paths.size(), 1);
}
Also used : KBestHaplotype(org.broadinstitute.hellbender.tools.walkers.haplotypecaller.graphs.KBestHaplotype) SeqGraph(org.broadinstitute.hellbender.tools.walkers.haplotypecaller.graphs.SeqGraph) KBestHaplotypeFinder(org.broadinstitute.hellbender.tools.walkers.haplotypecaller.graphs.KBestHaplotypeFinder) SeqVertex(org.broadinstitute.hellbender.tools.walkers.haplotypecaller.graphs.SeqVertex) BaseTest(org.broadinstitute.hellbender.utils.test.BaseTest) Test(org.testng.annotations.Test)

Aggregations

KBestHaplotype (org.broadinstitute.hellbender.tools.walkers.haplotypecaller.graphs.KBestHaplotype)2 KBestHaplotypeFinder (org.broadinstitute.hellbender.tools.walkers.haplotypecaller.graphs.KBestHaplotypeFinder)2 SeqGraph (org.broadinstitute.hellbender.tools.walkers.haplotypecaller.graphs.SeqGraph)2 SeqVertex (org.broadinstitute.hellbender.tools.walkers.haplotypecaller.graphs.SeqVertex)2 BaseTest (org.broadinstitute.hellbender.utils.test.BaseTest)2 Test (org.testng.annotations.Test)2