Skip to main content
. Author manuscript; available in PMC: 2015 Jan 1.
Published in final edited form as: Pac Symp Biocomput. 2014:3–14.

Algorithm 1.

HapCompass-Tumor

input : Sequence reads, variant calls, and number of distinct haplotypes k
output: k haplotypes
GC ← spanning tree cycle basis
CC ← set of conflicting simple cycles with respect to GC
for cC ∈ CC do
        Remove edge with smallest likelihood in cC
        Reconstruct GC
end
Compute Gg
CN ← set of non-conflicting simple cycles with respect to GC
for cN ∈ CN do
        Compute Gh with respect to cN
        Compute matchings at each level of Gh
        Compute disjoint paths of Gh
        Increase the weight of each edge e between levels shared by Gh and Gg in Gg
        proportional to the number of disjoint paths using edge e and the likelihood of
        each edge (Equations 1 and 2)
end
Compute a maximum weight spanning tree of the adjacencies in Gg
Output the haplotype assembly computed from the spanning tree of Gg