File: apollo.inserts

package info (click to toggle)
libchado-perl 1.23-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 23,976 kB
  • ctags: 10,378
  • sloc: xml: 192,540; sql: 165,945; perl: 28,339; sh: 101; python: 73; makefile: 46
file content (302 lines) | stat: -rw-r--r-- 19,412 bytes parent folder | download | duplicates (2)
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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
--creates several items that Apollo expects to be in the database:
-- a property type cv and terms
-- a pub type cv and terms
-- a pubrelationship type cv and terms
-- a pubprop type cv and terms

--Rice    EST_match 
--Rice    cDNA_match
--Maize   EST_match
--Maize   cross_genome_match
--Rice    protein_match
--FgenesH:Monocot

insert into analysis (name,program,programversion,sourcename)
   values ('Rice_EST_match','blat','1','Rice_EST');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_cDNA_match','blat','1','Rice_cDNA');
insert into analysis (name,program,programversion,sourcename)
   values ('Maize_EST_match','blat','1','Maize_EST');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_protein_match','blat','1','Rice_protein');
insert into analysis (name,program,programversion,sourcename)
   values ('Maize_cross_genome_match','blat','1','Maize_genome');
insert into analysis (name,program,programversion,sourcename)
   values ('FgenesH_Monocot','FgenesH','1','na');
insert into analysis (name,program,programversion,sourcename)
   values ('Sorghum_EST_match','blat','1','Sourghum_EST');
insert into analysis (name,program,programversion,sourcename)
   values ('Barley_EST_match','blat','1','Barley_EST');
insert into analysis (name,program,programversion,sourcename)
   values ('Wheat_EST_match','blat','1','Wheat_EST');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_cross_genome_match','blat','1','Rice_genome');
insert into analysis (name,program,programversion,sourcename)
   values ('Millet_EST_match','blat','1','Millet_EST');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_Japonica_BACend_nucleotide_match','blat','1','Rice_Japonica_BACend');
insert into analysis (name,program,programversion,sourcename)
   values ('riceSativa_bacends_omap_nucleotide_match','blat','1','riceSativa_bacends_omap');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_Australiensis_BACend_nucleotide_match','blat','1','Rice_Australiensis_BACend');
insert into analysis (name,program,programversion,sourcename)
   values ('riceAustraliensis_bacends_omap_nucleotide_match','blat','1','riceAustraliensis_bacends_omap');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_Punctata_BACend_nucleotide_match','blat','1','Rice_Punctata_BACend');
insert into analysis (name,program,programversion,sourcename)
   values ('ricePunctata_bacends_omap_nucleotide_match','blat','1','ricePunctata_bacends_omap');
insert into analysis (name,program,programversion,sourcename)
   values ('Maize_MAGI_ISU_cross_genome_match','blat','1','Maize_MAGI_ISU'); 
insert into analysis (name,program,programversion,sourcename)
   values ('Maize_hi_cot_Bennetzen_cross_genome_match','blat','1','Maize_hi_cot_Bennetzen');
insert into analysis (name,program,programversion,sourcename)
   values ('Maize_meth_filt_hi_cot_cluster_cross_genome_match','blat','1','Maize_meth_filt_hi_cot_cluster');
insert into analysis (name,program,programversion,sourcename)
   values ('Maize_hi_cot_TIGR_cross_genome_match','blat','1','Maize_hi_cot_TIGR');
insert into analysis (name,program,programversion,sourcename)
   values ('Maize_BACend_cross_genome_match','blat','1','Maize_BACend');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_Nivara_BACend_nucleotide_match','blat','1','Rice_Nivara_BACend');
insert into analysis (name,program,programversion,sourcename)
   values ('riceNivara_bacends_omap_nucleotide_match','blat','1','riceNivara_bacends_omap');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_Rufipogon_BACend_nucleotide_match','blat','1','Rice_Rufipogon_BACend');
insert into analysis (name,program,programversion,sourcename)
   values ('riceRufipogon_bacends_omap_nucleotide_match','blat','1','riceRufipogon_bacends_omap');
