Skip to content

BioRegex Pattern

Jess Davis edited this page Dec 15, 2016 · 1 revision

The BioRegex pattern merely describes a regular expression

Creation

The constructor takes a single argument - the regular expression string

let regex = BioRegex("[AT]+")

Usage

In order to make use of the Motif pattern, the "Match" member function must be called with a Bio.ISequence as an argument. The regular expression will then be compared against the input and the match result is returned.

let mySeq = Bio.Sequence(Bio.Alphabets.DNA, "ATTCTCCCG")
let regex = BioRegex("[AT]+")
                    
regex.Match(mySeq) // true 
Clone this wiki locally