Download presentation
Presentation is loading. Please wait.
1
Idealized example of FOR-EACH Loop and IF
Scientific objective Identify upstream regions with protein-binding site TGC CAT in Anabaena PCC 7120 Upstream region A T This demonstration is best viewed as a slide show, enabling you to simulate a session and make changes in cursor position more obvious. To do this, click Slide Show on the top tool bar, then View show. Click anywhere to go on to the next slide
2
Click at any time Click to clear screen
Problem calls for a loop. (Click on menu) Undo | Redo Workspace Find functions in categories shown above Click for menu of box operations Function-specific options Deletes box Function box ORTHOLOG-OF gene-or-protein IN | CUTOFF 1e-10 Click on box to select (red outline) input box Click to extend function for menu of options Potential input box + type of needed input Clears box Click at any time Click to clear screen Results
3
Click at any time Click to clear screen
FOR-EACH is a version of LOOP that may be more readable for some. (Click on arrow) Logical comparison Logical connectives Loops and conditional executions Other logic functions BOTH EITHER FOR-EACH IF IF-NOT LOOP NOT ORDER Undo | Redo Workspace Find functions in categories shown above Click for menu of box operations Function-specific options Deletes box Function box ORTHOLOG-OF gene-or-protein IN | CUTOFF 1e-10 Click on box to select (red outline) input box Click to extend function for menu of options Potential input box + type of needed input Clears box Click at any time Click to clear screen Results
4
Undo | Redo Workspace First step is to name the variable that will be iterated during the loop. Any name will do. FOR-EACH variable name Control section – Determines form of iteration Initialization section – Initializes loop variables before the loop begins Variable update section – Resets loop variables each iteration Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
5
Click on green arrow for choices of type of iteraation.
Undo | Redo Workspace Click on green arrow for choices of type of iteraation. FOR-EACH gene| Control section – Determines form of iteration Initialization section – Initializes loop variables before the loop begins Variable update section – Resets loop variables each iteration Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
6
Control section – Determines form of iteration
Undo | Redo Workspace FOR-EACH gene IN list FROM number FROM number BY number FROM number TO number FROM number TO number BY number Control section – Determines form of iteration Initialization section – Initializes loop variables before the loop begins Variable update section – Resets loop variables each iteration Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
7
Undo | Redo Workspace Word in italics, Times Roman, identifies type of input desired. User input is non-italics, Courier. FOR-EACH gene IN list Control section – Determines form of iteration Initialization section – Initializes loop variables before the loop begins Variable update section – Resets loop variables each iteration Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
8
Undo | Redo Workspace Clicking hole (unfilled or not) selects it for both input (cursor appears) and replacement by a function. FOR-EACH gene IN | Control section – Determines form of iteration Initialization section – Initializes loop variables before the loop begins Variable update section – Resets loop variables each iteration Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
9
Control section – Determines form of iteration
Analyysis Components Gene-protein classes Sequence classes Undo | Redo Workspace FOR-EACH gene IN | Control section – Determines form of iteration Initialization section – Initializes loop variables before the loop begins Variable update section – Resets loop variables each iteration Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
10
Control section – Determines form of iteration
Analyysis Components Gene-protein classes Sequence classes CODING-GENES-OF COMMON-ORTHOLOGS-OF GENES-OF NONCODING-GENES-OF PROTEINS-OF Undo | Redo Workspace FOR-EACH gene IN | Control section – Determines form of iteration Initialization section – Initializes loop variables before the loop begins Variable update section – Resets loop variables each iteration Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
11
Control section – Determines form of iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF organism-or-replicon-or-protein Control section – Determines form of iteration Initialization section – Initializes loop variables before the loop begins Variable update section – Resets loop variables each iteration Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
12
No other iteration controls needed, so get rid of section.
Undo | Redo Workspace FOR-EACH gene IN GENES-OF A7120| Control section – Determines form of iteration Initialization section – Initializes loop variables before the loop begins Variable update section – Resets loop variables each iteration Body – Forms to be iterated No other iteration controls needed, so get rid of section. Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
13
No initialization needed, so get rid of that section too.
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Initialization section – Initializes loop variables before the loop begins Variable update section – Resets loop variables each iteration Body – Forms to be iterated Results section – Determines the result returned by the loop No initialization needed, so get rid of that section too. Final action – To be performed after last iteration Results
14
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Need to define the match for each gene, so open up variable update section. Results
15
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration Help Copy section Cut section Delete section ASSIGN variable ASSIGN variable-list Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Section-specific possibilities appear below dashed line (ASSIGN maps to AS). Results
16
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration The variable match will be the specific sequence upstream from a gene that matches the pattern. ASSIGN = variable name value Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
17
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = match| value Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
18
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration I just realized… I want to confine the search to upstream sequences of length > 20 ASSIGN = match | Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
19
Variable update section – Resets loop variables each iteration
Logical comparison Logical connectives Loops and conditional executions Other logic functions BOTH EITHER FOR-EACH IF IF-NOT LOOP NOT ORDER Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = match | Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
20
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = match IF condition THEN form ELSE form Note that IF is built like FOR-EACH, consisting of a required argument plus two sections (dark cyano). The THEN section is required (so no X) but the ELSE block is optional. Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
21
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = match IF | THEN form ELSE form Another problem… I can't compare the length of the upstream region to 20 if the upstream region doesn't exist! (This happens when two genes are right next to each other). I need to protect against that possibility. Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
22
Variable update section – Resets loop variables each iteration
Logical comparison Logical connectives Loops and conditional executions Other logic functions BOTH EITHER FOR-EACH IF IF-NOT LOOP NOT ORDER Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = match IF | THEN form ELSE form Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
23
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = match IF BOTH AND condition THEN form ELSE form Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
24
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = match IF BOTH AND upseq| condition THEN form ELSE form Body – Forms to be iterated I invent a variable upseq containing the upstream sequence, which must exist for the condition to be fulfilled. I'll worry later about defining it. Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
25
I want upseq's length (call it upseq-L) to be greater than 20.
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = match IF BOTH AND upseq | THEN form ELSE form Body – Forms to be iterated I want upseq's length (call it upseq-L) to be greater than 20. Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
26
Variable update section – Resets loop variables each iteration
Logical comparison Logical connectives Loops and conditional executions Other logic functions BOTH EITHER FOR-EACH IF IF-NOT LOOP NOT ORDER Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = match IF BOTH AND upseq | THEN form ELSE form Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
27
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER item comparator item = THEN form ELSE form Here is a new category of things: Informational tokens (required choices). The token box has a title and a list of possible values. The box cannot be deleted. Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
28
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER item comparator item Help LESS-THAN SAME-AS GREATER-THAN = THEN form ELSE form The is Windows convention to indicate more (but less likely) choices below. Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
29
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER item GREATER-THAN item = THEN form ELSE form Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
30
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER eq-l| GREATER-THAN item = THEN form ELSE form I type in the variable name, upseq-l, but since it's bigger than the box, the letters scroll. Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
31
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20| = THEN form If the condition is met, then I look for a match of the pattern in the upstream sequence. ELSE form Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
32
MATCH-OF is a function related to string analysis.
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN | ELSE form Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
33
Variable update section – Resets loop variables each iteration
Bioinformatic tools String analysis String extraction String production String type checks Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN | ELSE form Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
34
Variable update section – Resets loop variables each iteration
Bioinformatic tools String analysis String extraction String production String type checks ALIGNMENT-OF ALPHABET-OF BACKGROUND-FREQUENCIES-OF COUNT-OF GC-FRACTION-OF LENGTH-OF MATCH-OF MATCHES-OF NUCLEOTIDE-DISTANCE Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN | ELSE form Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
35
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF query type query IN target ELSE form Here's another informational token box. Like option boxes, they're cyano, so users will not be tempted to fill them. Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
36
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF query type query IN target Item Pattern Restriction enzyme Slot value ELSE form Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
37
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN query IN target ELSE form Input the pattern: "[AT]TGC.{8}CAT" i.e. A or T, then TGC, then eight unspecified, then CAT Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
38
Again, the string scrolls, because it's bigger than the box.
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN {8}CAT"| IN target ELSE form Again, the string scrolls, because it's bigger than the box. The target is upseq, which I grab from a previous input box. Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
39
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 Help Copy Cut Target for wrap = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN target ELSE form Note the shortened menu. Only functions and global variables can be evaluated. Edit is not necessary any longer. Insert and Cut/insert strike me as too non-intuitive. Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
40
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN target ELSE form Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
41
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN target Help Paste Target for wrap ELSE form Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
42
No plans for the ELSE section, so delete it.
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq ELSE form No plans for the ELSE section, so delete it. Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
43
Ditto with Body section.
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Body – Forms to be iterated Ditto with Body section. Results section – Determines the result returned by the loop Final action – To be performed after last iteration Results
44
When match exists, COLLECT it.
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop When match exists, COLLECT it. Final action – To be performed after last iteration Results
45
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop Help Delete section APPEND COLLECT COUNT MAXIMIZE MINIMIZE SUM WHEN conditon … UNLESS condition … Final action – To be performed after last iteration Results
46
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop Help Delete section APPEND COLLECT COUNT MAXIMIZE MINIMIZE SUM WHEN conditon … UNLESS condition … Final action – To be performed after last iteration APPEND COLLECT COUNT MAXIMIZE MINIMIZE SUM Results
47
Grab match from previous box.
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT Grab match from previous box. condition form Final action – To be performed after last iteration Results
48
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match Help Copy Cut Target for wrap IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT condition form Final action – To be performed after last iteration Results
49
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT condition form Final action – To be performed after last iteration Results
50
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT condition Help Paste Target for wrap form Final action – To be performed after last iteration Results
51
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match form Final action – To be performed after last iteration Results
52
I want to save both the gene and the match, so I need a list.
Undo | Redo I want to save both the gene and the match, so I need a list. Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match | Final action – To be performed after last iteration Results
53
Variable update section – Resets loop variables each iteration
List / table analysis List / table extraction List / table production List / table type-checks LIST PART-OF Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match | Final action – To be performed after last iteration Results
54
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match LIST is described in the menu as the easily comprehended "LIST" but represented as the compact { } and is born empty. { } Final action – To be performed after last iteration Results
55
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT Since LIST has no options, the arrow is used to generate new elements quickly match { } element Final action – To be performed after last iteration Results
56
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } element element Final action – To be performed after last iteration Results
57
I recall that match is still copied, so I use it.
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT I recall that match is still copied, so I use it. match { } gene| element Final action – To be performed after last iteration Results
58
I recall that match is still copied, so I use it.
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT I recall that match is still copied, so I use it. match { } gene| element Final action – To be performed after last iteration Results
59
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene element Help Paste Target for wrap Final action – To be performed after last iteration Results
60
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT Housekeeping. match { } gene match Final action – To be performed after last iteration Results
61
Finally the task of defining the two variables I invented on the fly.
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT Finally the task of defining the two variables I invented on the fly. match { } gene match Results
62
ASSIGN here places a new ASSIGN clause at the beginning of the list.
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration Help Clear section Copy section Cut section Delete section ASSIGN variable ASSIGN variable-list ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT ASSIGN here places a new ASSIGN clause at the beginning of the list. match { } gene match Results
63
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = variable name value ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = Note that ASSIGN clauses are cyano, not yellow/orange, like functions, but they're a lighter shade, to set them apart from one another THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene match Results
64
Upseq will be given the SEQUENCE-UPSTREAM-OF the current gene.
Undo | Redo Workspace Upseq will be given the SEQUENCE-UPSTREAM-OF the current gene. FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq| value ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene match Results
65
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq | ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene match Results
66
Variable update section – Resets loop variables each iteration
Descrtipion / analysis Gene neighborhood Gene / protein types Translation DESCRIPTION-OF ORTHOLOG-OF SEQUENCE-OF Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq | ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene match Results
67
Variable update section – Resets loop variables each iteration
Descrtipion / analysis Gene neighborhood Gene / protein types Translation DESCRIPTION-OF ORTHOLOG-OF SEQUENCE-OF CONTEXT-OF GENE-DOWNSTREAM-OF GENE-LEFT-OF GENE-RIGHT-OF GENE-UPSTREAM-OF GENES-OF SEQUENCE-DOWNSTREAM-OF SEQUENCE-LEFT-OF SEQUENCE-RIGHT-OF SEQUENCE-UPSTREAM-OF Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq | ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene match Results
68
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq SEQUENCE-UPSTREAM-OF gene-or-protein ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene match Results
69
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq SEQUENCE-UPSTREAM-OF gene| ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT Now assign upseq-l. match { } gene match Results
70
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq SEQUENCE-UPSTREAM-OF gene ASSIGN variable ASSIGN variable-list ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT ASSIGN here places a new ASSIGN clause at the position of the arrow. It's therefore possible to put an ASSIGN anywhere match { } gene match Results
71
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq SEQUENCE-UPSTREAM-OF gene ASSIGN = variable name value ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene match Results
72
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq SEQUENCE-UPSTREAM-OF gene ASSIGN = variable name value ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 Help Copy Cut Target for wrap = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene match Results
73
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq SEQUENCE-UPSTREAM-OF gene ASSIGN = variable name value ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene match Results
74
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq SEQUENCE-UPSTREAM-OF gene ASSIGN = variable name value Help Paste Target for wrap ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene match Results
75
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq SEQUENCE-UPSTREAM-OF gene ASSIGN = upseq-l value ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene match Results
76
Upseq-l is given the length of the upstream sequence, upseq.
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq SEQUENCE-UPSTREAM-OF gene ASSIGN = upseq-l | ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene match Results
77
Variable update section – Resets loop variables each iteration
Descrtipion / analysis Gene neighborhood Gene / protein types Translation DESCRIPTION-OF ORTHOLOG-OF SEQUENCE-OF Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq SEQUENCE-UPSTREAM-OF gene ASSIGN = upseq-l | ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene match Results
78
Variable update section – Resets loop variables each iteration
Descrtipion / analysis Gene neighborhood Gene / protein types Translation DESCRIPTION-OF ORTHOLOG-OF SEQUENCE-OF COG-ID-OF DESCRIPTION-OF ENCODES-PROTEIN? GENE-DESCRIBED-BY GENE-NAMED GENE-OF HYDROPHOBICITY-OF LENGTH-OF LENGTHS-OF MW-OF NAME-OF ORTHOLOG-OF PROTEIN-NAMED PROTEIN-OF Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq SEQUENCE-UPSTREAM-OF gene ASSIGN = upseq-l | ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene match Results
79
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq SEQUENCE-UPSTREAM-OF gene ASSIGN = upseq-l entity-or-list-or-string LENGTH-OF ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene match Results
80
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq SEQUENCE-UPSTREAM-OF gene ASSIGN = upseq-l entity-or-list-or-string LENGTH-OF Help Paste Target for wrap ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene match Results
81
Clicking the filled input box immediately opens it for editing
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq SEQUENCE-UPSTREAM-OF gene Clicking the filled input box immediately opens it for editing ASSIGN = upseq-l LENGTH-OF upseq-l ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene match Results
82
DONE! Execute. Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq SEQUENCE-UPSTREAM-OF gene ASSIGN = upseq-l LENGTH-OF upseq-l | ASSIGN match IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene match Results
83
Variable update section – Resets loop variables each iteration
Undo | Redo Workspace FOR-EACH gene IN GENES-OF Help Execute Copy Cut Show code Target for wrap variable IN list variable-list IN list of lists variable FROM number variable FROM number TO number a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq SEQUENCE-UPSTREAM-OF gene ASSIGN = upseq-l LENGTH-OF upseq ASSIGN pattern IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene match Results
84
Compare Click anywhere
85
Click anywhere Compare
Undo | Redo Workspace FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = upseq SEQUENCE-UPSTREAM-OF gene ASSIGN = upseq-l LENGTH-OF upseq ASSIGN pattern IF BOTH AND upseq ORDER upseq-l GREATER-THAN 20 = THEN MATCH-OF PATTERN "[AT]TGC{8}CAT" IN upseq Results section – Determines the result returned by the loop WHEN COLLECT match { } gene match Results Click anywhere
86
Proposed form of LOOP and IF - Some features:
FOR-EACH gene IN GENES-OF a7120 Variable update section – Resets loop variables each iteration ASSIGN = match IF condition THEN form ELSE form Body – Forms to be iterated Results section – Determines the result returned by the loop Final action – To be performed after last iteration Proposed form of LOOP and IF - Some features: Sections are self-explained and set apart using same convention as keywords (cyano, no border) to indicate that it's nonfillable. Informative token boxes Wasteful of space, maximizes comprehensibility END
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.