-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsteptutorial.pl
More file actions
executable file
·220 lines (213 loc) · 7.13 KB
/
steptutorial.pl
File metadata and controls
executable file
·220 lines (213 loc) · 7.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print <<ENDHTML;
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>
ADAM Step-by-step tutorial
</title>
<link rel="stylesheet" type="text/css" href="/adam_style.css">
</head>
<body>
<div id="header">
ENDHTML
$header = &Constant_HTML('header.html');
print $header;
print <<ENDHTML;
</div>
<div id="main" >
<div id="nav">
ENDHTML
$navigation = &Constant_HTML('navigation.html');
print $navigation;
print <<ENDHTML;
<h1>
Detailed examples of how to use ADAM
</h1>
<p><font size="2">
<a href="#GS">Logical Model (GINsim)</a> <a href="#PDS">Polynomial Dynamical System</a> <a href="#PBN">Probabilistic Boolean Network</a> <a href="#LN">Large Network</a> <a href="#conj">Conjunctive Network</a></font>
</p>
<h2>
<a name="GS" id="GS">How to use a Logical Model (GINsim file) as an input</a>
</h2>
<p>
Select <b>Logical Model</b> as the format of the input functions
</p>
<p>
Note that input for number of states per node is not allowed as it is not needed. Adam pulls this information from the GINsim file.
</p>
<p>
Upload the 4 node Lambda Phage model named regulatoryGraph.ginml (inside the zipped folder phage4.zginml available <a href="http://gin.univ-mrs.fr/GINsim/model_repository/MICROBIOLOGICAL%20REGULATORY%20NETWORKS/Phage%20Lambda/PhageLambda/description.html">here</a>)
</p>
<p>
Select Simulation (as the model is small enough with only four nodes)
</p>
<p>
<img border="0" width="434" height="347" src="steptutorial_files/image002.png">
</p>
<p>
Click <i>Analyze</i> to view the outputs
</p>
<p>
<img border="0" width="434" height="111" src="steptutorial_files/image004.png">
</p>
<h2>
<a name="PDS" id="PDS">How to enter a Polynomial Dynamical System</a>
</h2>
<p>
Select <b>PDS</b> as the format for input functions
</p>
<p>
Enter the number of states each node may have. For this example, enter 3. This indicates each node may be 0, 1 or 2
</p>
<p>
Enter the functions in the text box below. For this example we will have 2 functions. Enter
</p>
<p>
f1 = x1*x2
</p>
<p>
f2 = x1+x2
</p>
<p>
Under network options, select simulation, as there are only 2 nodes. Leave synchronous selected for the updating scheme to have the states updated synchronously, and leave all trajectories selected to view the entire state space.
</p>
<p>
<img border="0" width="434" height="183" src="steptutorial_files/image006.png">
</p>
<p>
<img border="0" width="434" height="181" src="steptutorial_files/image008.png">
</p>
<p>
Click <i>Analyze</i> to view the results.
</p>
<p>
<img border="0" width="314" height="128" src="steptutorial_files/image010.png">
</p>
<h2>
<a name="PBN" id="PBN">How to Enter a Probabilistic Boolean Network</a>
</h2>
<p>
Select <b>PBN</b> as the format for function input.
</p>
<p>
The number of states per node must now be set to 2 and the drop-box to the right must be changed from polynomial to boolean.
</p>
<p>
For this example, enter the following for the functions:
</p>
<p>
f1 = (x1*x2)
</p>
<p>
f2 = (x1+x3)
</p>
<p>
f3 = (~(x1+x2))
</p>
<p>
This is read as f1 equals x1 AND x2, f2 equals x1 OR x3, f3 equals NOT (x1 OR x2). Note that each operation must have a set of parenthesis that correspond to it. It is important not to place extra sets of parenthesis in any of the equations. Note that changing f3 to (~((x1)+x2)) gives a different, incorrect output as there is an unnecessary set of parenthesis around x1.
</p>
<p>
Under network options, select simulation, as there are only 3 nodes. Leave synchronous selected for the updating scheme to have the states updated synchronously, and leave all trajectories selected to view the entire state space.
</p>
<p>
<img border="0" width="434" height="128" src="steptutorial_files/image012.png">
</p>
<p>
<img border="0" width="434" height="171" src="steptutorial_files/image014.png">
</p>
<p>
Click Analyze to view the ouput, which should be as follows:
</p>
<p>
<img border="0" width="414" height="130" src="steptutorial_files/image016.png">
</p>
<h2>
<a name="LN" id="LN">How to Enter a Large Network (number of nodes > 11)</a>
</h2>
<p>
Select GINsim as the format of the input functions.
</p>
<p>
Note that input for number of states per node is not allowed as it is not needed. Adam pulls this information from the GINsim file.
</p>
<p>
Upload the TCR model named TCRsig40.ginml(inside the zipped folder phage4.zginml available <a href="http://gin.univ-mrs.fr/GINsim/model_repository/MAMMALIAN%20REGULATORY%20NETWORKS/T%20lymphocytes/TCR_sig/description.html">here</a>).
</p>
<p>
Select Algorithms (as the model has 40 nodes and its state space is too large to be simulated), and enter 7 for the limit cycle length to view all 7-cycles.
</p>
<p>
<img border="0" width="434" height="233" src="steptutorial_files/image018.png">
</p>
<p>
Click <i>Analyze</i> to view the results. There is one 7-cycle.
</p>
<p>
<img border="0" width="434" height="39" src="steptutorial_files/image020.png">
</p>
<h2>
<a name="conj" id="conj">How to Enter a Conjunctive Network</a>
</h2>
<p>
Select <b>PBN</b> the format of input functions for this example (either PDS or PBN may be used).
</p>
<p>
The number of states per node must be set to two. Select Boolean as we are entering a PBN, but for a PDS select Polynomial.
</p>
<p>
In the function box enter
</p>
<p>
f1 = (x1*x3)
</p>
<p>
f2 = (x2*x1)
</p>
<p>
f3 = (x2*x3)
</p>
<p>
The functions must only use either the AND operator or the OR operator. Additionally, the dependency graph formed from these functions must be strongly connected.
</p>
<p>
<img border="0" width="434" height="128" src="steptutorial_files/image022.png">
</p>
<p>
Select Conjunctive network.
</p>
<p>
Leave synchronous selected for the updating scheme to have the states updated synchronously, and leave all trajectories selected to view the entire state space.
</p>
<p>
<img border="0" width="434" height="181" src="steptutorial_files/image024.png">
</p>
<p>
Click <i>Analyze</i> to view the results
</p>
<p>
<img border="0" width="434" height="49" src="steptutorial_files/image026.png">
</p>
</div>
<div id="nav">
<h2>
<a href="/cgi-bin/git/adam.pl">Back to ADAM</a> <a href="/userGuide.html">User Guide</a>
</h2>
</div>
</div>
</body>
</html>
ENDHTML
# read in a file to include it
sub Constant_HTML {
local(*FILE); # filehandle
local($file); # file path
local($HTML); # HTML data
$file = $_[0] || die "There was no file specified!\n";
open(FILE, "<$file") || die "Couldn't open $file!\n";
$HTML = do { local $/; <FILE> }; #read whole file in through slurp #mode (by setting $/ to undef)
close(FILE);
return $HTML;
}