Statistics
| Branch: | Revision:

root / dm3 / makeDb.sql @ 8c368a17

History | View | Annotate | Download (8.1 kB)

1
-- -------------------
2
--                  --
3
--    dm3heatmap    --
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/dm3/",
29
"/srv/epgg/data/data/subtleKnife/seq/dm3.gz",
30
"GSM461185_2,GSM621339_1,GSM461179_1,GSM432583_1,GSM686709_1,GSM575393_1,GSM627411_2,GSM847771_1,GSM627387_2,GSM575380_1,GSM461206_1,GSM627336_1,GSM520852_1,GSM847659_1,GSM669543_1,GSM451804_1,GSM333849_1,GSM621333_1,GSM624872_1,GSM853480_1,GSM575368_1,GSM927232_1,GSM408988_1,GSM520939_1",
31
"Cell Line,Tissue,Assay,Institution",
32
"CYP4Z1\\nCYP2A7\\nCYP2A6\\nCYP3A4\\nCYP1A1\\nCYP4V2\\nCYP51A1\\nCYP2C19\\nCYP26B1\\nCYP11B2\\nCYP24A1\\nCYP4B1\\nCYP2C8",
33
"3,http://vizhub.wustl.edu/hubSample/dm3/1.gz,1,http://vizhub.wustl.edu/hubSample/dm3/bed.gz,5,http://vizhub.wustl.edu/hubSample/dm3/1_sorted.gz,100,http://vizhub.wustl.edu/hubSample/dm3/hub.txt",
34
"chr2L,1,chr2L,1000000",
35
"longrange,modencode",
36
"refGene,rmsk_ensemble",
37
"chr2L,chr2LHet,chr2R,chr2RHet,chr3L,chr3LHet,chr3R,chr3RHet,chr4,chrU,chrUextra,chrX,chrXHet,chrYHet,chrM",
38
\N,
39
\N,
40
true,
41
true,
42
"dme",
43
"Assembly version|dm3|Sequence source|<a href=http://hgdownload.cse.ucsc.edu/goldenPath/dm3/bigZips/ target=_blank>UCSC browser</a>|Date parsed|January 1, 2012|Chromosomes|8|Misc|7|Total bases|139,485,381|Logo art|<a href=http://imgs.sfgate.com/c/pictures/2006/06/30/mn_fruitflies30.jpg target=_blank>link</a>",
44
0,
45
false
46
);
47

    
48

    
49
-- grouping types on genomic features
50
-- table name defined in macro: TBN_GF_GRP
51
drop table if exists gfGrouping;
52
create table gfGrouping (
53
  id TINYINT not null primary key,
54
  name char(50) not null
55
);
56
insert into gfGrouping values (2, "Genes");
57
-- insert into gfGrouping values (3, "non-coding RNA");
58
insert into gfGrouping values (4, "RepeatMasker");
59
-- insert into gfGrouping values (6, "Sequence conservation");
60
insert into gfGrouping values (5, "Others");
61

    
62

    
63
drop table if exists decorInfo;
64
create table decorInfo (
65
  name char(50) not null primary key,
66
  printname char(100) not null,
67
  parent char(50) null,
68
  grp tinyint not null,
69
  fileType tinyint not null,
70
  hasStruct tinyint null,
71
  queryUrl varchar(255) null
72
);
73
load data local infile 'decorInfo' into table decorInfo;
74

    
75
drop table if exists track2Label;
76
create table track2Label (
77
  name varchar(255) not null primary key,
78
  label text null
79
);
80
load data local infile 'track2Label' into table track2Label;
81
load data local infile 'track2Label_longrange' into table track2Label;
82

    
83
drop table if exists track2ProcessInfo;
84
create table track2ProcessInfo (
85
  name varchar(255) not null primary key,
86
  detail text null
87
);
88
load data local infile 'track2ProcessInfo' into table track2ProcessInfo;
89
load data local infile 'track2ProcessInfo_longrange' into table track2ProcessInfo;
90

    
91
drop table if exists track2BamInfo;
92
create table track2BamInfo (
93
  name varchar(255) not null,
94
  bamfile varchar(255) not null,
95
  bamfilelabel varchar(255) not null
96
);
97
load data local infile "track2BamInfo" into table track2BamInfo;
98

    
99
drop table if exists track2Detail;
100
create table track2Detail (
101
  name varchar(255) not null primary key,
102
  detail text null
103
);
104
load data local infile 'track2Detail' into table track2Detail;
105
load data local infile 'track2Detail_longrange' into table track2Detail;
106

    
107
drop table if exists track2GEO;
108
create table track2GEO (
109
  name varchar(255) not null primary key,
110
  geo char(20) not null
111
);
112
load data local infile 'track2GEO' into table track2GEO;
113
load data local infile 'track2GEO_longrange' into table track2GEO;
114

    
115
drop table if exists track2Ft;
116
create table track2Ft (
117
  name varchar(255) not null primary key,
118
  ft tinyint not null
119
);
120
load data local infile "track2Ft" into table track2Ft;
121
load data local infile "track2Ft_longrange" into table track2Ft;
122

    
123
drop table if exists track2VersionInfo;
124
create table track2VersionInfo (
125
  name varchar(255) not null primary key,
126
  info varchar(255) not null
127
);
128
load data local infile 'track2VersionInfo' into table track2VersionInfo;
129

    
130

    
131
drop table if exists track2Annotation;
132
create table track2Annotation (
133
  name varchar(255) not null primary key,
134
  attridx varchar(255) not null
135
);
136
load data local infile "track2Annotation" into table track2Annotation;
137
load data local infile "track2Annotation_longrange" into table track2Annotation;
138

    
139
drop table if exists track2Style;
140
create table track2Style (
141
  name varchar(255) not null primary key,
142
  style text not null
143
);
144
load data local infile "track2Style" into table track2Style;
145
load data local infile "track2Style_longrange" into table track2Style;
146

    
147
drop table if exists track2Regions;
148
create table track2Regions (
149
  name varchar(255) not null primary key,
150
  regionname varchar(255) not null,
151
  regions text not null
152
);
153

    
154
drop table if exists track2Categorical;
155
create table track2Categorical (
156
  name varchar(255) not null primary key,
157
  info text not null
158
);
159
load data local infile 'track2Categorical' into table track2Categorical;
160

    
161

    
162
drop table if exists metadataVocabulary;
163
create table metadataVocabulary (
164
  child varchar(255) not null,
165
  parent varchar(255) not null
166
);
167
load data local infile "metadataVocabulary" into table metadataVocabulary;
168

    
169
drop table if exists trackAttr2idx;
170
create table trackAttr2idx (
171
  idx varchar(255) not null primary key,
172
  attr varchar(255) not null,
173
  note varchar(255) null,
174
  description text null
175
);
176
load data local infile "trackAttr2idx" into table trackAttr2idx;
177

    
178

    
179
drop table if exists tempURL;
180
create table tempURL (
181
  session varchar(100) not null,
182
  offset INT unsigned not null,
183
  urlpiece text not null
184
);
185

    
186
drop table if exists dataset;
187
create table dataset (
188
  tablename varchar(255) not null,
189
  logo varchar(255) null,
190
  name varchar(255) not null,
191
  url varchar(255) null,
192
  description text not null
193
);
194
load data local infile "dataset" into table dataset;
195

    
196
/*
197
drop table if exists mock;
198
create table mock (
199
  tkname varchar(255) not null
200
);
201
load data local infile "mock" into table mock;
202
*/
203

    
204
drop table if exists modencode;
205
create table modencode (
206
  tkname varchar(255) not null
207
);
208
load data local infile "modencode" into table modencode;
209

    
210
drop table if exists longrange;
211
create table longrange (
212
  tkname varchar(255) not null
213
);
214
load data local infile "longrange" into table longrange;
215

    
216

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

    
225

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

    
237

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