root / hg19 / makeDb.sql @ ed2c5f6e
History | View | Annotate | Download (10.7 kB)
1 |
-- -------------------
|
---|---|
2 |
-- --
|
3 |
-- hg19heatmap --
|
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 null, |
14 |
defaultPosition varchar(255) not null, |
15 |
defaultDataset varchar(255) not null, |
16 |
defaultDecor text null, |
17 |
defaultScaffold text 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) not 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/hg19/",
|
29 |
"/srv/epgg/data/data/subtleKnife/seq/hg19.gz",
|
30 |
"GSM959044_1,GSM521901,GSM469970,GSM521897,GSM521895,GSM521913,GSM469974,GSM521889,GSM469968,E12_25_bothAc_dense",
|
31 |
"Assay,Sample,Institution",
|
32 |
"CYP4Z1\\nCYP2A7\\nCYP2A6\\nCYP3A4\\nCYP1A1\\nCYP4V2\\nCYP51A1\\nCYP2C19\\nCYP26B1\\nCYP11B2\\nCYP24A1\\nCYP4B1\\nCYP2C8",
|
33 |
"3,http://vizhub.wustl.edu/hubSample/hg19/qual3.gz,1,http://vizhub.wustl.edu/hubSample/hg19/bed.gz,10,http://vizhub.wustl.edu/hubSample/hg19/K562POL2.gz,15,http://vizhub.wustl.edu/hubSample/hg19/sample.bigWig,100,http://vizhub.wustl.edu/hubSample/hg19/hub2.txt,18,http://vizhub.wustl.edu/hubSample/hg19/bam1.bam",
|
34 |
"chr7,27053398,chr7,27373766",
|
35 |
"roadmapepigenome,longrange",
|
36 |
"refGene,rmsk_ensemble",
|
37 |
"chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10,chr11,chr12,chr13,chr14,chr15,chr16,chr17,chr18,chr19,chr20,chr21,chr22,chrX,chrY,chrM",
|
38 |
"knownGene,0",
|
39 |
\N,
|
40 |
true,
|
41 |
true,
|
42 |
"hsa",
|
43 |
"Assembly version|hg19|Sequence source|<a href=http://hgdownload.cse.ucsc.edu/goldenPath/hg19/bigZips/ target=_blank>UCSC browser</a>|Date parsed|June 1, 2011|Chromosomes|25|Contigs & misc|68|Total bases|3,137,144,693|Logo art|<a href=http://turing.iimas.unam.mx/~cgg/gallery/EverybodysHive.html target=_blank>link</a>",
|
44 |
0,
|
45 |
false
|
46 |
); |
47 |
|
48 |
|
49 |
-- grouping types on genomic features
|
50 |
drop table if exists gfGrouping; |
51 |
create table gfGrouping ( |
52 |
id TINYINT not null primary key, |
53 |
name char(50) not null |
54 |
); |
55 |
insert into gfGrouping values (2, "Genes"); |
56 |
-- insert into gfGrouping values (3, "non-coding RNA");
|
57 |
insert into gfGrouping values (4, "RepeatMasker"); |
58 |
insert into gfGrouping values (6, "Sequence conservation"); |
59 |
insert into gfGrouping values (5, "G/C related"); |
60 |
insert into gfGrouping values (7, "Mappability (ENCODE)"); |
61 |
|
62 |
|
63 |
-- for genomic features that can be used as horizontal axis
|
64 |
-- each type of gf (except genome) will have a corresponding covering table
|
65 |
|
66 |
|
67 |
/* for stuff that can be plotted as decorative tracks (no genome)
|
68 |
the grp is also from gfGrouping table |
69 |
filetype: 0: server bigBed, 2: server bigWig |
70 |
name will be used to compose bbi file "name.bigBed" |
71 |
|
72 |
ambiguity with hasStruct field: |
73 |
if it is set to true, it indicates existance of both [x]symbol and [x]struct tables |
74 |
so currently it only works for gene model track (must belong to gene group) |
75 |
where generic genomic feature track wouldn't necessarily require [x]symbol table (might not be big trouble?) |
76 |
*/ |
77 |
drop table if exists decorInfo; |
78 |
create table decorInfo ( |
79 |
name char(50) not null primary key, |
80 |
printname char(100) not null, |
81 |
parent char(50) null, |
82 |
grp tinyint not null, |
83 |
fileType tinyint not null, |
84 |
hasStruct tinyint null, /* value must be 0/1, must not be boolean */ |
85 |
queryUrl varchar(255) null |
86 |
); |
87 |
load data local infile 'decorInfo' into table decorInfo; |
88 |
|
89 |
-- insert into decorInfo values ('wgRna',"sno/miRNA",\N, 5, 0, 0,\N);
|
90 |
|
91 |
/*
|
92 |
insert into decorInfo values('decorTrackgrp7', 'no name', \N, 7, 11, 0, \N); |
93 |
drop table if exists decorTrackselectiongrid; |
94 |
create table decorTrackselectiongrid ( |
95 |
groupname varchar(255) not null primary key, |
96 |
row_terms varchar(255) not null, |
97 |
col_terms varchar(255) not null |
98 |
); |
99 |
insert into decorTrackselectiongrid values('decorTrackgrp7','14018,14005,13047,14001,14028,11310,11101,13076','27001,27002,27003'); |
100 |
*/ |
101 |
|
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_roadmap' into table track2Label; |
110 |
load data local infile 'track2Label_encode' into table track2Label; |
111 |
load data local infile 'track2Label_longrange' into table track2Label; |
112 |
load data local infile 'track2Label_mock' into table track2Label; |
113 |
|
114 |
drop table if exists track2ProcessInfo; |
115 |
create table track2ProcessInfo ( |
116 |
name varchar(255) not null primary key, |
117 |
detail text null |
118 |
); |
119 |
load data local infile 'track2ProcessInfo_roadmap' into table track2ProcessInfo; |
120 |
load data local infile 'track2ProcessInfo_encode' into table track2ProcessInfo; |
121 |
|
122 |
drop table if exists track2BamInfo; |
123 |
create table track2BamInfo ( |
124 |
name varchar(255) not null, |
125 |
bamfile varchar(255) not null, |
126 |
bamfilelabel varchar(255) not null |
127 |
); |
128 |
load data local infile "track2BamInfo_roadmap" into table track2BamInfo; |
129 |
load data local infile "track2BamInfo_encode" into table track2BamInfo; |
130 |
load data local infile "track2BamInfo_test" into table track2BamInfo; |
131 |
|
132 |
drop table if exists track2Detail; |
133 |
create table track2Detail ( |
134 |
name varchar(255) not null primary key, |
135 |
detail text null |
136 |
); |
137 |
load data local infile 'track2Detail_decor' into table track2Detail; |
138 |
load data local infile 'track2Detail_roadmap' into table track2Detail; |
139 |
load data local infile 'track2Detail_encode' into table track2Detail; |
140 |
load data local infile 'track2Detail_longrange' into table track2Detail; |
141 |
|
142 |
drop table if exists track2GEO; |
143 |
create table track2GEO ( |
144 |
name varchar(255) not null primary key, |
145 |
geo char(20) not null |
146 |
); |
147 |
load data local infile 'track2GEO_roadmap' into table track2GEO; |
148 |
load data local infile 'track2GEO_encode' into table track2GEO; |
149 |
load data local infile 'track2GEO_longrange' into table track2GEO; |
150 |
|
151 |
drop table if exists track2VersionInfo; |
152 |
create table track2VersionInfo ( |
153 |
name varchar(255) not null primary key, |
154 |
info varchar(255) not null |
155 |
); |
156 |
load data local infile 'track2VersionInfo_roadmap' into table track2VersionInfo; |
157 |
load data local infile 'track2VersionInfo_encode' into table track2VersionInfo; |
158 |
|
159 |
|
160 |
drop table if exists track2Annotation; |
161 |
create table track2Annotation ( |
162 |
name varchar(255) not null primary key, |
163 |
attridx varchar(255) not null |
164 |
); |
165 |
load data local infile "track2Annotation_roadmap" into table track2Annotation; |
166 |
load data local infile "track2Annotation_encode" into table track2Annotation; |
167 |
load data local infile "track2Annotation_longrange" into table track2Annotation; |
168 |
load data local infile "track2Annotation_mock" into table track2Annotation; |
169 |
|
170 |
drop table if exists track2Ft; |
171 |
create table track2Ft ( |
172 |
name varchar(255) not null primary key, |
173 |
ft tinyint not null |
174 |
); |
175 |
load data local infile "track2Ft_roadmap" into table track2Ft; |
176 |
load data local infile "track2Ft_encode" into table track2Ft; |
177 |
load data local infile "track2Ft_longrange" into table track2Ft; |
178 |
load data local infile "track2Ft_mock" into table track2Ft; |
179 |
|
180 |
drop table if exists track2Categorical; |
181 |
create table track2Categorical ( |
182 |
name varchar(255) not null primary key, |
183 |
info text not null |
184 |
); |
185 |
load data local infile 'track2Categorical' into table track2Categorical; |
186 |
|
187 |
drop table if exists track2Style; |
188 |
create table track2Style ( |
189 |
name varchar(255) not null primary key, |
190 |
style text not null |
191 |
); |
192 |
load data local infile 'track2Style' into table track2Style; |
193 |
load data local infile 'track2Style_roadmap' into table track2Style; |
194 |
load data local infile 'track2Style_encode' into table track2Style; |
195 |
|
196 |
drop table if exists track2Regions; |
197 |
create table track2Regions ( |
198 |
name varchar(255) not null primary key, |
199 |
regionname varchar(255) not null, |
200 |
regions text not null |
201 |
); |
202 |
load data local infile 'track2Regions' into table track2Regions; |
203 |
|
204 |
|
205 |
drop table if exists metadataVocabulary; |
206 |
create table metadataVocabulary ( |
207 |
child varchar(255) not null, |
208 |
parent varchar(255) not null |
209 |
); |
210 |
load data local infile "metadataVocabulary" into table metadataVocabulary; |
211 |
|
212 |
drop table if exists trackAttr2idx; |
213 |
create table trackAttr2idx ( |
214 |
idx varchar(255) not null primary key, |
215 |
attr varchar(255) not null, |
216 |
note varchar(255) null, |
217 |
description text null |
218 |
); |
219 |
load data local infile "trackAttr2idx" into table trackAttr2idx; |
220 |
|
221 |
|
222 |
|
223 |
drop table if exists tempURL; |
224 |
create table tempURL ( |
225 |
session varchar(100) not null, |
226 |
offset INT unsigned not null, |
227 |
urlpiece text not null |
228 |
); |
229 |
|
230 |
|
231 |
drop table if exists dataset; |
232 |
create table dataset ( |
233 |
tablename varchar(255) not null, |
234 |
logo varchar(255) null, |
235 |
name varchar(255) not null, |
236 |
url varchar(255) null, |
237 |
description text not null |
238 |
); |
239 |
load data local infile "dataset" into table dataset; |
240 |
|
241 |
drop table if exists roadmapepigenome; |
242 |
create table roadmapepigenome ( |
243 |
tkname varchar(255) not null |
244 |
); |
245 |
load data local infile "roadmap" into table roadmapepigenome; |
246 |
|
247 |
drop table if exists longrange; |
248 |
create table longrange ( |
249 |
tkname varchar(255) not null |
250 |
); |
251 |
load data local infile "longrange" into table longrange; |
252 |
|
253 |
drop table if exists mock; |
254 |
create table mock ( |
255 |
tkname varchar(255) not null |
256 |
); |
257 |
load data local infile "mock" into table mock; |
258 |
|
259 |
drop table if exists encode; |
260 |
create table encode( |
261 |
tkname varchar(255) not null |
262 |
); |
263 |
load data local infile "encode" into table encode; |
264 |
|
265 |
drop table if exists scaffoldInfo; |
266 |
create table scaffoldInfo ( |
267 |
parent varchar(255) not null, |
268 |
child varchar(255) not null, |
269 |
childLength int unsigned not null |
270 |
); |
271 |
load data local infile "scaffoldInfo" into table scaffoldInfo; |
272 |
|
273 |
drop table if exists cytoband; |
274 |
create table cytoband ( |
275 |
id int null auto_increment primary key, |
276 |
chrom char(20) not null, |
277 |
start int not null, |
278 |
stop int not null, |
279 |
name char(20) not null, |
280 |
colorIdx int not null |
281 |
); |
282 |
load data local infile "cytoband" into table cytoband; |
283 |
|
284 |
|
285 |
drop table if exists publichub; |
286 |
create table publichub ( |
287 |
name varchar(255) not null, |
288 |
logo text null, |
289 |
url text not null, |
290 |
institution text not null, |
291 |
description text not null |
292 |
); |
293 |
load data local infile "publichub" into table publichub; |
294 |
/*
|
295 |
DROP TABLE IF EXISTS `rmsk`; |
296 |
CREATE TABLE `rmsk` ( |
297 |
`bin` smallint(5) unsigned NOT NULL default '0', |
298 |
`swScore` int(10) unsigned NOT NULL default '0', |
299 |
`milliDiv` int(10) unsigned NOT NULL default '0', |
300 |
`milliDel` int(10) unsigned NOT NULL default '0', |
301 |
`milliIns` int(10) unsigned NOT NULL default '0', |
302 |
`genoName` varchar(255) NOT NULL default '', |
303 |
`genoStart` int(10) unsigned NOT NULL default '0', |
304 |
`genoEnd` int(10) unsigned NOT NULL default '0', |
305 |
`genoLeft` int(11) NOT NULL default '0', |
306 |
`strand` char(1) NOT NULL default '', |
307 |
`repName` varchar(255) NOT NULL default '', |
308 |
`repClass` varchar(255) NOT NULL default '', |
309 |
`repFamily` varchar(255) NOT NULL default '', |
310 |
`repStart` int(11) NOT NULL default '0', |
311 |
`repEnd` int(11) NOT NULL default '0', |
312 |
`repLeft` int(11) NOT NULL default '0', |
313 |
`id` char(1) NOT NULL default '', |
314 |
KEY `genoName` (`genoName`(14),`bin`) |
315 |
); |
316 |
load data local infile 'rmsk.txt' into table rmsk; |
317 |
*/ |
318 |
|