insert into analysis (name,program,programversion,sourcename)
   values ('Sorghum_orion_cross_genome_match','blat','1','Sorghum_orion');
insert into analysis (name,program,programversion,sourcename)
   values ('Maize_meth_filt_CSHL_Mccombie_cross_genome_match','blat','1','Maize_meth_filt_CSHL_Mccombie');
insert into analysis (name,program,programversion,sourcename)
   values ('Maize_meth_filt_TIGR_cross_genome_match','blat','1','Maize_meth_filt_TIGR');
insert into analysis (name,program,programversion,sourcename)
   values ('Ryegrass_Sequence_cross_genome_match','blat','1','Ryegrass_Sequence');
insert into analysis (name,program,programversion,sourcename)
   values ('Ryegrass_Assembly_cross_genome_match','blat','1','Ryegrass_Assembly');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_Glaberrima_BACend_nucleotide_match','blat','1','Rice_Glaberrima_BACend');
insert into analysis (name,program,programversion,sourcename)
   values ('riceGlaberrima_bacends_omap_nucleotide_match','blat','1','riceGlaberrima_bacends_omap');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_unmapped_BAC_back_nucleotide_match','blat','1','Rice_unmapped_BAC_back');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_ArrayTarget_Affy57K_cDNA_match','blat','1','Rice_ArrayTarget_Affy57K');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_GI_EST_match','blat','1','Rice_GI');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_jap_cDNA_KOME_cDNA_match','blat','1','Rice_jap_cDNA_KOME');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_Brachyantha_BACend_nucleotide_match','blat','1','Rice_Brachyantha_BACend');
insert into analysis (name,program,programversion,sourcename)
   values ('riceBrachyantha_bacends_omap_nucleotide_match','blat','1','riceBrachyantha_bacends_omap');
insert into analysis (name,program,programversion,sourcename)
   values ('Osativa_TUG_PlantGDB_EST_match','blat','1','Osativa_TUG_PlantGDB');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_tug_EST_match','blat','1','Rice_tug');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_Alta_BACend_nucleotide_match','blat','1','Rice_Alta_BACend');
insert into analysis (name,program,programversion,sourcename)
   values ('riceAlta_bacends_omap_nucleotide_match','blat','1','riceAlta_bacends_omap');
insert into analysis (name,program,programversion,sourcename)
   values ('Sorghum_cluster_Pratt_EST_match','blat','1','Sorghum_cluster_Pratt');
insert into analysis (name,program,programversion,sourcename)
   values ('Maize_est_EST_match','blat','1','Maize_est');
insert into analysis (name,program,programversion,sourcename)
   values ('Maize_GI_EST_match','blat','1','Maize_GI');
insert into analysis (name,program,programversion,sourcename)
   values ('Maize_ArrayTarget_NSF58K_cDNA_match','blat','1','Maize_ArrayTarget_NSF58K');
insert into analysis (name,program,programversion,sourcename)
   values ('Zmays_TUG_PlantGDB_EST_match','blat','1','Zmays_TUG_PlantGDB');
insert into analysis (name,program,programversion,sourcename)
   values ('Wheat_est_EST_match','blat','1','Wheat_est');
insert into analysis (name,program,programversion,sourcename)
   values ('Wheat_GI_EST_match','blat','1','Wheat_GI');
insert into analysis (name,program,programversion,sourcename)
   values ('Wheat_tug_EST_match','blat','1','Wheat_tug');
insert into analysis (name,program,programversion,sourcename)
   values ('Taestivum_TUG_PlantGDB_EST_match','blat','1','Taestivum_TUG_PlantGDB');
insert into analysis (name,program,programversion,sourcename)
   values ('Wheat_ArrayTarget_Affy61K_cDNA_match','blat','1','Wheat_ArrayTarget_Affy61K');
insert into analysis (name,program,programversion,sourcename)
   values ('Barley_est_EST_match','blat','1','Barley_est');
insert into analysis (name,program,programversion,sourcename)
   values ('Barley_GI_EST_match','blat','1','Barley_GI');
insert into analysis (name,program,programversion,sourcename)
   values ('Barley_ArrayTarget_Affy22K_cDNA_match','blat','1','Barley_ArrayTarget_Affy22K');
