<p>The definition of contig is derived from assembly algorithms. A contig is not necessarily present in the genome. PS: i.e. &quot;contig&quot; is algorithmically defined, not biologically defined.</p>
<blockquote>
<p>Is it not possible that we simply have a missing read that would have otherwise branched this path?</p>
</blockquote>
<p>Yes, it is possible. Then you are likely to get a misassembled contig.</p>

CC BY-SA 4.0
2022-04-24T16:45:04.287Z
By the way, a maximal non-branching path in the assembly graph is more often called a *unitig*.
user172818
CC BY-SA 4.0
2022-04-24T16:41:09.950Z
2022-04-29T14:37:33.953Z
2022-04-29T14:37:33.953Z
user172818
<p>The following is from <em>Bioinformatics Algorithms</em>:</p>
<blockquote>
<p>Fortunately, we can derive contigs from the de Bruijn graph. A path in a graph is called non-branching if in(v) = out(v) = 1 for each intermediate node v of this path, i.e., for each node except possibly the starting and ending node of a path. A maximal non-branching path is a non-branching path that cannot be extended into a longer non-branching path. We are interested in these paths because the strings of nucleotides that they spell out must be present in any assembly with a given k-mer composition. For this reason, contigs correspond to strings spelled by maximal non-branching paths in the de Bruijn graph. For example, the de Bruijn graph below, constructed for the 3-mer composition of TAATGCCATGGGATGTT, has nine maximal non-branching paths that spell out the contigs TAAT, TGTT, TGCCAT, ATG, ATG, ATG, TGG, GGG, and GGAT. In practice, biologists have no choice but to break genomes into contigs, even in the case of perfect coverage (like in the figure below), since repeats prevent them from being able to infer a unique Eulerian path.</p>
</blockquote>
<p><a href="https://i.sstatic.net/q06hd.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/q06hd.png" alt="breaking a de Bruijn graph into contigs" /></a></p>
<p>But this quote doesn't make sense to me:</p>
<blockquote>
<p>We are interested in these paths because the strings of nucleotides that they spell out <strong>must be present in any assembly with a given k-mer composition</strong>.</p>
</blockquote>
<p>Is it not possible that we simply have a missing read that would have otherwise branched this path? How do we know that a maximal non-branching path <em>must</em> be a contig?</p>

<phylogenetics><ngs><assembly>
Why must a maximal non-branching path be a contig?
# Why must a maximal non-branching path be a contig?

(Asked by: username_0 on 2022-04-23)

The following is from *Bioinformatics Algorithms*:

> Fortunately, we can derive contigs from the de Bruijn graph. A path in a graph is called non-branching if in(v) = out(v) = 1 for each intermediate node v of this path, i.e., for each node except possibly the starting and ending node of a path. A maximal non-branching path is a non-branching path that cannot be extended into a longer non-branching path. We are interested in these paths because the strings of nucleotides that they spell out must be present in any assembly with a given k-mer composition. For this reason, contigs correspond to strings spelled by maximal non-branching paths in the de Bruijn graph. For example, the de Bruijn graph below, constructed for the 3-mer composition of TAATGCCATGGGATGTT, has nine maximal non-branching paths that spell out the contigs TAAT, TGTT, TGCCAT, ATG, ATG, ATG, TGG, GGG, and GGAT. In practice, biologists have no choice but to break genomes into contigs, even in the case of perfect coverage (like in the figure below), since repeats prevent them from being able to infer a unique Eulerian path.

[![breaking a de Bruijn graph into contigs](https://i.sstatic.net/q06hd.png)](https://i.sstatic.net/q06hd.png)

But this quote doesn't make sense to me:

> We are interested in these paths because the strings of nucleotides that they spell out **must be present in any assembly with a given k-mer composition**.

Is it not possible that we simply have a missing read that would have otherwise branched this path? How do we know that a maximal non-branching path *must* be a contig?

**Tags:** phylogenetics, ngs, assembly

---

## 1 answers

### Answer by username_1 on 2022-04-24. Score: 1 | Accepted answer

The definition of contig is derived from assembly algorithms. A contig is not necessarily present in the genome. PS: i.e. "contig" is algorithmically defined, not biologically defined.

> Is it not possible that we simply have a missing read that would have otherwise branched this path?

Yes, it is possible. Then you are likely to get a misassembled contig.

> **Comments:**
> **username_1**: By the way, a maximal non-branching path in the assembly graph is more often called a *unitig*.  

---

