Statistics
| Branch: | Revision:

root / danRer7 / makeDb.sql @ 8c368a17

History | View | Annotate | Download (7.3 kB)

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