insert into analysis (name,program,programversion,sourcename)
   values ('Hvulgare_TUG_PlantGDB_EST_match','blat','1','Hvulgare_TUG_PlantGDB');
insert into analysis (name,program,programversion,sourcename)
   values ('Sugarcane_est_EST_match','blat','1','Sugarcane_est');
insert into analysis (name,program,programversion,sourcename)
   values ('Barley_tug_EST_match','blat','1','Barley_tug');
insert into analysis (name,program,programversion,sourcename)
   values ('Maize_markers_cross_genome_match','blat','1','Maize_markers');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_ind_est_EST_match','blat','1','Rice_ind_est');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_ind_cluster_EST_match','blat','1','Rice_ind_cluster');
insert into analysis (name,program,programversion,sourcename)
   values ('Sorghum_GI_EST_match','blat','1','Sorghum_GI');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_est_EST_match','blat','1','Rice_est');
insert into analysis (name,program,programversion,sourcename)
   values ('Sorghum_CDNA_cDNA_match','blat','1','Sorghum_CDNA');
insert into analysis (name,program,programversion,sourcename)
   values ('Sorghum_est_EST_match','blat','1','Sorghum_est');
insert into analysis (name,program,programversion,sourcename)
   values ('Sbicolor_TUG_PlantGDB_EST_match','blat','1','Sbicolor_TUG_PlantGDB');
insert into analysis (name,program,programversion,sourcename)
   values ('Maize_tug_EST_match','blat','1','Maize_tug');
insert into analysis (name,program,programversion,sourcename)
   values ('Maize_ArrayTarget_Affy18K_cDNA_match','blat','1','Maize_ArrayTarget_Affy18K');
insert into analysis (name,program,programversion,sourcename)
   values ('Sorghum_tug_EST_match','blat','1','Sorghum_tug');
insert into analysis (name,program,programversion,sourcename)
   values ('Maize_cornsensus_cDNA_match','blat','1','Maize_cornsensus');
insert into analysis (name,program,programversion,sourcename)
   values ('Millet_est_EST_match','blat','1','Millet_est');
insert into analysis (name,program,programversion,sourcename)
   values ('Maize_CDs_cDNA_match','blat','1','Maize_CDs');
insert into analysis (name,program,programversion,sourcename)
   values ('Maize_Unigene_Panzea_EST_match','blat','1','Maize_Unigene_Panzea');
insert into analysis (name,program,programversion,sourcename)
   values ('Wheat_markers_cross_genome_match','blat','1','Wheat_markers');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_BAC_nucleotide_match','blat','1','Rice_BAC');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_unmapped_BAC_front_nucleotide_match','blat','1','Rice_unmapped_BAC_front');
insert into analysis (name,program,programversion,sourcename)
   values ('Sorghum_Markers_cross_genome_match','blat','1','Sorghum_Markers');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_CDS_cDNA_match','blat','1','Rice_CDS');
insert into analysis (name,program,programversion,sourcename)
   values ('Sorghum_gss-read_Klein_cross_genome_match','blat','1','Sorghum_gss-read_Klein');
insert into analysis (name,program,programversion,sourcename)
   values ('RiceAlta_BACend_OMAP_nucleotide_match','blat','1','RiceAlta_BACend_OMAP');
insert into analysis (name,program,programversion,sourcename)
   values ('RiceBrachyantha_BACend_OMAP_nucleotide_match','blat','1','RiceBrachyantha_BACend_OMAP');
insert into analysis (name,program,programversion,sourcename)
   values ('RiceJaponica_BACend_OMAP_nucleotide_match','blat','1','RiceJaponica_BACend_OMAP');
insert into analysis (name,program,programversion,sourcename)
   values ('RiceAustraliensis_BACend_OMAP_nucleotide_match','blat','1','RiceAustraliensis_BACend_OMAP');
insert into analysis (name,program,programversion,sourcename)
   values ('RiceCoarctata_BACend_OMAP_nucleotide_match','blat','1','RiceCoarctata_BACend_OMAP');
