Download GenRGenS v2.0 User Manual
Transcript
TYPE = MASTER MAINFILE = "MainFile.ggd" WHERE A : "AuxFile1.ggd" SIZE VAR(X,UNIFORM(0,5)+1) B : "AuxFile2.ggd" SIZE MAX(5-X,0) In this example, each evaluation of the random variable UNIFORM(0,5)+1 is assigned to a variable named X. Each evaluation of the expression MAX(5-X,0) will then make use of the current value of X. This is likely to trick one into bad assumptions over the resulting sequences, for instance if the sequences issued from MainFile.ggd do not only present simple A-B alternations. Suppose that MainFile.ggd contains an implementation of a simple RATIONAL model, based on the regular expression (A|B|m)*, that AuxFile1.ggd and AuxFile2.ggd are RATIONAL models based on the regular expressions T* and U*, and that a sequence ω is issued from MainFile.ggd. Rewritings according to the SIZE definitions above result in the following sequence ω 0 . It can be seen in figure ω m A1 m m m B1 m m m m A2 m m B2 m m B20 m m m A3 m m A4 m m m B4 m X ? 1 −−− − −−−→ 3 −− − −− − −−→ 5 −→ 1 −−− − → MAX(5-X,0) ? 4 − − − 4 − − − → 2 − − 2 − − 2 − − → 0 − → 4 − − − 4 → ⇒ ω 0 = mT1 mmmU U U U1 mmmmT T T2 mmU U2 mmU U20 mmmT T T T T3 mmT4 mmmU U U U4 m Figure 6.2: Dependencies during generation stage 6.2 that a variable’s assignment can either be used by several subsequent dependant variables assignments, as in A2 → B2 . . . B20 , or be ignored like A4 . Therefore, this feature should only be used when the sequences issued from MainFile.ggd are sufficiently constrained, for instance by showing a strict assignment/use alternation such as the regular expression m*(A m* B m*)*. 6.3 6.3.1 A complete example Source This example is inspired by a simple model for stem-loop ribosomal -1 frameshifting sites. A frameshifting RNA causes the ribosome to slip over a specific sequence/structure motif and shift to another phase. A model inspired by the HIV-1 stem-loop frameshift site is detailed in figure 6.3. The Heptamer part can be modeled with a regular expression, similar to a mutation model. The Spacer will use a Bernoulli model(model of order 0). The Stem Loop requires the full power of a context free grammar. Lastly, the frame shift sites are drowned into an ocean of coding RNA(symbol Fill) modeled again by a markov model. 1 2 3 4 5 6 7 8 TYPE = MASTER SYMBOLS = WORDS MAINFILE = "frameshift.ggd" WHERE Heptamer : "heptamers.ggd" SIZE = 7 Spacer : "spacers.ggd" SIZE = VAR(X,5 + UNIFORM(0,3)) Stem Loop : "stem loops.ggd" SIZE = VAR(Y,24 + UNIFORM(0,9)) Fill : "junk.ggd" SIZE = 3*FLOOR((NORMAL(300 , 100)+X+Y+7)/3)-X-Y-7 Figure 6.4: A MASTER description file for the frameshift model from figure 6.3.1 39