Statistics
| Branch: | Revision:

root / mm10 / makeDb.sql @ 52e54a06

History | View | Annotate | Download (7.2 kB)

1 71d28e6f Daofeng Li
-- -------------------
2 71d28e6f Daofeng Li
--                  --
3 71d28e6f Daofeng Li
--  mm10
4 71d28e6f Daofeng Li
--                  --
5 71d28e6f Daofeng Li
-- -------------------
6 71d28e6f Daofeng Li
drop table if exists config;
7 71d28e6f Daofeng Li
create table config (
8 71d28e6f Daofeng Li
  bbiPath text not null,
9 71d28e6f Daofeng Li
  seqPath text null,
10 71d28e6f Daofeng Li
  defaultTracks text null,
11 71d28e6f Daofeng Li
  defaultMdcategory varchar(255) not null,
12 71d28e6f Daofeng Li
  defaultGenelist text not null,
13 71d28e6f Daofeng Li
  defaultCustomtracks text not null,
14 71d28e6f Daofeng Li
  defaultPosition varchar(255) not null,
15 71d28e6f Daofeng Li
  defaultDataset varchar(255) not null,
16 71d28e6f Daofeng Li
  defaultDecor text null,
17 71d28e6f Daofeng Li
  defaultScaffold text not null,
18 71d28e6f Daofeng Li
  ideogram_wiggle1 varchar(255) null,
19 71d28e6f Daofeng Li
  ideogram_wiggle2 varchar(255) null,
20 71d28e6f Daofeng Li
  hasGene boolean not null,
21 71d28e6f Daofeng Li
  allowJuxtaposition boolean not null,
22 71d28e6f Daofeng Li
  keggSpeciesCode varchar(255) null,
23 71d28e6f Daofeng Li
  information text not null,
24 71d28e6f Daofeng Li
  runmode tinyint not null,
25 71d28e6f Daofeng Li
  initmatplot boolean not null
26 71d28e6f Daofeng Li
);
27 71d28e6f Daofeng Li
insert into config values(
28 71d28e6f Daofeng Li
"/srv/epgg/data/data/subtleKnife/mm10/",
29 71d28e6f Daofeng Li
"/srv/epgg/data/data/subtleKnife/seq/mm10.gz",
30 71d28e6f Daofeng Li
\N,
31 71d28e6f Daofeng Li
"Sample",
32 71d28e6f Daofeng Li
"CYP4Z1\\nCYP2A7\\nCYP2A6\\nCYP3A4\\nCYP1A1\\nCYP4V2\\nCYP51A1\\nCYP2C19\\nCYP26B1\\nCYP11B2\\nCYP24A1\\nCYP4B1\\nCYP2C8",
33 71d28e6f Daofeng Li
"3,http://vizhub.wustl.edu/hubSample/mm9/wgEncodeLicrHistoneBatInputMAdult24wksC57bl6StdSig.gz,1,http://vizhub.wustl.edu/hubSample/mm9/bed.gz,5,http://vizhub.wustl.edu/hubSample/mm9/wgEncodeLicrHistoneBatInputMAdult24wksC57bl6StdAlnRep2.gz,100,http://vizhub.wustl.edu/hubSample/mm9/hub.txt",
34 71d28e6f Daofeng Li
"chr6,52003572,chr6,52426257",
35 71d28e6f Daofeng Li
"mock",
36 71d28e6f Daofeng Li
"knownGene,rmsk_ensemble",
37 71d28e6f Daofeng Li
"chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10,chr11,chr12,chr13,chr14,chr15,chr16,chr17,chr18,chr19,chrX,chrY,chrM",
38 71d28e6f Daofeng Li
\N,\N,
39 71d28e6f Daofeng Li
true,
40 71d28e6f Daofeng Li
true,
41 71d28e6f Daofeng Li
"mmu",
42 71d28e6f Daofeng Li
"Assembly version|mm10|Sequence source|<a href=http://hgdownload.cse.ucsc.edu/goldenPath/mm10/bigZips/ target=_blank>UCSC browser</a>|Date parsed|July 31, 2013|Chromosomes|22|Misc|44|Total bases|2,730,871,774|Logo art|<a href=http://free-extras.com/images/mouse-8552.htm target=_blank>link</a>",
43 71d28e6f Daofeng Li
0,
44 71d28e6f Daofeng Li
false
45 71d28e6f Daofeng Li
);
46 71d28e6f Daofeng Li
47 71d28e6f Daofeng Li
48 71d28e6f Daofeng Li
-- grouping types on genomic features
49 71d28e6f Daofeng Li
-- table name defined in macro: TBN_GF_GRP
50 71d28e6f Daofeng Li
drop table if exists gfGrouping;
51 71d28e6f Daofeng Li
create table gfGrouping (
52 71d28e6f Daofeng Li
  id TINYINT not null primary key,
53 71d28e6f Daofeng Li
  name char(50) not null
54 71d28e6f Daofeng Li
);
55 71d28e6f Daofeng Li
insert into gfGrouping values (2, "Genes");
56 71d28e6f Daofeng Li
-- insert into gfGrouping values (3, "non-coding RNA");
57 71d28e6f Daofeng Li
insert into gfGrouping values (4, "RepeatMasker");
58 71d28e6f Daofeng Li
insert into gfGrouping values (6, "Sequence conservation");
59 71d28e6f Daofeng Li
insert into gfGrouping values (5, "Others");
60 71d28e6f Daofeng Li
61 71d28e6f Daofeng Li
62 71d28e6f Daofeng Li
63 71d28e6f Daofeng Li
drop table if exists decorInfo;
64 71d28e6f Daofeng Li
create table decorInfo (
65 71d28e6f Daofeng Li
  name char(50) not null primary key,
66 71d28e6f Daofeng Li
  printname char(100) not null,
67 71d28e6f Daofeng Li
  parent char(50) null,
68 71d28e6f Daofeng Li
  grp tinyint not null,
69 71d28e6f Daofeng Li
  fileType tinyint not null,
70 71d28e6f Daofeng Li
  hasStruct tinyint null,
71 71d28e6f Daofeng Li
  queryUrl varchar(255) null
72 71d28e6f Daofeng Li
);
73 71d28e6f Daofeng Li
load data local infile 'decorInfo' into table decorInfo;
74 71d28e6f Daofeng Li
75 71d28e6f Daofeng Li
drop table if exists track2Label;
76 71d28e6f Daofeng Li
create table track2Label (
77 71d28e6f Daofeng Li
  name varchar(255) not null primary key,
78 71d28e6f Daofeng Li
  label text null
79 71d28e6f Daofeng Li
);
80 71d28e6f Daofeng Li
load data local infile 'track2Label' into table track2Label;
81 71d28e6f Daofeng Li
82 71d28e6f Daofeng Li
drop table if exists track2ProcessInfo;
83 71d28e6f Daofeng Li
create table track2ProcessInfo (
84 71d28e6f Daofeng Li
  name varchar(255) not null primary key,
85 71d28e6f Daofeng Li
  detail text null
86 71d28e6f Daofeng Li
);
87 71d28e6f Daofeng Li
load data local infile 'track2ProcessInfo' into table track2ProcessInfo;
88 71d28e6f Daofeng Li
89 71d28e6f Daofeng Li
drop table if exists track2BamInfo;
90 71d28e6f Daofeng Li
create table track2BamInfo (
91 71d28e6f Daofeng Li
  name varchar(255) not null,
92 71d28e6f Daofeng Li
  bamfile varchar(255) not null,
93 71d28e6f Daofeng Li
  bamfilelabel varchar(255) not null
94 71d28e6f Daofeng Li
);
95 71d28e6f Daofeng Li
load data local infile "track2BamInfo" into table track2BamInfo;
96 71d28e6f Daofeng Li
97 71d28e6f Daofeng Li
drop table if exists track2Detail;
98 71d28e6f Daofeng Li
create table track2Detail (
99 71d28e6f Daofeng Li
  name varchar(255) not null primary key,
100 71d28e6f Daofeng Li
  detail text null
101 71d28e6f Daofeng Li
);
102 71d28e6f Daofeng Li
load data local infile 'track2Detail' into table track2Detail;
103 71d28e6f Daofeng Li
load data local infile 'track2Detail_decor' into table track2Detail;
104 71d28e6f Daofeng Li
105 71d28e6f Daofeng Li
drop table if exists track2GEO;
106 71d28e6f Daofeng Li
create table track2GEO (
107 71d28e6f Daofeng Li
  name varchar(255) not null primary key,
108 71d28e6f Daofeng Li
  geo char(20) not null
109 71d28e6f Daofeng Li
);
110 71d28e6f Daofeng Li
load data local infile 'track2GEO' into table track2GEO;
111 71d28e6f Daofeng Li
112 71d28e6f Daofeng Li
drop table if exists track2Categorical;
113 71d28e6f Daofeng Li
create table track2Categorical (
114 71d28e6f Daofeng Li
  name varchar(255) not null primary key,
115 71d28e6f Daofeng Li
  info text not null
116 71d28e6f Daofeng Li
);
117 71d28e6f Daofeng Li
load data local infile 'track2Categorical' into table track2Categorical;
118 71d28e6f Daofeng Li
119 71d28e6f Daofeng Li
120 71d28e6f Daofeng Li
drop table if exists track2VersionInfo;
121 71d28e6f Daofeng Li
create table track2VersionInfo (
122 71d28e6f Daofeng Li
  name varchar(255) not null primary key,
123 71d28e6f Daofeng Li
  info varchar(255) not null
124 71d28e6f Daofeng Li
);
125 71d28e6f Daofeng Li
load data local infile 'track2VersionInfo' into table track2VersionInfo;
126 71d28e6f Daofeng Li
127 71d28e6f Daofeng Li
128 71d28e6f Daofeng Li
drop table if exists track2Annotation;
129 71d28e6f Daofeng Li
create table track2Annotation (
130 71d28e6f Daofeng Li
  name varchar(255) not null primary key,
131 71d28e6f Daofeng Li
  attridx varchar(255) not null
132 71d28e6f Daofeng Li
);
133 71d28e6f Daofeng Li
load data local infile "track2Annotation" into table track2Annotation;
134 71d28e6f Daofeng Li
135 71d28e6f Daofeng Li
drop table if exists track2Ft;
136 71d28e6f Daofeng Li
create table track2Ft (
137 71d28e6f Daofeng Li
  name varchar(255) not null primary key,
138 71d28e6f Daofeng Li
  ft tinyint not null
139 71d28e6f Daofeng Li
);
140 71d28e6f Daofeng Li
load data local infile "track2Ft" into table track2Ft;
141 71d28e6f Daofeng Li
142 71d28e6f Daofeng Li
drop table if exists track2Style;
143 71d28e6f Daofeng Li
create table track2Style (
144 71d28e6f Daofeng Li
  name varchar(255) not null primary key,
145 71d28e6f Daofeng Li
  style text not null
146 71d28e6f Daofeng Li
);
147 71d28e6f Daofeng Li
load data local infile "track2Style" into table track2Style;
148 71d28e6f Daofeng Li
149 71d28e6f Daofeng Li
drop table if exists track2Regions;
150 71d28e6f Daofeng Li
create table track2Regions (
151 71d28e6f Daofeng Li
  name varchar(255) not null primary key,
152 71d28e6f Daofeng Li
    regionname varchar(255) not null,
153 71d28e6f Daofeng Li
          regions text not null
154 71d28e6f Daofeng Li
           );
