root / AcNPV / makeDb.sql @ master
History | View | Annotate | Download (7.4 kB)
1 |
drop table if exists config; |
---|---|
2 |
create table config ( |
3 |
bbiPath text not null, |
4 |
seqPath text null, |
5 |
defaultTracks text null, |
6 |
defaultMdcategory varchar(255) not null, |
7 |
defaultGenelist text null, |
8 |
defaultCustomtracks text null, |
9 |
defaultPosition varchar(255) not null, |
10 |
defaultDataset varchar(255) not null, |
11 |
defaultDecor text null, |
12 |
defaultScaffold text not null, |
13 |
ideogram_wiggle1 varchar(255) null, |
14 |
ideogram_wiggle2 varchar(255) null, |
15 |
hasGene boolean not null, |
16 |
allowJuxtaposition boolean not null, |
17 |
keggSpeciesCode varchar(255) null, |
18 |
information text not null, |
19 |
runmode tinyint not null, |
20 |
initmatplot boolean not null |
21 |
); |
22 |
INSERT INTO `config` VALUES ( |
23 |
'/srv/epgg/data/data/subtleKnife/AcNPV/',
|
24 |
'/srv/epgg/data/data/subtleKnife/seq/AcNPV.gz',
|
25 |
NULL,
|
26 |
'Sample',
|
27 |
NULL,
|
28 |
NULL,
|
29 |
'NC_001623.1,0,NC_001623.1,10000',
|
30 |
'mock',
|
31 |
'gene,gc5Base',
|
32 |
'NC_001623.1',
|
33 |
NULL,
|
34 |
NULL,
|
35 |
1,
|
36 |
1,
|
37 |
'AcNPV',
|
38 |
'Assembly version|08-MAR-1999|Sequence source|<a href=http://www.ncbi.nlm.nih.gov/nuccore/NC_001623 target=_blank>NCBI</a>|Reference|<a href=http://www.ncbi.nlm.nih.gov/pubmed/8030224 target=_blank>Virology. 1994 Aug 1;202(2):586-605.</a>|Date parsed|September 16, 2013|Chromosomes|1|Misc|0|Total bases|133,894|Logo art|<a href=http://viralzone.expasy.org/all_by_protein/537.html target=_blank>link</a>',
|
39 |
0,
|
40 |
0);
|
41 |
|
42 |
|
43 |
-- grouping types on genomic features
|
44 |
-- table name defined in macro: TBN_GF_GRP
|
45 |
drop table if exists gfGrouping; |
46 |
create table gfGrouping ( |
47 |
id TINYINT not null primary key, |
48 |
name char(50) not null |
49 |
); |
50 |
insert into gfGrouping values (2, "Genes"); |
51 |
-- insert into gfGrouping values (3, "non-coding RNA");
|
52 |
-- insert into gfGrouping values (4, "RepeatMasker");
|
53 |
-- insert into gfGrouping values (6, "Sequence conservation");
|
54 |
insert into gfGrouping values (5, "Others"); |
55 |
|
56 |
|
57 |
|
58 |
drop table if exists decorInfo; |
59 |
create table decorInfo ( |
60 |
name char(50) not null primary key, |
61 |
printname char(100) not null, |
62 |
parent char(50) null, |
63 |
grp tinyint not null, |
64 |
fileType tinyint not null, |
65 |
hasStruct tinyint null, |
66 |
queryUrl varchar(255) null |
67 |
); |
68 |
load data local infile 'decorInfo' into table decorInfo; |
69 |
|
70 |
drop table if exists track2Label; |
71 |
create table track2Label ( |
72 |
name varchar(255) not null primary key, |
73 |
label text null |
74 |
); |
75 |
load data local infile 'track2Label' into table track2Label; |
76 |
|
77 |
drop table if exists track2ProcessInfo; |
78 |
create table track2ProcessInfo ( |
79 |
name varchar(255) not null primary key, |
80 |
detail text null |
81 |
); |
82 |
load data local infile 'track2ProcessInfo' into table track2ProcessInfo; |
83 |
|
84 |
drop table if exists track2BamInfo; |
85 |
create table track2BamInfo ( |
86 |
name varchar(255) not null, |
87 |
bamfile varchar(255) not null, |
88 |
bamfilelabel varchar(255) not null |
89 |
); |
90 |
load data local infile "track2BamInfo" into table track2BamInfo; |
91 |
|
92 |
drop table if exists track2Detail; |
93 |
create table track2Detail ( |
94 |
name varchar(255) not null primary key, |
95 |
detail text null |
96 |
); |
97 |
load data local infile 'track2Detail' into table track2Detail; |
98 |
load data local infile 'track2Detail_decor' into table track2Detail; |
99 |
|
100 |
drop table if exists track2GEO; |
101 |
create table track2GEO ( |
102 |
name varchar(255) not null primary key, |
103 |
geo char(20) not null |
104 |
); |
105 |
load data local infile 'track2GEO' into table track2GEO; |
106 |
|
107 |
drop table if exists track2Categorical; |
108 |
create table track2Categorical ( |
109 |
name varchar(255) not null primary key, |
110 |
info text not null |
111 |
); |
112 |
load data local infile 'track2Categorical' into table track2Categorical; |
113 |
|
114 |
|
115 |
drop table if exists track2VersionInfo; |
116 |
create table track2VersionInfo ( |
117 |
name varchar(255) not null primary key, |
118 |
info varchar(255) not null |
119 |
); |
120 |
load data local infile 'track2VersionInfo' into table track2VersionInfo; |
121 |
|
122 |
|
123 |
drop table if exists track2Annotation; |
124 |
create table track2Annotation ( |
125 |
name varchar(255) not null primary key, |
126 |
attridx varchar(255) not null |
127 |
); |
128 |
load data local infile "track2Annotation" into table track2Annotation; |
129 |
|
130 |
drop table if exists track2Ft; |
131 |
create table track2Ft ( |
132 |
name varchar(255) not null primary key, |
133 |
ft tinyint not null |
134 |
); |
135 |
load data local infile "track2Ft" into table track2Ft; |
136 |
|
137 |
drop table if exists track2Style; |
138 |
create table track2Style ( |
139 |
name varchar(255) not null primary key, |
140 |
style text not null |
141 |
); |
142 |
load data local infile "track2Style" into table track2Style; |
143 |
|
144 |
drop table if exists track2Regions; |
145 |
create table track2Regions ( |
146 |
name varchar(255) not null primary key, |
147 |
regionname varchar(255) not null, |
148 |
regions text not null |
149 |
); |
150 |
|
151 |
|
152 |
drop table if exists metadataVocabulary; |
153 |
create table metadataVocabulary ( |
154 |
child varchar(255) not null, |
155 |
parent varchar(255) not null |
156 |
); |
157 |
load data local infile "metadataVocabulary" into table metadataVocabulary; |
158 |
|
159 |
drop table if exists trackAttr2idx; |
160 |
create table trackAttr2idx ( |
161 |
idx varchar(255) not null primary key, |
162 |
attr varchar(255) not null, |
163 |
note varchar(255) null, |
164 |
description text null |
165 |
); |
166 |
load data local infile "trackAttr2idx" into table trackAttr2idx; |
167 |
|
168 |
|
169 |
drop table if exists tempURL; |
170 |
create table tempURL ( |
171 |
session varchar(100) not null, |
172 |
offset INT unsigned not null, |
173 |
urlpiece text not null |
174 |
); |
175 |
|
176 |
|
177 |
drop table if exists dataset; |
178 |
create table dataset ( |
179 |
tablename varchar(255) not null, |
180 |
logo varchar(255) null, |
181 |
name varchar(255) not null, |
182 |
url varchar(255) null, |
183 |
description text not null |
184 |
); |
185 |
-- load data local infile "dataset" into table dataset;
|
186 |
|
187 |
drop table if exists mock; |
188 |
create table mock ( |
189 |
tkname varchar(255) not null |
190 |
); |
191 |
load data local infile "mock" into table mock; |
192 |
|
193 |
|
194 |
drop table if exists scaffoldInfo; |
195 |
create table scaffoldInfo ( |
196 |
parent varchar(255) not null, |
197 |
child varchar(255) not null, |
198 |
childLength int unsigned not null |
199 |
); |
200 |
load data local infile "scaffoldInfo" into table scaffoldInfo; |
201 |
|
202 |
|
203 |
drop table if exists cytoband; |
204 |
create table cytoband ( |
205 |
id int null auto_increment primary key, |
206 |
chrom char(20) not null, |
207 |
start int not null, |
208 |
stop int not null, |
209 |
name char(20) not null, |
210 |
colorIdx int not null |
211 |
); |
212 |
/*
|
213 |
load data local infile "cytoband" into table cytoband; |
214 |
|
215 |
DROP TABLE IF EXISTS `rmsk`; |
216 |
CREATE TABLE `rmsk` ( |
217 |
`bin` smallint(5) unsigned NOT NULL default '0', |
218 |
`swScore` int(10) unsigned NOT NULL default '0', |
219 |
`milliDiv` int(10) unsigned NOT NULL default '0', |
220 |
`milliDel` int(10) unsigned NOT NULL default '0', |
221 |
`milliIns` int(10) unsigned NOT NULL default '0', |
222 |
`genoName` varchar(255) NOT NULL default '', |
223 |
`genoStart` int(10) unsigned NOT NULL default '0', |
224 |
`genoEnd` int(10) unsigned NOT NULL default '0', |
225 |
`genoLeft` int(11) NOT NULL default '0', |
226 |
`strand` char(1) NOT NULL default '', |
227 |
`repName` varchar(255) NOT NULL default '', |
228 |
`repClass` varchar(255) NOT NULL default '', |
229 |
`repFamily` varchar(255) NOT NULL default '', |
230 |
`repStart` int(11) NOT NULL default '0', |
231 |
`repEnd` int(11) NOT NULL default '0', |
232 |
`repLeft` int(11) NOT NULL default '0', |
233 |
`id` char(1) NOT NULL default '', |
234 |
KEY `genoName` (`genoName`(14),`bin`) |
235 |
); |
236 |
load data local infile 'rmsk.txt' into table rmsk; |
237 |
*/ |
238 |
|
239 |
|
240 |
drop table if exists genestruct; |
241 |
create table genestruct ( |
242 |
id int unsigned not null primary key, |
243 |
chrom varchar(255) not null, |
244 |
strand char(1) not null, |
245 |
txStart int unsigned not null, |
246 |
txEnd int unsigned not null, |
247 |
cdsStart int unsigned not null, |
248 |
cdsEnd int unsigned not null, |
249 |
exonCount int unsigned not null, |
250 |
exonStarts text not null, |
251 |
exonEnds text not null, |
252 |
name varchar(255) not null |
253 |
); |
254 |
load data local infile 'geneStruct' into table genestruct; |
255 |
|
256 |
|
257 |
drop table if exists genesymbol; |
258 |
create table genesymbol ( |
259 |
name varchar(255) not null, |
260 |
symbol varchar(255) null, |
261 |
description text null, |
262 |
id int unsigned not null primary key, |
263 |
index(name)
|
264 |
); |
265 |
-- load data local infile 'geneSymbol' into table genesymbol;
|
266 |
|