Statistics
| Branch: | Revision:

root / AGPv2 / makeDb.sql @ 71d28e6f

History | View | Annotate | Download (9.2 kB)

1
-- ------------------------
2
--                       --
3
--      AGPv2heatmap     --
4
--                       --
5
-- ------------------------
6
drop table if exists config;
7
create table config (
8
  bbiPath text not null,
9
  seqPath text null,
10
  defaultTracks text not null,
11
  defaultMdcategory varchar(255) not null,
12
  defaultGenelist text not null,
13
  defaultCustomtracks text not null,
14
  defaultPosition varchar(255) not null,
15
  defaultDataset varchar(255) not null,
16
  defaultDecor text null,
17
  defaultScaffold text not null,
18
  ideogram_wiggle1 varchar(255) null,
19
  ideogram_wiggle2 varchar(255) null,
20
  hasGene boolean not null,
21
  allowJuxtaposition boolean not null,
22
  keggSpeciesCode varchar(255) null,
23
  information text not null,
24
  runmode tinyint not null,
25
  initmatplot boolean not null
26
);
27
insert into config values(
28
"/srv/epgg/data/data/subtleKnife/b73_AGPv2/",
29
"/srv/epgg/data/data/subtleKnife/seq/AGPv2.gz",
30
"mock1,mock2,mock3,mock4,mock5,mock6,mock7,mock8,mock9,mock10,mock11,mock12,mock13,mock14,mock15,mock16,mock17,mock18,mock19,mock20", 
31
"Sample,mock term",
32
"gst23\\ngst40\\ngst8\\ngst30\\ngst14\\ngst11\\ngst12\\ngst16\\ngst7\\ngst19\\ngst41\\ngst9\\ngst35\\ngst24\\ngst31\\nBz2",
33
"3,http://vizhub.wustl.edu/hubSample/AGPv2/rand4.gz,1,http://vizhub.wustl.edu/hubSample/AGPv2/sample.gz,100,http://vizhub.wustl.edu/hubSample/AGPv2/hub.txt",
34
"chr1,11500000,chr1,12000000",
35
"mock",
36
"refGene,AGPv2_5a",
37
"chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10",
38
\N,\N,
39
true,
40
true,
41
"zma",
42
"Strain|B73|Assembly version|AGPv2|Sequence source|<a href=http://www.maizesequence.org target=_blank>maizesequence.org</a>|Date parsed|May 19, 2012|Chromosomes|13|Contigs|0|Total bases|3,232,254,451|Logo art|<a href=http://en.wikipedia.org/wiki/File:Zea_mays_-_K%C3%B6hler%E2%80%93s_Medizinal-Pflanzen-283.jpg target=_blank>link</a>",
43
0,
44
false
45
);
46

    
47
-- grouping types on genomic features
48
-- table name defined in macro: TBN_GF_GRP
49
drop table if exists gfGrouping;
50
create table gfGrouping (
51
  id TINYINT not null primary key,
52
  name char(50) not null
53
);
54
insert into gfGrouping values (2, "Genes");
55
insert into gfGrouping values (4, "TE Consortium repeats");
56
insert into gfGrouping values (5, "Others");
57

    
58

    
59

    
60

    
61
drop table if exists decorInfo;
62
create table decorInfo (
63
  name char(50) not null primary key,
64
  printname char(100) not null,
65
  parent char(50) null,
66
  grp tinyint not null,
67
  fileType tinyint not null,
68
  hasStruct tinyint null,
69
  queryUrl varchar(255) null
70
);
71
load data local infile 'decorInfo' into table decorInfo;
72
/*
73
insert into decorInfo values('AGPv2_5a','Maize genes',\N,2,0,1,'http://www.maizesequence.org/Zea_mays/Gene?db=core;gene=');
74
insert into decorInfo values('AGPv2_5apromoter','promoters (RefSeq genes)','AGPv2_5a',2,0,0,\N);
75
insert into decorInfo values('AGPv2_5autr3',"3' UTRs (RefSeq genes)",'AGPv2_5a',2,0,0,\N);
76
insert into decorInfo values('AGPv2_5autr5',"5' UTRs (RefSeq genes)",'AGPv2_5a',2,0,0,\N);
77
insert into decorInfo values('AGPv2_5aexons','exons (RefSeq genes)','AGPv2_5a',2,0,0,\N);
78
insert into decorInfo values('AGPv2_5aintrons','introns (RefSeq genes)','AGPv2_5a',2,0,0,\N);
79
insert into decorInfo values('refGene','RefSeq genes',\N,2,0,1,'http://www.ncbi.nlm.nih.gov/gene/?term=');
80
insert into decorInfo values('refGenepromoter','promoters (RefSeq genes)','refGene',2,0,0,\N);
81
insert into decorInfo values('refGeneutr3',"3' UTRs (RefSeq genes)",'refGene',2,0,0,\N);
82
insert into decorInfo values('refGeneutr5',"5' UTRs (RefSeq genes)",'refGene',2,0,0,\N);
83
insert into decorInfo values('refGeneexons','exons (RefSeq genes)','refGene',2,0,0,\N);
84
insert into decorInfo values('refGeneintrons','introns (RefSeq genes)','refGene',2,0,0,\N);
85

    
86
insert into decorInfo values ('MTECrepeats','All repeats',\N, 4, 0, 0,\N);
87
insert into decorInfo values ('LINE','LINE',\N, 4, 0, 0,\N);
88
insert into decorInfo values ('LINE [RIL] L1','LINE [RIL] L1','LINE', 4, 0, 0,\N);
89
insert into decorInfo values ('LINE [RIX] Unknown','LINE [RIX] Unknown','LINE', 4, 0, 0,\N);
90
insert into decorInfo values ('LTR','LTR',\N, 4, 0, 0,\N);
91
insert into decorInfo values ('LTR [RLC] Copia','LTR [RLC] Copia','LTR', 4, 0, 0,\N);
92
insert into decorInfo values ('LTR [RLG] Gypsy','LTR [RLG] Gypsy','LTR', 4, 0, 0,\N);
93
insert into decorInfo values ('LTR [RLX] Unknown','LTR [RLX] Unknown','LTR', 4, 0, 0,\N);
94
insert into decorInfo values ('TIR','TIR',\N, 4, 0, 0,\N);
95
insert into decorInfo values ('TIR [DTA] hAT','TIR [DTA] hAT', 'TIR', 4, 0, 0,\N);
96
insert into decorInfo values ('TIR [DTC] CACTA','TIR [DTC] CACTA', 'TIR', 4, 0, 0,\N);
97
insert into decorInfo values ('TIR [DTH] Pif-Harbinger','TIR [DTH] Pif-Harbinger', 'TIR', 4, 0, 0,\N);
98
insert into decorInfo values ('TIR [DTM] Mutator','TIR [DTM] Mutator', 'TIR', 4, 0, 0,\N);
99
insert into decorInfo values ('TIR [DTT] Tc1-Mariner','TIR [DTT] Tc1-Mariner', 'TIR', 4, 0, 0,\N);
100

    
101
insert into decorInfo values ('gc5Base','GC percent', \N,5, 8, 0,\N);
102
*/
103

    
104
drop table if exists track2Label;
105
create table track2Label (
106
  name varchar(255) not null primary key,
107
  label text null
108
);
109
load data local infile 'track2Label' into table track2Label;
110

    
111
drop table if exists track2ProcessInfo;
112
create table track2ProcessInfo (
113
  name varchar(255) not null primary key,
114
  detail text null
115
);
116
load data local infile 'track2ProcessInfo' into table track2ProcessInfo;
117

    
118
drop table if exists track2BamInfo;
119
create table track2BamInfo (
120
  name varchar(255) not null,
121
  bamfile varchar(255) not null,
122
  bamfilelabel varchar(255) not null
123
);
124
load data local infile "track2BamInfo" into table track2BamInfo;
125

    
126
drop table if exists track2Detail;
127
create table track2Detail (
128
  name varchar(255) not null primary key,
129
  detail text null
130
);
131
load data local infile 'track2Detail' into table track2Detail;
132

    
133
drop table if exists track2GEO;
134
create table track2GEO (
135
  name varchar(255) not null primary key,
136
  geo char(20) not null
137
);
138
load data local infile 'track2GEO' into table track2GEO;
139

    
140
drop table if exists track2VersionInfo;
141
create table track2VersionInfo (
142
  name varchar(255) not null primary key,
143
  info varchar(255) not null
144
);
145
load data local infile 'track2VersionInfo' into table track2VersionInfo;
146

    
147
-- new trackDetail end here
148

    
149
drop table if exists track2Annotation;
150
create table track2Annotation (
151
  name varchar(255) not null primary key,
152
  attridx varchar(255) not null
153
);
154
load data local infile "track2Annotation" into table track2Annotation;
155

    
156
drop table if exists track2Ft;
157
create table track2Ft (
158
  name varchar(255) not null primary key,
159
  ft tinyint not null
160
);
161
load data local infile "track2Ft" into table track2Ft;
162

    
163
drop table if exists track2Style;
164
create table track2Style (
165
  name varchar(255) not null primary key,
166
  style text not null
167
);
168
load data local infile "track2Style" into table track2Style;
169

    
170
drop table if exists track2Regions;
171
create table track2Regions (
172
  name varchar(255) not null primary key,
173
    regionname varchar(255) not null,
174
          regions text not null
175
           );
