If it's not possible to resolve the repeat, scaffolding is performed where paired read information is used to determine the distances between contigs and the orientation of these. Scaffolding is only considered between contigs with a minimum length of 120 to ensure that enough paired read information is available. An iterative greedy approach is used when performing scaffolding where short gaps are closed first, thus increasing the paired read information available for closing gaps (see figure 5.12).
Figure 5.11: Performing iterative scaffolding of the shortest gaps allows long pairs to be optimally used. i1 shows three contigs with dashed arches indicating potential scaffolding. i2 is after first iteration when the shortest gap has been closed and long potential scaffolding has been updated. i3 is the final results with three contigs in one scaffold.
Contigs in the same scaffold are output as one large contig with Ns inserted in between. The number of Ns inserted correspond to the estimated distance between contigs, which is calculated based on the paired read information. More precisely, for each set of paired reads spanning two contigs a distance estimate is calculated based on the supplied distance between the reads. The average of these distances is then used as the final distance estimate. It is possible to get a negative distance estimate, which happens when the paired information indicate that contigs overlap but for some reason could not be joined in the graph. Additional information on how paired reads have been used to in the scaffolding step can be printed by using -f to specify an output file for GFF or AGP 2.0 formatted annotations. For the GFF format there are three types of annotations:
- Scaffold refers to the estimated gap region between two contigs where Ns are inserted.
- Contigs joined refers to the join of two contigs connected by a repeat or another ambiguous structure in the graph, which was resolved using paired reads.
- Alternatives excluded refers to the exclusion of a region in the graph using paired reads, which resulted in a join of two contigs.