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);
}
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);
}
Aggregations