-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtripal_ssr.install
132 lines (111 loc) · 2.95 KB
/
tripal_ssr.install
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
<?php
function tripal_ssr_install() {
tripal_ssr_install_local_terms();
}
/**
* Inserts local cvterms.
*/
function tripal_ssr_install_local_terms() {
tripal_insert_cvterm([
'name' => 'associated_with',
'def' => '.',
'accession' => 'associated_with',
'cv_name' => 'sequence',
'db_name' => 'SO',
'is_relationship_type' => 1
]);
tripal_insert_cvterm([
'name' => 'tripal_ssr_motif',
'def' => 'An SSR motif.',
'cv_name' => 'feature_property',
'db_name' => 'tripal',
]);
tripal_insert_cvterm([
'name' => 'tripal_ssr_repeats',
'def' => 'The number of repeats in an SSR.',
'cv_name' => 'feature_property',
'db_name' => 'tripal',
]);
tripal_insert_cvterm([
'name' => 'tripal_ssr_start',
'def' => 'The start of an SSR.',
'cv_name' => 'feature_property',
'db_name' => 'tripal',
]);
tripal_insert_cvterm([
'name' => 'tripal_ssr_end',
'def' => 'The end of an SSR.',
'cv_name' => 'feature_property',
'db_name' => 'tripal',
]);
tripal_insert_cvterm([
'name' => 'tripal_ssr_forward_primer',
'def' => 'The forward primer of an SSR.',
'cv_name' => 'feature_property',
'db_name' => 'tripal',
]);
tripal_insert_cvterm([
'name' => 'tripal_ssr_reverse_primer',
'def' => 'The reverse primer of an SSR.',
'cv_name' => 'feature_property',
'db_name' => 'tripal',
]);
tripal_insert_cvterm([
'name' => 'tripal_ssr_forward_tm',
'def' => 'The forward melting temperature.',
'cv_name' => 'feature_property',
'db_name' => 'tripal',
]);
tripal_insert_cvterm([
'name' => 'tripal_ssr_reverse_tm',
'def' => 'The reverse melting temperature.',
'cv_name' => 'feature_property',
'db_name' => 'tripal',
]);
tripal_insert_cvterm([
'name' => 'tripal_ssr_product_size',
'def' => 'The product size of an SSR.',
'cv_name' => 'feature_property',
'db_name' => 'tripal',
]);
tripal_insert_cvterm([
'name' => 'tripal_associated_ssr',
'def' => 'This feature has predicted or confirmed SSRs associated with it.',
'cv_name' => 'feature_property',
'db_name' => 'tripal',
]);
}
function tripal_ssr_update_7200() {
$mview = chado_get_mview_id('feature_ssr_mview');
if ($mview) {
chado_delete_mview($mview);
}
}
/**
* Add associated ssrs cvterm
*/
function tripal_ssr_update_7201() {
tripal_insert_cvterm([
'name' => 'tripal_associated_ssr',
'def' => 'This feature has predicted or confirmed SSRs associated with it.',
'cv_name' => 'feature_property',
'db_name' => 'tripal',
]);
}
function tripal_ssr_update_7202(){
tripal_insert_cvterm([
'name' => 'associated_with',
'def' => '.',
'accession' => 'associated_with',
'cv_name' => 'sequence',
'db_name' => 'SO',
'is_relationship_type' => 1
]);
}
function tripal_ssr_uninstall() {
// Remove materialized views
$mview = chado_get_mview_id('feature_ssr_mview');
if ($mview) {
chado_delete_mview($mview);
}
}