-
Notifications
You must be signed in to change notification settings - Fork 0
Home
BioPatML contains several different pattern types which can be used to express different patterns within gene sequences. They are all capable of being matched against Bio.ISequence objects (except Gap).
The MatchablePat type is the parent type from which all pattern types (except Gap) inherit from. It contains an abstract member function, "Match", which aptly takes a Bio.ISequence object as an argument and returns a boolean match result.
abstract member Match : Bio.ISequence -> bool
Each BioPat child type has its own implementation of the Match function.
The exists function takes an input sequence and a MatchablePat and will determine whether a region exists within the supplied input sequence that matches the supplied pattern.
exists "ATTGATTC" Motif("TxAT") // true
exists "ATTGATTC" Prosite("t-g(2)-n-a") // false
The locate function takes an input sequence and a MatchablePat and returns the location of the first encountered match (if any exist).
locate "ATTGATTC" Motif("TxAT") // Some 2
locate "ATTGATTC" Prosite("t-g(2)-n-a") // None