155 71d28e6f Daofeng Li
156 71d28e6f Daofeng Li
157 71d28e6f Daofeng Li
drop table if exists metadataVocabulary;
158 71d28e6f Daofeng Li
create table metadataVocabulary (
159 71d28e6f Daofeng Li
  child varchar(255) not null,
160 71d28e6f Daofeng Li
  parent varchar(255) not null
161 71d28e6f Daofeng Li
);
162 71d28e6f Daofeng Li
load data local infile "metadataVocabulary" into table metadataVocabulary;
163 71d28e6f Daofeng Li
164 71d28e6f Daofeng Li
drop table if exists trackAttr2idx;
165 71d28e6f Daofeng Li
create table trackAttr2idx (
166 71d28e6f Daofeng Li
  idx varchar(255) not null primary key,
167 71d28e6f Daofeng Li
  attr varchar(255) not null,
168 71d28e6f Daofeng Li
  note varchar(255) null,
169 71d28e6f Daofeng Li
  description text null
170 71d28e6f Daofeng Li
);
171 71d28e6f Daofeng Li
load data local infile "trackAttr2idx" into table trackAttr2idx;
172 71d28e6f Daofeng Li
173 71d28e6f Daofeng Li
174 71d28e6f Daofeng Li
drop table if exists tempURL;
175 71d28e6f Daofeng Li
create table tempURL (
176 71d28e6f Daofeng Li
  session varchar(100) not null,
177 71d28e6f Daofeng Li
  offset INT unsigned not null,
178 71d28e6f Daofeng Li
  urlpiece text not null
179 71d28e6f Daofeng Li
);
180 71d28e6f Daofeng Li
181 71d28e6f Daofeng Li
182 71d28e6f Daofeng Li
drop table if exists dataset;
183 71d28e6f Daofeng Li
create table dataset (
184 71d28e6f Daofeng Li
  tablename varchar(255) not null,
185 71d28e6f Daofeng Li
  logo varchar(255) null,
186 71d28e6f Daofeng Li
  name varchar(255) not null,
187 71d28e6f Daofeng Li
  url varchar(255) null,
188 71d28e6f Daofeng Li
  description text not null
189 71d28e6f Daofeng Li
);
190 71d28e6f Daofeng Li
-- load data local infile "dataset" into table dataset;
191 71d28e6f Daofeng Li
192 71d28e6f Daofeng Li
drop table if exists mock;
193 71d28e6f Daofeng Li
create table mock (
194 71d28e6f Daofeng Li
  tkname varchar(255) not null
195 71d28e6f Daofeng Li
);
196 71d28e6f Daofeng Li
load data local infile "mock" into table mock;
197 71d28e6f Daofeng Li
198 71d28e6f Daofeng Li
199 71d28e6f Daofeng Li
drop table if exists scaffoldInfo;
200 71d28e6f Daofeng Li
create table scaffoldInfo (
201 71d28e6f Daofeng Li
  parent varchar(255) not null,
202 71d28e6f Daofeng Li
  child varchar(255) not null,
203 71d28e6f Daofeng Li
  childLength int unsigned not null
204 71d28e6f Daofeng Li
);
205 71d28e6f Daofeng Li
load data local infile "scaffoldInfo" into table scaffoldInfo;
206 71d28e6f Daofeng Li
207 71d28e6f Daofeng Li
208 71d28e6f Daofeng Li
drop table if exists cytoband;
209 71d28e6f Daofeng Li
create table cytoband (
210 71d28e6f Daofeng Li
  id int null auto_increment primary key,
211 71d28e6f Daofeng Li
  chrom char(20) not null,
212 71d28e6f Daofeng Li
  start int not null,
213 71d28e6f Daofeng Li
  stop int not null,
214 71d28e6f Daofeng Li
  name char(20) not null,
215 71d28e6f Daofeng Li
  colorIdx int not null
216 71d28e6f Daofeng Li
);
217 71d28e6f Daofeng Li
load data local infile "cytoband" into table cytoband;
218 71d28e6f Daofeng Li
219 71d28e6f Daofeng Li
/*
220 71d28e6f Daofeng Li
DROP TABLE IF EXISTS `rmsk`;
221 71d28e6f Daofeng Li
CREATE TABLE `rmsk` (
222 71d28e6f Daofeng Li
  `bin` smallint(5) unsigned NOT NULL default '0',
223 71d28e6f Daofeng Li
  `swScore` int(10) unsigned NOT NULL default '0',
224 71d28e6f Daofeng Li
  `milliDiv` int(10) unsigned NOT NULL default '0',
225 71d28e6f Daofeng Li
  `milliDel` int(10) unsigned NOT NULL default '0',
226 71d28e6f Daofeng Li
  `milliIns` int(10) unsigned NOT NULL default '0',
227 71d28e6f Daofeng Li
  `genoName` varchar(255) NOT NULL default '',
228 71d28e6f Daofeng Li
  `genoStart` int(10) unsigned NOT NULL default '0',
229 71d28e6f Daofeng Li
  `genoEnd` int(10) unsigned NOT NULL default '0',
230 71d28e6f Daofeng Li
  `genoLeft` int(11) NOT NULL default '0',
231 71d28e6f Daofeng Li
  `strand` char(1) NOT NULL default '',
232 71d28e6f Daofeng Li
  `repName` varchar(255) NOT NULL default '',
233 71d28e6f Daofeng Li
  `repClass` varchar(255) NOT NULL default '',
234 71d28e6f Daofeng Li
  `repFamily` varchar(255) NOT NULL default '',
235 71d28e6f Daofeng Li
  `repStart` int(11) NOT NULL default '0',
236 71d28e6f Daofeng Li
  `repEnd` int(11) NOT NULL default '0',
237 71d28e6f Daofeng Li
  `repLeft` int(11) NOT NULL default '0',
238 71d28e6f Daofeng Li
  `id` char(1) NOT NULL default '',
239 71d28e6f Daofeng Li
  KEY `genoName` (`genoName`(14),`bin`)
240 71d28e6f Daofeng Li
);
241 71d28e6f Daofeng Li
load data local infile 'rmsk.txt' into table rmsk;
242 71d28e6f Daofeng Li
*/