|
All Possible Patterns for an RNA String with Example Grammars James F. Lynn RNAparse/www.RNAparse.com 2012
Linear – Regular Expressions (RE)– Type 3 Grammars
Not much needs to be said about regular expression other than the fact they they are a powerful adjunct to context free and context sensitive grammars. Written as a production an RE may look like this: S::= 'ATGC' //match ATGC S::='[AT]TGC' //match ATGC,TTGC
Nested – Context-Free Grammars (CFG) – Type 2 Grammars/Type 2 Grammars with Affix Operator
An RNA stem loop (((......)))
S::= a a::= 'A' [b] 'T' | 'T' [b] 'A' | 'G' [b] 'C | 'C' [b] 'G' // add as many productions as needed b::= 'A' [c] 'T' | 'T' [c] 'A' | 'G' [c] 'C | 'C' [c] 'G' c::= loop loop::= 'ATGC{6}'
A more efficient way of describing stem-loop structures is by means of an affix operator, rho
.
S::= a a::= $x(“”) // lambda ( ('T' rho(x<="A" x))| // 'T' followed by x, where 'A' is affixed to x i.e. base pairing. ('A' rho(x<="T" x))| ('G' rho(x<="C" x))| ('C' rho(x<="G" x)) )<3>// number of iterations to take loop x loop::= 'ATGC{6}' //any RE here
Crossing Structures – Context Sensitive Grammars (CSG) – Type 1 Grammars
H-type Pseudoknot ((( [[[ ))) ]]]
S::= a
$y(“”) x y This method also works for the following: simple compliment repeats and tandem compliment repeats:
Reverse Compliment Repeat vs Simple Repeat:
Segment 1 can form a stem with segment 2. Segment 2 can form a stem with segment 3. Segment 3 and 4 can also form a stem.
S::=
//This can be done in a single production, S. // matches ATGCATATGCAT, AAGCTTAAGCTT, AAATTTAAATTT...
Kissing Hairpins, Triple Helical Elements
Either of these are also easily handled by our system.
nn-a-loop1-b-loop2-a'-loop3-c-loop4-b'-loop5-c'-nnn
'[AGCT]{2}' //any 2 nts. //end
On close inspection the second figure above contains 3 tandem compliment base pairs, each one with crossing properties (e.g. AGT-TCA) but can be handled similarly (grammar not shown.)
Discussion
An Example of a Grammar-only “Least Energy” Filter for Stem-Loop Structures.
Contact
jlynn@acsalaska.net
Some grammar production style and some style concepts are loosely based on Visual Parse++ (Defunct company ~1990's) |