-
Notifications
You must be signed in to change notification settings - Fork 1
/
database_schema.doc
239 lines (165 loc) · 9 KB
/
database_schema.doc
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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
POPULATING THE TABLES
The Datahandler Table
---------------------
Example:
+----------------+--------------+------------------------------+----------------------+------+
| datahandler_id | iohandler_id | method | argument | rank |
+----------------+--------------+------------------------------+----------------------+------+
| 1 | 1 | get_BioDatabaseAdaptor | | 1 |
| 2 | 1 | fetch_BioSeqDatabase_by_name | ensembl_human_28_pep | 2 |
| 3 | 1 | get_Seq_by_id | INPUT | 3 |
| 4 | 2 | get_ScoreAdaptor | | 1 |
| 5 | 2 | store_by_PID | OUTPUT | 2 |
| 6 | 3 | get_ScoreAdaptor | | 1 |
| 7 | 3 | fetch_by_dbID | INPUT | 2 |
| 8 | 4 | get_FamilyAdaptor | | 1 |
| 9 | 4 | store | OUTPUT | 2 |
+----------------+--------------+------------------------------+----------------------+------+
datahandler_id:
The datahandler_id is different for each method
iohandler_id:
Each iohandler represents a series of steps that gets the input or writes the output etc.
Hence the iohandler_id for methods involved in getting the input for the runnable will be different from the iohandler_id for methods involved in passing the output from the runnable.
method:
It is required to pass in the methods that implements each step of the iohandler.
Example :To use Genscan Runnable in the pipeline, we need to pass a Bio::PrimarySeq object as the input to the runnable.
method 1:DBAdaptor->get_contig(id) (get_contig gives a contig(no argument for this method)
method 2:contig1->perl_primary_seq (perl_primary_seq gives a Bio::PrimarySeq object(argument for this will be INPUT as were passing this in.)
argument:
The argument will be INPUT if the method's return is the input to the runnable.
The argument will be OUTPUT if the method stores the output.
rank:
Rank refers to the sequence of steps for each iohandler.
===========================================================================================================================================
The Analysis Table
------------------
Example:
+-------------+---------------------+------------+-----------------------------------+---------+------------+-------------------------------------+----------+-----------------+--------------+-------------------------+------------+-------------+---------------+
| analysis_id | created | logic_name | runnable | db | db_version | db_file
| program | program_version | program_file | parameters | gff_source | gff_feature | node_group_id |
+-------------+---------------------+------------+-----------------------------------+---------+------------+-------------------------------------+----------+-----------------+--------------+-------------------------+------------+-------------+---------------+
| 1 | 2002-06-18 10:56:29 | Genscan | Bio::Pipeline::Runnable::Blast | All_Pep | june_02 | /data0/family_run_17_6_2002/all_pep | blastall | 2.0 | blastall | -p blastp -e 0.00001 | | | 0 |
| 2 | 2002-06-21 00:15:53 | TribeMCL | Bio::Pipeline::Runnable::TribeMCL | | |
| | | | -inputtype pairs -I 3.0 | | | 0 |
+-------------+---------------------+------------+-----------------------------------+---------+------------+-------------------------------------+----------+-----------------+--------------+-------------------------+------------+-------------+---------------+
analysis_id:
Each analysis has a unique analysis_id
created:
logic_name:
runnable:
The runnable corresponding to this analysis
db:
database(if the runnbale requires a database e.g Blast)
program:
The binary program thats being used for that analysis
parameters:
The parameters that the runnable/program requires
gff_source:
Gff_feature:
===========================================================================================================================================
The analysis_output_handler Table
---------------------------------
Example:
+-------------+--------------+
| analysis_id | iohandler_id |
+-------------+--------------+
| 1 | 2 |
| 2 | 4 |
+-------------+--------------+
Note: For each of the analysis_id the corresponding iohandler_id is populated (where the argument is OUTPUT in the datahandler table)
===========================================================================================================================================
The dbadaptor Table
-------------------
Example:
+--------------+----------------+--------+-------+------+------+-------------------------+
| dbadaptor_id | dbname | driver | host | user | pass | module |
+--------------+----------------+--------+-------+------+------+-------------------------+
| 1 | biosql_june_02 | mysql | mysql | root | | Bio::DB::SQL::DBAdaptor |
+--------------+----------------+--------+-------+------+------+-------------------------+
dbadaptor_id:
The id of the dbadaptor
dbname:
The database name(database to get the input/ write the output e.g ensembl_120)
driver:
host:
user:
pass:
module:
The adaptor for the database(dbname)
===========================================================================================================================================
The input Table
---------------
Example:
+----------+-----------------+--------+--------------+
| input_id | name | job_id | iohandler_id |
+----------+-----------------+--------+--------------+
| 1 | ENSP00000000233 | 1 | 1 |
| 2 | ENSP00000000412 | 2 | 1 |
+----------+-----------------+--------+--------------+
Note: The user has to populate this table with the inputs for the analysis.
input_id:
name:
job_id:
iohandler_id:
===========================================================================================================================================
The iohandler Table
-------------------
Example:
+--------------+--------------+--------+
| iohandler_id | dbadaptor_id | type |
+--------------+--------------+--------+
| 1 | 1 | INPUT |
| 2 | 1 | OUTPUT |
| 3 | 1 | INPUT |
| 4 | 1 | OUTPUT |
+--------------+--------------+--------+
Note: The dbadaptor_id is unique for each dbadaptor(hence database as each database has unique dbadaptor)
type:
The type of the iohandler
===========================================================================================================================================
The job Table
-------------
Example:
+--------+------------+-------------+----------+-------------+-------------+-------------+--------+-------+---------------------+-------------+
| job_id | process_id | analysis_id | queue_id | stdout_file | stderr_file | object_file | status | stage | time | retry_count |
+--------+------------+-------------+----------+-------------+-------------+-------------+--------+-------+---------------------+-------------+
| 1 | NEW | 1 | 0 | | | | NEW | | 0000-00-00 00:00:00 |
0 |
| 2 | NEW | 1 | 0 | | | | NEW | | 0000-00-00 00:00:00 |
0 |
+--------+------------+-------------+----------+-------------+-------------+-------------+--------+-------+---------------------+-------------+
job_id:
process_id:
analysis_id:
queue_id:
stdout_file:
stderr_file:
object_file:
status:
stage:
time:
retry_count:
===========================================================================================================================================
The new_input_ioh Table
-----------------------
Example:
+-------------+--------------+
| analysis_id | iohandler_id |
+-------------+--------------+
| 2 | 3 |
+-------------+--------------+
Note:
===========================================================================================================================================
The rule Table
--------------
Example:
+---------+---------+------+-----------------------+
| rule_id | current | next | action |
+---------+---------+------+-----------------------+
| 1 | 1 | 2 | WAITFORALL_AND_UPDATE |
+---------+---------+------+-----------------------+
rule_id:
current:
next:
action:
===========================================================================================================================================