Skip to main content
. Author manuscript; available in PMC: 2021 Nov 2.
Published in final edited form as: Cell Syst. 2021 Sep 14;12(10):958–968.e6. doi: 10.1016/j.cels.2021.08.009

Algorithm 3.

Minimizer-space POA graph construction and consensus generation

Input: A query ordered list of minimizers q to be error-corrected, collection of query neighbors N
1: procedure POA(q, N)
2: G = (V,E) ← initializeGraph(q) ▹ As described in (Lee et al., 2002)
3: for nN do
4:   G ← semiGlobalAlign(G,n) ▹ As described in (Lee et al., 2002)
5: end for
6:  λ ← {} ▹ Scoring table for nodes
7: P ← {} ▹ Predecessor table for nodes
8: topologicalSort(G) ▹ Topological sorting of nodes
9: for vV do
10:   e = (u, v) ← max(inEdges(v)) ▹ Find the maximum-weighted incoming edge to v
11:   λ[v] ← We + λ[u]
12:   P[v] ← u
13: end for
14: CCONSENSUS(V, λ; P) ▹ Described in the “Minimizer-space POA”
Section
15: return C
16: end procedure