-
Notifications
You must be signed in to change notification settings - Fork 0
Repeat Pattern
Jess Davis edited this page Dec 15, 2016
·
1 revision
The Repeat pattern describes repeats of a sequence region. The pattern searches for multiple occurences of the same motif pattern with a gap of designated length seperating them.
The Repeat constructor takes five arguments:
pattern : string
minGap : float
maxGap : float
threshold : float
repeatCount : float
The "threshold" argument is optional and, if ignored, a default similarity threshold of 1.0 will be applied to the contents of the Set. The "repeatCount" argument is also optional (default of 1) and determines the number of times the provided pattern should repeat itself
let repeat = Repeat("ATT", 0, 2, 0.9, 2)
let lazyRepeat = Repeat("ATT", 0, 2)
In order to make use of the Repeat pattern, the "Match" member function must be called with a Bio.ISequence as an argument. The Repeat pattern will then proceed to look through the input in search of a match that satisfies the similarity threshold.
let newSeq = Bio.Sequence(Bio.Alphabets.DNA, "ATTGATTCGATTC")
let repeat = Repeat("ATT", 0, 2, 0.9, 2)
repeat.Match(newSeq) // true