Package org.broadinstitute.gatk.tools.walkers.haplotypecaller.graphs

Examples of org.broadinstitute.gatk.tools.walkers.haplotypecaller.graphs.SeqGraph


        final int mergeResult = rtgraph.mergeDanglingHead(result);
        Assert.assertTrue(mergeResult > 0 || !shouldBeMerged);

        // confirm that we created the appropriate bubble in the graph only if expected
        rtgraph.cleanNonRefPaths();
        final SeqGraph seqGraph = rtgraph.convertToSequenceGraph();
        final List<KBestHaplotype> paths = new KBestHaplotypeFinder(seqGraph, seqGraph.getReferenceSourceVertex(), seqGraph.getReferenceSinkVertex());
        Assert.assertEquals(paths.size(), shouldBeMerged ? 2 : 1);
    }
View Full Code Here


            h.setGenomeLocation(activeRegion.getExtendedLoc());

        final ReadThreadingGraph rtg = new ReadThreadingGraph(10);
        for (final Haplotype h : haplotypes)
            rtg.addSequence("seq-" + Math.abs(h.hashCode()), h.getBases(), h.isReference());
        final SeqGraph seqGraph = rtg.convertToSequenceGraph();
        final AssemblyResult ar = new AssemblyResult(AssemblyResult.Status.ASSEMBLED_SOME_VARIATION,seqGraph);
        ar.setThreadingGraph(rtg);
        final Map<Haplotype,AssemblyResult> result =
                new HashMap<>();
        for (final Haplotype h : haplotypes)
View Full Code Here

            logger.debug("Resulting haplotype graph has ends that do not belong to the reference: " + originalActiveRegion.getLocation());
        else if (!graphLikelihoodEngine.hasVariation())
            logger.debug("Resulting haplotype graph does not contain any alternative haplotype path");
        if (debugMode == DebugMode.EXTRA_DEBUG) {
            graphLikelihoodEngine.printGraph(originalActiveRegion.getLocation() + "-" + graphLikelihoodEngine.getKmerSize() + "-haplotypeGraph.dot");
            final SeqGraph sq = graphLikelihoodEngine.haplotypeGraph.convertToSequenceGraph();
            sq.simplifyGraph();
            sq.printGraph(new File(originalActiveRegion.getLocation() + "-" + graphLikelihoodEngine.getKmerSize() + "-haplotypeSeqGraph.dot"), 10000);
            try {
                final FileWriter fw = new FileWriter(new File(originalActiveRegion.getLocation() + "-likelihoods.txt"));
                final PrintWriter pw = new PrintWriter(fw);
                //Note: we only output the first sample likelihoods, perhaps should output all of them but for debugging this is normally what is needed.
                pw.println(result.sampleMatrix(0)); // need to actually implement a proper toString for the SampleMatrix.
View Full Code Here

TOP

Related Classes of org.broadinstitute.gatk.tools.walkers.haplotypecaller.graphs.SeqGraph

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.