Function
calculatePeriodicity
Calculate word periodicity (indicator for overlaps)
Include Headers
seqan/alignment_free.h
Parameters
String<int> giving the periodicity ("overlap indicator") of word1 and word2 Types: String | |
String (for example a DNA sequence) Types: String | |
String (for example a DNA sequence) Types: String |
Remarks
Calculate word periodicity (indicator for overlaps) for two words.
Return Values
String<int> periodicity, the word overlap indicator.
Examples
Calculate the periodicity of two words (At which positions can they overlap?)
DnaString word1 = "ATATA";
DnaString word2 = "TATAT";
String<int> periodicity;
calculatePeriodicity(periodicity, word1, word2);
for(unsigned i = 0; i < length(periodicity); ++i) // Print the periodicity
std::cout << periodicity[i] << "\t";
// periodocity[0] = 1:
// i = 01234
// word1 = ATATA
// word2 = -TATAT
// periodocity[1] = 3:
// i = 01234
// word1 = ATATA
// word2 = ---TATAT
SeqAn - Sequence Analysis Library - www.seqan.de