insert into analysis (name,program,programversion,sourcename)
   values ('RicePunctata_BACend_OMAP_nucleotide_match','blat','1','RicePunctata_BACend_OMAP');
insert into analysis (name,program,programversion,sourcename)
   values ('RiceGlaberrima_BACend_OMAP_nucleotide_match','blat','1','RiceGlaberrima_BACend_OMAP');
insert into analysis (name,program,programversion,sourcename)
   values ('RiceNivara_BACend_OMAP_nucleotide_match','blat','1','RiceNivara_BACend_OMAP');
insert into analysis (name,program,programversion,sourcename)
   values ('Rice_ESTCluster_PlantGDB_EST_match','blat','1','Rice_ESTCluster_PlantGDB');
insert into analysis (name,program,programversion,sourcename)
   values ('Barley_ESTCluster_PlantGDB_EST_match','blat','1','Barley_ESTCluster_PlantGDB');
insert into analysis (name,program,programversion,sourcename)
   values ('Wheat_ESTCluster_PlantGDB_EST_match','blat','1','Wheat_ESTCluster_PlantGDB');
insert into analysis (name,program,programversion,sourcename)
   values ('Sorghum_ESTCluster3P_LGBPratt_EST_match','blat','1','Sorghum_ESTCluster3P_LGBPratt');
insert into analysis (name,program,programversion,sourcename)
   values ('Sorghum_ESTCluster_PlantGDB_EST_match','blat','1','Sorghum_ESTCluster_PlantGDB');
insert into analysis (name,program,programversion,sourcename)
   values ('Maize_ESTCluster_PlantGDB_EST_match','blat','1','Maize_ESTCluster_PlantGDB');
insert into analysis (name,program,programversion,sourcename)
   values ('RiceRufipogon_BACend_OMAP_nucleotide_match','blat','1','RiceRufipogon_BACend_OMAP');
insert into analysis (name,program,programversion,sourcename)
   values ('Maize_Seq_Panzea_EST_match','blat','1','Maize_Seq_Panzea');
insert into analysis (name,program,programversion,sourcename)
   values ('RiceMinuta_BACend_OMAP_nucleotide_match','blat','1','RiceMinuta_BACend_OMAP');
insert into analysis (name,program,programversion,sourcename)
   values ('RiceGranulata_BACend_OMAP_nucleotide_match','blat','1','RiceGranulata_BACend_OMAP');
insert into analysis (name,program,programversion,sourcename)
   values ('RiceRidleyi_BACend_OMAP_nucleotide_match','blat','1','RiceRidleyi_BACend_OMAP');
insert into analysis (name,program,programversion,sourcename)
   values ('RiceOfficinalis_BACend_OMAP_nucleotide_match','blat','1','RiceOfficinalis_BACend_OMAP');