176

    
177

    
178
drop table if exists metadataVocabulary;
179
create table metadataVocabulary (
180
  child varchar(255) not null,
181
  parent varchar(255) not null
182
);
183
load data local infile "metadataVocabulary" into table metadataVocabulary;
184

    
185
drop table if exists trackAttr2idx;
186
create table trackAttr2idx (
187
  idx varchar(255) not null primary key,
188
  attr varchar(255) not null,
189
  note varchar(255) null,
190
  description text null
191
);
192
load data local infile "trackAttr2idx" into table trackAttr2idx;
193

    
194

    
195
drop table if exists tempURL;
196
create table tempURL (
197
  session varchar(100) not null,
198
  offset INT unsigned not null,
199
  urlpiece text not null
200
);
201

    
202

    
203

    
204
drop table if exists dataset;
205
create table dataset (
206
  tablename varchar(255) not null,
207
  logo varchar(255) null,
208
  name varchar(255) not null,
209
  url varchar(255) null,
210
  description text not null
211
);
212
load data local infile "dataset" into table dataset;
213

    
214
drop table if exists mock;
215
create table mock (
216
  tkname varchar(255) not null
217
);
218
load data local infile "mock" into table mock;
219

    
220
drop table if exists scaffoldInfo;
221
create table scaffoldInfo (
222
  parent varchar(255) not null,
223
  child varchar(255) not null,
224
  childLength int unsigned not null
225
  );
