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

Examples of org.broadinstitute.gatk.tools.walkers.haplotypecaller.HaplotypeRoute


     */
    public HaplotypeRoute getHaplotypeRoute(final Haplotype haplotype) {
        updateHaplotypeStructures();
        if (!haplotypes.contains(haplotype))
            throw new IllegalArgumentException("input haplotype must be part of the haplotype graph haplotype set");
        HaplotypeRoute result = haplotypeRouteByHaplotype.get(haplotype);
        if (result == null)
            haplotypeRouteByHaplotype.put(haplotype,result = buildHaplotypeRoute(haplotype));
        return result;
    }
View Full Code Here


    private HaplotypeRoute buildHaplotypeRoute(final Haplotype haplotype) {
        final Route<MultiDeBruijnVertex,MultiSampleEdge> route = RouteFinder.findRoute(this,haplotype.getBases());
        if (route == null)
            return null;
        else
            return new HaplotypeRoute(route);
    }
View Full Code Here

        haplotypeRouteByHaplotype = new LinkedHashMap<>(haplotypes.size());
        final Iterator<Haplotype> haplotypeIterator = haplotypes.iterator();
        final Set<Haplotype> nonFoundHaplotypes = new HashSet<>(haplotypes.size());
        while (haplotypeIterator.hasNext()) {
            final Haplotype haplotype = haplotypeIterator.next();
            final HaplotypeRoute haplotypeRoute = buildHaplotypeRoute(haplotype);
            if (haplotypeRoute == null) {
                haplotypeIterator.remove();
                nonFoundHaplotypes.add(haplotype);
                if (haplotype.isReference()) {
                    referenceHaplotype = null;
                    referenceRoute = null;
                    referenceVertices = Collections.emptySet();
                    referenceBases = null;
                }
            } else {
                if (haplotype.isReference()) {
                    referenceHaplotype = haplotype;
                    referenceRoute = haplotypeRoute;
                    referenceVertices = haplotypeRoute.vertexSet();
                    referenceBases = haplotypeRoute.getBases();
                }
                haplotypeRouteByHaplotype.put(haplotype, haplotypeRoute);
            }
        }
        haplotypesByVertex = buildHaplotypesByVertex();
View Full Code Here

TOP

Related Classes of org.broadinstitute.gatk.tools.walkers.haplotypecaller.HaplotypeRoute

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.