insert into db (name) values ('DB:TIGR_EGAD');
insert into db (name) values ('DB:Maize_Seq_Panzea');
insert into db (name) values ('DB:RiceRufipogon_BACend_OMAP');
insert into db (name) values ('DB:Maize_ESTCluster_PlantGDB');
insert into db (name) values ('DB:Sorghum_ESTCluster_PlantGDB');
insert into db (name) values ('DB:Sorghum_ESTCluster3P_LGBPratt');
insert into db (name) values ('DB:Wheat_ESTCluster_PlantGDB');
insert into db (name) values ('DB:Barley_ESTCluster_PlantGDB');
insert into db (name) values ('DB:Rice_ESTCluster_PlantGDB');
insert into db (name) values ('DB:RiceNivara_BACend_OMAP');
insert into db (name) values ('DB:RiceGlaberrima_BACend_OMAP');
insert into db (name) values ('DB:RicePunctata_BACend_OMAP');
insert into db (name) values ('DB:RiceCoarctata_BACend_OMAP');
insert into db (name) values ('DB:RiceJaponica_BACend_OMAP');
insert into db (name) values ('DB:RiceBrachyantha_BACend_OMAP');
insert into db (name) values ('DB:RiceAlta_BACend_OMAP');
insert into db (name) values ('DB:Sorghum_gss-read_Klein');
insert into db (name) values ('DB:Rice_CDS');
insert into db (name) values ('DB:Sorghum_Markers');
insert into db (name) values ('DB:Rice_BAC');
insert into db (name) values ('DB:Wheat_Markers');
insert into db (name) values ('DB:Maize_cornsensus');
insert into db (name) values ('DB:Sorghum_tug');
insert into db (name) values ('DB:Maize_tug');
insert into db (name) values ('DB:Sorghum_CDNA');
insert into db (name) values ('DB:Sorghum_GI');
insert into db (name) values ('DB:Rice_ind_cluster');
insert into db (name) values ('DB:Rice_ind_est');
insert into db (name) values ('DB:Maize_markers');
insert into db (name) values ('DB:Barley_tug');
insert into db (name) values ('DB:Sugarcane_est');
insert into db (name) values ('DB:Barley_GI');
insert into db (name) values ('DB:Wheat_tug');
insert into db (name) values ('DB:Wheat_GI');
insert into db (name) values ('DB:Wheat_est');
insert into db (name) values ('DB:Maize_GI');
insert into db (name) values ('DB:Sorghum_cluster_Pratt');
insert into db (name) values ('DB:EST_match');
insert into db (name) values ('DB:Rice_tug');
insert into db (name) values ('DB:cDNA_match');
insert into db (name) values ('DB:Rice_GI');
insert into db (name) values ('DB:TIGR_Maize');
insert into db (name) values ('DB:TIGR_Osa');
insert into db (name) values ('DB:nucleotide_match');
insert into db (name) values ('DB:Sorghum_Orion');
insert into db (name) values ('DB:cross_genome_match');
insert into db (name) values ('DB:Maize_hi_cot_TIGR');
insert into db (name) values ('DB:Maize_meth_filt_TIGR');

insert into pub (uniquename, title, type_id) values ('none', 'none', (select cvterm_id from cvterm where name = 'null pub' and cv_id in (select cv_id from cv where name='pub type') ) );

--for the new triggers

create sequence uniquename_id_generator;

insert into cvtermprop (cvterm_id,type_id,value) values ((select cvterm_id from cvterm where name='prefix' and cv_id in (select cv_id from cv where name='apollo')),(select cvterm_id from cvterm where name='is_a' and cv_id in (select cv_id from cv where name='relationship')),'RICE');
insert into cvtermprop (cvterm_id,type_id,value) values ((select cvterm_id from cvterm where name='suffix' and cv_id in (select cv_id from cv where name='apollo')),(select cvterm_id from cvterm where name='is_a' and cv_id in (select cv_id from cv where name='relationship')),'');

insert into dbxref (db_id, accession) values ((select db_id from db where name='null'),'Relationship Ontology:producedby');
insert into cvterm (name, cv_id, dbxref_id, is_relationshiptype) values ('producedby',(select cv_id from cv where name='Relationship Ontology'),(select dbxref_id from dbxref where accession = 'Relationship Ontology:producedby'),1);

CREATE TABLE feature_namegenerator (
  feature_namegenerator_id serial not null,
  primary key (feature_namegenerator_id),
  name varchar(255),
  type_id int,
  foreign key (type_id)  references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED,
  count int
--  constraint feature_namegenerator_c1 unique (name,type_id)
);

INSERT INTO feature_namegenerator (name,type_id,count)
SELECT substr(name, 0 , (position('-' in name))),
      (select cvterm_id from cvterm where cv_id=7 and name='transcript'),
       to_number(max(substring(name from 21)), '99999')
FROM feature WHERE name like 'RICE%-transcript%' group by name;

INSERT INTO feature_namegenerator (name,type_id,count)
SELECT substr(name, 0 , (position('-' in name))),
      (select cvterm_id from cvterm where cv_id=14 and name='protein'),
       to_number(max(substring(name from 19)), '99999')
FROM feature WHERE name like 'RICE%-protein%' group by name;

delete from  feature_namegenerator where feature_namegenerator_id not in
(select feature_namegenerator_id from feature_namegenerator where count = max(count) group by name,type_id);

alter table feature_namegenerator add constraint feature_namegenerator_c1 unique (name,type_id);