226
load data local infile "scaffoldInfo" into table scaffoldInfo;
227

    
228

    
229
drop table if exists cytoband;
230
create table cytoband (
231
  id int null auto_increment primary key,
232
  chrom char(20) not null,
233
  start int not null,
234
  stop int not null,
235
  name char(20) not null,
236
  colorIdx int not null
237
);
238
load data local infile "cytoband" into table cytoband;
239

    
240
/*
241
DROP TABLE IF EXISTS `rmsk`;
242
CREATE TABLE `rmsk` (
243
  `bin` smallint(5) unsigned NOT NULL default '0',
244
  `swScore` int(10) unsigned NOT NULL default '0',
245
  `milliDiv` int(10) unsigned NOT NULL default '0',
246
  `milliDel` int(10) unsigned NOT NULL default '0',
247
  `milliIns` int(10) unsigned NOT NULL default '0',
248
  `genoName` varchar(255) NOT NULL default '',
249
  `genoStart` int(10) unsigned NOT NULL default '0',
250
  `genoEnd` int(10) unsigned NOT NULL default '0',
251
  `genoLeft` int(11) NOT NULL default '0',
252
  `strand` char(1) NOT NULL default '',
253
  `repName` varchar(255) NOT NULL default '',
254
  `repClass` varchar(255) NOT NULL default '',
255
  `repFamily` varchar(255) NOT NULL default '',
256
  `repStart` int(11) NOT NULL default '0',
257
  `repEnd` int(11) NOT NULL default '0',
258
  `repLeft` int(11) NOT NULL default '0',
259
  `id` char(1) NOT NULL default '',
260
  KEY `genoName` (`genoName`(14),`bin`)
261
);
262
load data local infile 'rmsk.txt' into table rmsk;
263
*/
264

    
265

    
266