We introduce a compact pangenome representation based on an optimal segmentation concept that aims to reconstruct founder sequences from a multiple sequence alignment (MSA). Such founder sequences have the feature that each row of the MSA is a recombination of the founders. Several linear time dynamic programming algorithms have been previously devised to optimize segmentations that induce founder blocks that then can be concatenated into a set of founder sequences. All possible concatenation orders can be expressed as a founder graph . We observe a key property of such graphs: if the node labels (founder segments)do not repeat in the paths of the graph, such graphs can be indexed for efficient string matching. We call such graphs repeat-free founder graphs when constructed from a gapless MSA and repeat-free elastic founder graphswhen constructed from a general MSA with gaps . We give a linear time algorithm and a parameterized near linear time algorithm to construct a repeat-free founder graph and a repeat-free elastic founder graph, respectively. We derive a tailored succinct index structure to support queries of arbitrary length in the paths of a repeat-free (elastic) founder graph. In addition , we show how to turn a repeat-free (elastic ) founder graph into a Wheeler graph in polynomial time . Furthermore, we show that a property such as repeat-freeness is essential for indexability. In particular, we show that unless the Strong Exponential Time Hypothesis (SETH) fails, one cannot build an index on an elastic founder graph in polynomial time to support fast queries .
We study the problem of matching a string in a labeled graph. Previous research has shown that unless the Orthogonal Vectors Hypothesis (OVH) is false, one cannot solve this problem in strongly sub-quadratic time, nor index the graph in polynomial time to answer queries efficiently (Equi et al. ICALP 2019, SOFSEM 2021). These conditional lower-bounds cover even deterministic graphs with binary alphabet, but there naturally exist also graph classes that are easy to index: E.g. Wheeler graphs (Gagie et al. Theor. Comp. Sci. 2017) cover graphs admitting a Burrows-Wheeler transform -based indexing scheme. However, it is NP-complete to recognize if a graph is a Wheeler graph (Gibney, Thankachan, ESA 2019). We propose an approach to alleviate the construction bottleneck of Wheeler graphs. Rather than starting from an arbitrary graph, we study graphs induced from multiple sequence alignments (MSAs). Elastic degenerate strings (Bernadini et al. SPIRE 2017, ICALP 2019) can be seen as such graphs, and we introduce here their generalization: elastic founder graphs. We first prove that even such induced graphs are hard to index under OVH. Then we introduce two subclasses, repeat-free and semi-repeat-free graphs, that are easy to index . We give a linear time algorithm to construct a repeat-free non-elastic founder graph from a gapless MSA, and (parameterized) near-linear time algorithms to construct semi-repeat-free ( repeat-free , respectively) elastic founder graphs from general MSAs. Finally , we show that repeat-free elastic founder graphs admit a reduction to Wheeler graphs in polynomial time .
R
introduce a compact pangenome representation based on an optimal segmentation concept that aims to reconstruct founder sequences from a multiple sequence alignment (MSA). Such founder sequences have the feature that each row of the MSA is a recombination of the founders. Several linear time dynamic programming algorithms have been previously devised to optimize segmentations that induce founder blocks that then can be concatenated into a set of founder sequences. All possible concatenation orders can be expressed as a founder graph . We observe a key property of such graphs: if the node labels (founder segments)do not repeat in the paths of the graph, such graphs can be indexed for efficient string matching. We call such graphs
study the problem of matching a string in a labeled graph. Previous research has shown that unless the Orthogonal Vectors Hypothesis (OVH) is false, one cannot solve this problem in strongly sub-quadratic time, nor index the graph in polynomial time to answer queries efficiently (Equi et al. ICALP 2019, SOFSEM 2021). These conditional lower-bounds cover even deterministic graphs with binary alphabet, but there naturally exist also graph classes that are easy to index: E.g. Wheeler graphs (Gagie et al. Theor. Comp. Sci. 2017) cover graphs admitting a Burrows-Wheeler transform -based indexing scheme. However, it is NP-complete to recognize if a graph is a Wheeler graph (Gibney, Thankachan, ESA 2019). We propose an approach to alleviate the construction bottleneck of Wheeler graphs. Rather than starting from an arbitrary graph, we study graphs induced from multiple sequence alignments (MSAs). Elastic degenerate strings (Bernadini et al. SPIRE 2017, ICALP 2019) can be seen as such graphs, and we introduce here their generalization: elastic founder graphs. We first prove that even such induced graphs are hard to index under OVH. Then we introduce two subclasses,
R
founder graphs when constructed from a gapless MSA and repeat-free elastic founder graphswhen constructed from a general MSA with gaps
and semi-repeat-free graphs, that are easy to index
D
and a parameterized near linear time algorithm
R
founder graph and a
non-elastic founder graph from a gapless MSA, and (parameterized) near-linear time algorithms to construct semi-repeat-free (
R
elastic founder graph, respectively. We derive a tailored succinct index structure to support queries of arbitrary length in the paths of a repeat-free (elastic) founder graph. In addition
, respectively) elastic founder graphs from general MSAs. Finally
R
how to turn a
that
R
(elastic ) founder graph into a Wheeler graph
elastic founder graphs admit a reduction to Wheeler graphs
D
. Furthermore, we show that a property such as repeat-freeness is essential for indexability. In particular, we show that unless the Strong Exponential Time Hypothesis (SETH) fails, one cannot build an index on an elastic founder graph in polynomial time to support fast queries