Skip to content

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.

Creation

The Repeat constructor takes five arguments:

  1. pattern : string
  2. minGap : float
  3. maxGap : float
  4. threshold : float
  5. 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)

Usage

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
Clone this wiki locally