Skip to main content

Table 3 Detailed calculation of length of similar segment, d USM , from USM coordinates of individual homologous units.

From: Fractal MapReduce decomposition of sequence alignment

Encoding

ubase = new usm('acggctgctatctgcgtacggtcgac')

uprobe = new usm('aaagctatctgaaaggtcaaa',ubase.abc)

u = new usm(null, 'acgt')

Reviewing coordinates of positions highlighted in Table 1 and 2

ubase.cgrForward[7]

uprobe.cgrForward[4]

[0.4225834224013004, 0.6976523056276487]

[0.2517343767806896, 0.502943755599859]

ubase.cgrBackward[7]

uprobe.cgrBackward[4]

[0.3390888473255761, 0.8645502159677478]

[0.33679262961989864, 0.8595585153381897]

Calculating one step at a time, d C G R f o r w a r d and d C G R b a c k w a r d

u.distCGR([0.4225834224013004, 0.6976523056276487],[0.2517343767806896, 0.502943755599859]) 2

u.distCGR([0.3390888473255761, 0.8645502159677478],[0.33679262961989864, 0.8595585153381897]) 7

Applying Equation 5 directly to find length of similar segment = 2+7-1 = 8

u.dist(ubase.usm[7],uprobe.usm[4])8

  1. In this illustrative example, the coordinates for base and probe sequences for nucleotide "c" in position 8 and 5 respectively: acggctg[c]tatctg cgtacggtcgac, and aaag[c]tatctg aaaggtcaaa will be compared using Equation 5. Note array indexes in JavaScript start with 0 (zero), so this corresponds to comparing coordinate indexes 7 and 4. This distance result is also highlighted in Figure 3.