fn() calculateOverlapIndicator
Calculate word overlaps: epsilon(word1, word2) = 1 where word2[j] = word1[j+p] for all j = 1..(k-p).

Defined in <seqan/alignment_free.h>
Signature void calculateOverlapIndicator(epsilon, word1, word2);

Parameters

epsilon String of int giving the periodicity (overlap indicator) of word1 and word2.
word1 String (for example a DNA sequence).
word2 String (for example a DNA sequence).

Detailed Description

Calculate the indicator for overlaps of two words. The formula is based on (Robin et al., 2005)

References

Robin, S., Rodolphe, F., and Schbath, S. (2005). DNA, Words and Models. Cambridge University Press. See Jonathan Goeke et al (to appear) for details on the implementation.

Examples

Calculate the overlap indicator (epsilon) for two words

using namespace seqan;
DnaString word1 = "ATATA";
DnaString word2 = "TATAT";
String<int> epsilon;
calculateOverlapIndicator(epsilon, word1, word2);
for(unsigned i = 0; i < length(epsilon); ++i)
    std::cout << epsilon[i] << "\t";
// epsilon =         01010:
// word1             ATATA
// word2 overlap 1:  -TATAT
// word2 overlap 2:  ---TATAT

Data Races

Thread safety unknown!

See Also