Skip to main content
. 2019 Nov 6;36(6):1681–1688. doi: 10.1093/bioinformatics/btz814

Fig. 2.

Fig. 2.

Scoring procedure for an example graph mapping. An example mapping of a reference s (dashed line) to a graph W (solid lines), with exact matches (black circles) and inexact matches (white circles), is shown (A), with string representation of the path, s (B). Firstly, a weight array a is retrieved for which ai gives the weight of the ith reference k-mer in the wDBG, where gaps are given a weight of zero. These exact matches are then extended with bridges b to inexact matches. Next, per-base weights M are calculated such that each base is given the greatest weight of any k-mer that includes it, which also functions to assign weights to terminal characters of a string (or substring before a gap) that do not have k-mers (such as ‘TA’ at the fourth position). Finally, the array M is computed as Mi=δi·Mi, where δi=1 if si=si, and zero otherwise. For our classifier, we chose to multiply the sum of this array by the fraction of non-gap (non-zero) positions, in order to penalize high weight, high gap mappings