Statistics
| Branch: | Revision:

root / rapa1_1 / makeDb.sql @ master

History | View | Annotate | Download (7.4 kB)

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