root / dm3 / makeDb.sql @ 8c368a17
History | View | Annotate | Download (8.1 kB)
1 | 8c368a17 | Daofeng Li | -- -------------------
|
---|---|---|---|
2 | 8c368a17 | Daofeng Li | -- --
|
3 | 8c368a17 | Daofeng Li | -- dm3heatmap --
|
4 | 8c368a17 | Daofeng Li | -- --
|
5 | 8c368a17 | Daofeng Li | -- -------------------
|
6 | 8c368a17 | Daofeng Li | drop table if exists config; |
7 | 8c368a17 | Daofeng Li | create table config ( |
8 | 8c368a17 | Daofeng Li | bbiPath text not null, |
9 | 8c368a17 | Daofeng Li | seqPath text null, |
10 | 8c368a17 | Daofeng Li | defaultTracks text not null, |
11 | 8c368a17 | Daofeng Li | defaultMdcategory varchar(255) not null, |
12 | 8c368a17 | Daofeng Li | defaultGenelist text not null, |
13 | 8c368a17 | Daofeng Li | defaultCustomtracks text not null, |
14 | 8c368a17 | Daofeng Li | defaultPosition varchar(255) not null, |
15 | 8c368a17 | Daofeng Li | defaultDataset varchar(255) not null, |
16 | 8c368a17 | Daofeng Li | defaultDecor text null, |
17 | 8c368a17 | Daofeng Li | defaultScaffold text not null, |
18 | 8c368a17 | Daofeng Li | ideogram_wiggle1 varchar(255) null, |
19 | 8c368a17 | Daofeng Li | ideogram_wiggle2 varchar(255) null, |
20 | 8c368a17 | Daofeng Li | hasGene boolean not null, |
21 | 8c368a17 | Daofeng Li | allowJuxtaposition boolean not null, |
22 | 8c368a17 | Daofeng Li | keggSpeciesCode varchar(255) null, |
23 | 8c368a17 | Daofeng Li | information text not null, |
24 | 8c368a17 | Daofeng Li | runmode tinyint not null, |
25 | 8c368a17 | Daofeng Li | initmatplot boolean not null |
26 | 8c368a17 | Daofeng Li | ); |
27 | 8c368a17 | Daofeng Li | insert into config values( |
28 | 8c368a17 | Daofeng Li | "/srv/epgg/data/data/subtleKnife/dm3/",
|
29 | 8c368a17 | Daofeng Li | "/srv/epgg/data/data/subtleKnife/seq/dm3.gz",
|
30 | 8c368a17 | Daofeng Li | "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 | 8c368a17 | Daofeng Li | "Cell Line,Tissue,Assay,Institution",
|
32 | 8c368a17 | Daofeng Li | "CYP4Z1\\nCYP2A7\\nCYP2A6\\nCYP3A4\\nCYP1A1\\nCYP4V2\\nCYP51A1\\nCYP2C19\\nCYP26B1\\nCYP11B2\\nCYP24A1\\nCYP4B1\\nCYP2C8",
|
33 | 8c368a17 | Daofeng Li | "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 | 8c368a17 | Daofeng Li | "chr2L,1,chr2L,1000000",
|
35 | 8c368a17 | Daofeng Li | "longrange,modencode",
|
36 | 8c368a17 | Daofeng Li | "refGene,rmsk_ensemble",
|
37 | 8c368a17 | Daofeng Li | "chr2L,chr2LHet,chr2R,chr2RHet,chr3L,chr3LHet,chr3R,chr3RHet,chr4,chrU,chrUextra,chrX,chrXHet,chrYHet,chrM",
|
38 | 8c368a17 | Daofeng Li | \N,
|
39 | 8c368a17 | Daofeng Li | \N,
|
40 | 8c368a17 | Daofeng Li | true,
|
41 | 8c368a17 | Daofeng Li | true,
|
42 | 8c368a17 | Daofeng Li | "dme",
|
43 | 8c368a17 | Daofeng Li | "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 | 8c368a17 | Daofeng Li | 0,
|
45 | 8c368a17 | Daofeng Li | false
|
46 | 8c368a17 | Daofeng Li | ); |
47 | 8c368a17 | Daofeng Li | |
48 | 8c368a17 | Daofeng Li | |
49 | 8c368a17 | Daofeng Li | -- grouping types on genomic features
|
50 | 8c368a17 | Daofeng Li | -- table name defined in macro: TBN_GF_GRP
|
51 | 8c368a17 | Daofeng Li | drop table if exists gfGrouping; |
52 | 8c368a17 | Daofeng Li | create table gfGrouping ( |
53 | 8c368a17 | Daofeng Li | id TINYINT not null primary key, |
54 | 8c368a17 | Daofeng Li | name char(50) not null |
55 | 8c368a17 | Daofeng Li | ); |
56 | 8c368a17 | Daofeng Li | insert into gfGrouping values (2, "Genes"); |
57 | 8c368a17 | Daofeng Li | -- insert into gfGrouping values (3, "non-coding RNA");
|
58 | 8c368a17 | Daofeng Li | insert into gfGrouping values (4, "RepeatMasker"); |
59 | 8c368a17 | Daofeng Li | -- insert into gfGrouping values (6, "Sequence conservation");
|
60 | 8c368a17 | Daofeng Li | insert into gfGrouping values (5, "Others"); |
61 | 8c368a17 | Daofeng Li | |
62 | 8c368a17 | Daofeng Li | |
63 | 8c368a17 | Daofeng Li | drop table if exists decorInfo; |
64 | 8c368a17 | Daofeng Li | create table decorInfo ( |
65 | 8c368a17 | Daofeng Li | name char(50) not null primary key, |
66 | 8c368a17 | Daofeng Li | printname char(100) not null, |
67 | 8c368a17 | Daofeng Li | parent char(50) null, |
68 | 8c368a17 | Daofeng Li | grp tinyint not null, |
69 | 8c368a17 | Daofeng Li | fileType tinyint not null, |
70 | 8c368a17 | Daofeng Li | hasStruct tinyint null, |
71 | 8c368a17 | Daofeng Li | queryUrl varchar(255) null |
72 | 8c368a17 | Daofeng Li | ); |
73 | 8c368a17 | Daofeng Li | load data local infile 'decorInfo' into table decorInfo; |
74 | 8c368a17 | Daofeng Li | |
75 | 8c368a17 | Daofeng Li | drop table if exists track2Label; |
76 | 8c368a17 | Daofeng Li | create table track2Label ( |
77 | 8c368a17 | Daofeng Li | name varchar(255) not null primary key, |
78 | 8c368a17 | Daofeng Li | label text null |
79 | 8c368a17 | Daofeng Li | ); |
80 | 8c368a17 | Daofeng Li | load data local infile 'track2Label' into table track2Label; |
81 | 8c368a17 | Daofeng Li | load data local infile 'track2Label_longrange' into table track2Label; |
82 | 8c368a17 | Daofeng Li | |
83 | 8c368a17 | Daofeng Li | drop table if exists track2ProcessInfo; |
84 | 8c368a17 | Daofeng Li | create table track2ProcessInfo ( |
85 | 8c368a17 | Daofeng Li | name varchar(255) not null primary key, |
86 | 8c368a17 | Daofeng Li | detail text null |
87 | 8c368a17 | Daofeng Li | ); |
88 | 8c368a17 | Daofeng Li | load data local infile 'track2ProcessInfo' into table track2ProcessInfo; |
89 | 8c368a17 | Daofeng Li | load data local infile 'track2ProcessInfo_longrange' into table track2ProcessInfo; |
90 | 8c368a17 | Daofeng Li | |
91 | 8c368a17 | Daofeng Li | drop table if exists track2BamInfo; |
92 | 8c368a17 | Daofeng Li | create table track2BamInfo ( |
93 | 8c368a17 | Daofeng Li | name varchar(255) not null, |
94 | 8c368a17 | Daofeng Li | bamfile varchar(255) not null, |
95 | 8c368a17 | Daofeng Li | bamfilelabel varchar(255) not null |
96 | 8c368a17 | Daofeng Li | ); |
97 | 8c368a17 | Daofeng Li | load data local infile "track2BamInfo" into table track2BamInfo; |
98 | 8c368a17 | Daofeng Li | |
99 | 8c368a17 | Daofeng Li | drop table if exists track2Detail; |
100 | 8c368a17 | Daofeng Li | create table track2Detail ( |
101 | 8c368a17 | Daofeng Li | name varchar(255) not null primary key, |
102 | 8c368a17 | Daofeng Li | detail text null |
103 | 8c368a17 | Daofeng Li | ); |
104 | 8c368a17 | Daofeng Li | load data local infile 'track2Detail' into table track2Detail; |
105 | 8c368a17 | Daofeng Li | load data local infile 'track2Detail_longrange' into table track2Detail; |
106 | 8c368a17 | Daofeng Li | |
107 | 8c368a17 | Daofeng Li | drop table if exists track2GEO; |
108 | 8c368a17 | Daofeng Li | create table track2GEO ( |
109 | 8c368a17 | Daofeng Li | name varchar(255) not null primary key, |
110 | 8c368a17 | Daofeng Li | geo char(20) not null |
111 | 8c368a17 | Daofeng Li | ); |
112 | 8c368a17 | Daofeng Li | load data local infile 'track2GEO' into table track2GEO; |
113 | 8c368a17 | Daofeng Li | load data local infile 'track2GEO_longrange' into table track2GEO; |
114 | 8c368a17 | Daofeng Li | |
115 | 8c368a17 | Daofeng Li | drop table if exists track2Ft; |
116 | 8c368a17 | Daofeng Li | create table track2Ft ( |
117 | 8c368a17 | Daofeng Li | name varchar(255) not null primary key, |
118 | 8c368a17 | Daofeng Li | ft tinyint not null |
119 | 8c368a17 | Daofeng Li | ); |
120 | 8c368a17 | Daofeng Li | load data local infile "track2Ft" into table track2Ft; |
121 | 8c368a17 | Daofeng Li | load data local infile "track2Ft_longrange" into table track2Ft; |
122 | 8c368a17 | Daofeng Li | |
123 | 8c368a17 | Daofeng Li | drop table if exists track2VersionInfo; |
124 | 8c368a17 | Daofeng Li | create table track2VersionInfo ( |
125 | 8c368a17 | Daofeng Li | name varchar(255) not null primary key, |
126 | 8c368a17 | Daofeng Li | info varchar(255) not null |
127 | 8c368a17 | Daofeng Li | ); |
128 | 8c368a17 | Daofeng Li | load data local infile 'track2VersionInfo' into table track2VersionInfo; |
129 | 8c368a17 | Daofeng Li | |
130 | 8c368a17 | Daofeng Li | |
131 | 8c368a17 | Daofeng Li | drop table if exists track2Annotation; |
132 | 8c368a17 | Daofeng Li | create table track2Annotation ( |
133 | 8c368a17 | Daofeng Li | name varchar(255) not null primary key, |
134 | 8c368a17 | Daofeng Li | attridx varchar(255) not null |
135 | 8c368a17 | Daofeng Li | ); |
136 | 8c368a17 | Daofeng Li | load data local infile "track2Annotation" into table track2Annotation; |
137 | 8c368a17 | Daofeng Li | load data local infile "track2Annotation_longrange" into table track2Annotation; |
138 | 8c368a17 | Daofeng Li | |
139 | 8c368a17 | Daofeng Li | drop table if exists track2Style; |
140 | 8c368a17 | Daofeng Li | create table track2Style ( |
141 | 8c368a17 | Daofeng Li | name varchar(255) not null primary key, |
142 | 8c368a17 | Daofeng Li | style text not null |
143 | 8c368a17 | Daofeng Li | ); |
144 | 8c368a17 | Daofeng Li | load data local infile "track2Style" into table track2Style; |
145 | 8c368a17 | Daofeng Li | load data local infile "track2Style_longrange" into table track2Style; |
146 | 8c368a17 | Daofeng Li | |
147 | 8c368a17 | Daofeng Li | drop table if exists track2Regions; |
148 | 8c368a17 | Daofeng Li | create table track2Regions ( |
149 | 8c368a17 | Daofeng Li | name varchar(255) not null primary key, |
150 | 8c368a17 | Daofeng Li | regionname varchar(255) not null, |
151 | 8c368a17 | Daofeng Li | regions text not null |
152 | 8c368a17 | Daofeng Li | ); |
153 | 8c368a17 | Daofeng Li | |
154 | 8c368a17 | Daofeng Li | drop table if exists track2Categorical; |
155 | 8c368a17 | Daofeng Li | create table track2Categorical ( |
156 | 8c368a17 | Daofeng Li | name varchar(255) not null primary key, |
157 | 8c368a17 | Daofeng Li | info text not null |
158 | 8c368a17 | Daofeng Li | ); |
159 | 8c368a17 | Daofeng Li | load data local infile 'track2Categorical' into table track2Categorical; |
160 | 8c368a17 | Daofeng Li | |
161 | 8c368a17 | Daofeng Li | |
162 | 8c368a17 | Daofeng Li | drop table if exists metadataVocabulary; |
163 | 8c368a17 | Daofeng Li | create table metadataVocabulary ( |
164 | 8c368a17 | Daofeng Li | child varchar(255) not null, |
165 | 8c368a17 | Daofeng Li | parent varchar(255) not null |
166 | 8c368a17 | Daofeng Li | ); |
167 | 8c368a17 | Daofeng Li | load data local infile "metadataVocabulary" into table metadataVocabulary; |
168 | 8c368a17 | Daofeng Li | |
169 | 8c368a17 | Daofeng Li | drop table if exists trackAttr2idx; |
170 | 8c368a17 | Daofeng Li | create table trackAttr2idx ( |
171 | 8c368a17 | Daofeng Li | idx varchar(255) not null primary key, |
172 | 8c368a17 | Daofeng Li | attr varchar(255) not null, |
173 | 8c368a17 | Daofeng Li | note varchar(255) null, |
174 | 8c368a17 | Daofeng Li | description text null |
175 | 8c368a17 | Daofeng Li | ); |
176 | 8c368a17 | Daofeng Li | load data local infile "trackAttr2idx" into table trackAttr2idx; |
177 | 8c368a17 | Daofeng Li | |
178 | 8c368a17 | Daofeng Li | |
179 | 8c368a17 | Daofeng Li | drop table if exists tempURL; |
180 | 8c368a17 | Daofeng Li | create table tempURL ( |
181 | 8c368a17 | Daofeng Li | session varchar(100) not null, |
182 | 8c368a17 | Daofeng Li | offset INT unsigned not null, |
183 | 8c368a17 | Daofeng Li | urlpiece text not null |
184 | 8c368a17 | Daofeng Li | ); |
185 | 8c368a17 | Daofeng Li | |
186 | 8c368a17 | Daofeng Li | drop table if exists dataset; |
187 | 8c368a17 | Daofeng Li | create table dataset ( |
188 | 8c368a17 | Daofeng Li | tablename varchar(255) not null, |
189 | 8c368a17 | Daofeng Li | logo varchar(255) null, |
190 | 8c368a17 | Daofeng Li | name varchar(255) not null, |
191 | 8c368a17 | Daofeng Li | url varchar(255) null, |
192 | 8c368a17 | Daofeng Li | description text not null |
193 | 8c368a17 | Daofeng Li | ); |
194 | 8c368a17 | Daofeng Li | load data local infile "dataset" into table dataset; |
195 | 8c368a17 | Daofeng Li | |
196 | 8c368a17 | Daofeng Li | /*
|
197 | 8c368a17 | Daofeng Li | drop table if exists mock; |
198 | 8c368a17 | Daofeng Li | create table mock ( |
199 | 8c368a17 | Daofeng Li | tkname varchar(255) not null |
200 | 8c368a17 | Daofeng Li | ); |
201 | 8c368a17 | Daofeng Li | load data local infile "mock" into table mock; |
202 | 8c368a17 | Daofeng Li | */ |
203 | 8c368a17 | Daofeng Li | |
204 | 8c368a17 | Daofeng Li | drop table if exists modencode; |
205 | 8c368a17 | Daofeng Li | create table modencode ( |
206 | 8c368a17 | Daofeng Li | tkname varchar(255) not null |
207 | 8c368a17 | Daofeng Li | ); |
208 | 8c368a17 | Daofeng Li | load data local infile "modencode" into table modencode; |
209 | 8c368a17 | Daofeng Li | |
210 | 8c368a17 | Daofeng Li | drop table if exists longrange; |
211 | 8c368a17 | Daofeng Li | create table longrange ( |
212 | 8c368a17 | Daofeng Li | tkname varchar(255) not null |
213 | 8c368a17 | Daofeng Li | ); |
214 | 8c368a17 | Daofeng Li | load data local infile "longrange" into table longrange; |
215 | 8c368a17 | Daofeng Li | |
216 | 8c368a17 | Daofeng Li | |
217 | 8c368a17 | Daofeng Li | drop table if exists scaffoldInfo; |
218 | 8c368a17 | Daofeng Li | create table scaffoldInfo ( |
219 | 8c368a17 | Daofeng Li | parent varchar(255) not null, |
220 | 8c368a17 | Daofeng Li | child varchar(255) not null, |
221 | 8c368a17 | Daofeng Li | childLength int unsigned not null |
222 | 8c368a17 | Daofeng Li | ); |
223 | 8c368a17 | Daofeng Li | load data local infile "scaffoldInfo" into table scaffoldInfo; |
224 | 8c368a17 | Daofeng Li | |
225 | 8c368a17 | Daofeng Li | |
226 | 8c368a17 | Daofeng Li | drop table if exists cytoband; |
227 | 8c368a17 | Daofeng Li | create table cytoband ( |
228 | 8c368a17 | Daofeng Li | id int null auto_increment primary key, |
229 | 8c368a17 | Daofeng Li | chrom char(20) not null, |
230 | 8c368a17 | Daofeng Li | start int not null, |
231 | 8c368a17 | Daofeng Li | stop int not null, |
232 | 8c368a17 | Daofeng Li | name char(20) not null, |
233 | 8c368a17 | Daofeng Li | colorIdx int not null |
234 | 8c368a17 | Daofeng Li | ); |
235 | 8c368a17 | Daofeng Li | load data local infile "cytoband" into table cytoband; |
236 | 8c368a17 | Daofeng Li | |
237 | 8c368a17 | Daofeng Li | |
238 | 8c368a17 | Daofeng Li | /*
|
239 | 8c368a17 | Daofeng Li | DROP TABLE IF EXISTS `rmsk`; |
240 | 8c368a17 | Daofeng Li | CREATE TABLE `rmsk` ( |
241 | 8c368a17 | Daofeng Li | `bin` smallint(5) unsigned NOT NULL default '0', |
242 | 8c368a17 | Daofeng Li | `swScore` int(10) unsigned NOT NULL default '0', |
243 | 8c368a17 | Daofeng Li | `milliDiv` int(10) unsigned NOT NULL default '0', |
244 | 8c368a17 | Daofeng Li | `milliDel` int(10) unsigned NOT NULL default '0', |
245 | 8c368a17 | Daofeng Li | `milliIns` int(10) unsigned NOT NULL default '0', |
246 | 8c368a17 | Daofeng Li | `genoName` varchar(255) NOT NULL default '', |
247 | 8c368a17 | Daofeng Li | `genoStart` int(10) unsigned NOT NULL default '0', |
248 | 8c368a17 | Daofeng Li | `genoEnd` int(10) unsigned NOT NULL default '0', |
249 | 8c368a17 | Daofeng Li | `genoLeft` int(11) NOT NULL default '0', |
250 | 8c368a17 | Daofeng Li | `strand` char(1) NOT NULL default '', |
251 | 8c368a17 | Daofeng Li | `repName` varchar(255) NOT NULL default '', |
252 | 8c368a17 | Daofeng Li | `repClass` varchar(255) NOT NULL default '', |
253 | 8c368a17 | Daofeng Li | `repFamily` varchar(255) NOT NULL default '', |
254 | 8c368a17 | Daofeng Li | `repStart` int(11) NOT NULL default '0', |
255 | 8c368a17 | Daofeng Li | `repEnd` int(11) NOT NULL default '0', |
256 | 8c368a17 | Daofeng Li | `repLeft` int(11) NOT NULL default '0', |
257 | 8c368a17 | Daofeng Li | `id` char(1) NOT NULL default '', |
258 | 8c368a17 | Daofeng Li | KEY `genoName` (`genoName`(14),`bin`) |
259 | 8c368a17 | Daofeng Li | ); |
260 | 8c368a17 | Daofeng Li | load data local infile 'rmsk.txt' into table rmsk; |
261 | 8c368a17 | Daofeng Li | */ |