Statistics
| Branch: | Revision:

root / spombe201203 / makeDb.sql @ 4bbad921

History | View | Annotate | Download (6.8 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/spombe201203/",
24 8c368a17 Daofeng Li
"/srv/epgg/data/data/subtleKnife/seq/spombe201203.gz",
25 8c368a17 Daofeng Li
"mock1,mock2,mock3,mock4,mock5,mock6,mock7,mock8,mock9,mock10,mock11,mock12,mock13,mock14,mock15,mock16,mock17,mock18,mock19,mock20", 
26 8c368a17 Daofeng Li
"Sample,mock term",
27 8c368a17 Daofeng Li
"no gene",
28 8c368a17 Daofeng Li
"3,http://vizhub.wustl.edu/hubSample/spombe201203/rand.gz,15,http://vizhub.wustl.edu/hubSample/spombe201203/rand1.bigWig,1,http://vizhub.wustl.edu/hubSample/spombe201203/bed.gz,100,http://vizhub.wustl.edu/hubSample/spombe201203/hub.txt",
29 8c368a17 Daofeng Li
"chromosome3,322500,chromosome3,353700",
30 8c368a17 Daofeng Li
"mock",
31 8c368a17 Daofeng Li
"pombase_gene,repeat",
32 8c368a17 Daofeng Li
"chromosome1,chromosome2,chromosome3,mating_type_region,Spmit,telomeric_contig",
33 8c368a17 Daofeng Li
\N,\N,
34 8c368a17 Daofeng Li
true,
35 8c368a17 Daofeng Li
true,
36 8c368a17 Daofeng Li
"spo",
37 8c368a17 Daofeng Li
"Assembly release|March 2012|Sequence source|<a href=http://www.pombase.org target=_blank>PomBase</a>|Date parsed|November 6, 2012|Chromosomes|3|Total bases|12,631,379|Logo art|<a href=http://cwp.embo.org/pc09-17/ 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
43 8c368a17 Daofeng Li
-- grouping types on genomic features
44 8c368a17 Daofeng Li
-- table name defined in macro: TBN_GF_GRP
45 8c368a17 Daofeng Li
drop table if exists gfGrouping;
46 8c368a17 Daofeng Li
create table gfGrouping (
47 8c368a17 Daofeng Li
  id TINYINT not null primary key,
48 8c368a17 Daofeng Li
  name char(50) not null
49 8c368a17 Daofeng Li
);
50 8c368a17 Daofeng Li
insert into gfGrouping values (2, "Genes");
51 8c368a17 Daofeng Li
-- insert into gfGrouping values (3, "non-coding RNA");
52 8c368a17 Daofeng Li
-- insert into gfGrouping values (4, "RepeatMasker");
53 8c368a17 Daofeng Li
-- insert into gfGrouping values (6, "Sequence conservation");
54 8c368a17 Daofeng Li
insert into gfGrouping values (5, "Others");
55 8c368a17 Daofeng Li
56 8c368a17 Daofeng Li
57 8c368a17 Daofeng Li
58 8c368a17 Daofeng Li
-- for stuff that can be plotted as decorative tracks (no genome)
59 8c368a17 Daofeng Li
-- the grp is also from gfGrouping table
60 8c368a17 Daofeng Li
-- filetype: 0: server bigBed, 2: server bigWig
61 8c368a17 Daofeng Li
-- name will be used to compose bbi file "name.bigBed"
62 8c368a17 Daofeng Li
drop table if exists decorInfo;
63 8c368a17 Daofeng Li
create table decorInfo (
64 8c368a17 Daofeng Li
  name char(50) not null primary key,
65 8c368a17 Daofeng Li
  printname char(100) not null,
66 8c368a17 Daofeng Li
  parent char(50) null,
67 8c368a17 Daofeng Li
  grp tinyint not null,
68 8c368a17 Daofeng Li
  fileType tinyint not null,
69 8c368a17 Daofeng Li
  hasStruct tinyint null,
70 8c368a17 Daofeng Li
  queryUrl varchar(255) null
71 8c368a17 Daofeng Li
);
72 8c368a17 Daofeng Li
load data local infile 'decorInfo' into table decorInfo;
73 8c368a17 Daofeng Li
74 8c368a17 Daofeng Li
/*
75 8c368a17 Daofeng Li
insert into decorInfo values('pombase_gene','PomBase gene',\N,2,0,1,'http://genomebrowser.pombase.org/Schizosaccharomyces_pombe/Transcript/Summary?db=core;t=');
76 8c368a17 Daofeng Li
insert into decorInfo values('pombase_genepromoter','promoters (PomBase genes)','pombase_gene',2,0,0,\N);
77 8c368a17 Daofeng Li
insert into decorInfo values('pombase_geneutr3',"3' UTRs (PomBase genes)",'pombase_gene',2,0,0,\N);
78 8c368a17 Daofeng Li
insert into decorInfo values('pombase_geneutr5',"5' UTRs (PomBase genes)",'pombase_gene',2,0,0,\N);
79 8c368a17 Daofeng Li
insert into decorInfo values('pombase_geneexons','exons (PomBase genes)','pombase_gene',2,0,0,\N);
80 8c368a17 Daofeng Li
insert into decorInfo values('pombase_geneintrons','introns (PomBase genes)','pombase_gene',2,0,0,\N);
81 8c368a17 Daofeng Li
82 8c368a17 Daofeng Li
insert into decorInfo values('repeat','LTR and repeats',\N,5,0,0,\N);
83 8c368a17 Daofeng Li
insert into decorInfo values('gc5Base','GC percent',\N,5,8,0,\N);
84 8c368a17 Daofeng Li
*/
85 8c368a17 Daofeng Li
86 8c368a17 Daofeng Li
87 8c368a17 Daofeng Li
88 8c368a17 Daofeng Li
drop table if exists track2Label;
89 8c368a17 Daofeng Li
create table track2Label (
90 8c368a17 Daofeng Li
  name varchar(255) not null primary key,
91 8c368a17 Daofeng Li
  label text null
92 8c368a17 Daofeng Li
);
93 8c368a17 Daofeng Li
load data local infile 'track2Label' into table track2Label;
94 8c368a17 Daofeng Li
95 8c368a17 Daofeng Li
drop table if exists track2ProcessInfo;
96 8c368a17 Daofeng Li
create table track2ProcessInfo (
97 8c368a17 Daofeng Li
  name varchar(255) not null primary key,
98 8c368a17 Daofeng Li
  detail text null
99 8c368a17 Daofeng Li
);
100 8c368a17 Daofeng Li
load data local infile 'track2ProcessInfo' into table track2ProcessInfo;
101 8c368a17 Daofeng Li
102 8c368a17 Daofeng Li
drop table if exists track2BamInfo;
103 8c368a17 Daofeng Li
create table track2BamInfo (
104 8c368a17 Daofeng Li
  name varchar(255) not null,
105 8c368a17 Daofeng Li
  bamfile varchar(255) not null,
106 8c368a17 Daofeng Li
  bamfilelabel varchar(255) not null
107 8c368a17 Daofeng Li
);
108 8c368a17 Daofeng Li
load data local infile "track2BamInfo" into table track2BamInfo;
109 8c368a17 Daofeng Li
110 8c368a17 Daofeng Li
drop table if exists track2Detail;
111 8c368a17 Daofeng Li
create table track2Detail (
112 8c368a17 Daofeng Li
  name varchar(255) not null primary key,
113 8c368a17 Daofeng Li
  detail text null
114 8c368a17 Daofeng Li
);
115 8c368a17 Daofeng Li
load data local infile 'track2Detail' into table track2Detail;
116 8c368a17 Daofeng Li
117 8c368a17 Daofeng Li
drop table if exists track2GEO;
118 8c368a17 Daofeng Li
create table track2GEO (
119 8c368a17 Daofeng Li
  name varchar(255) not null primary key,
120 8c368a17 Daofeng Li
  geo char(20) not null
121 8c368a17 Daofeng Li
);
122 8c368a17 Daofeng Li
load data local infile 'track2GEO' into table track2GEO;
123 8c368a17 Daofeng Li
124 8c368a17 Daofeng Li
drop table if exists track2VersionInfo;
125 8c368a17 Daofeng Li
create table track2VersionInfo (
126 8c368a17 Daofeng Li
  name varchar(255) not null primary key,
127 8c368a17 Daofeng Li
  info varchar(255) not null
128 8c368a17 Daofeng Li
);
129 8c368a17 Daofeng Li
load data local infile 'track2VersionInfo' into table track2VersionInfo;
130 8c368a17 Daofeng Li
131 8c368a17 Daofeng Li
-- new trackDetail end here
132 8c368a17 Daofeng Li
133 8c368a17 Daofeng Li
drop table if exists track2Annotation;
134 8c368a17 Daofeng Li
create table track2Annotation (
135 8c368a17 Daofeng Li
  name varchar(255) not null primary key,
136 8c368a17 Daofeng Li
  attridx varchar(255) not null
137 8c368a17 Daofeng Li
);
138 8c368a17 Daofeng Li
load data local infile "track2Annotation" into table track2Annotation;
139 8c368a17 Daofeng Li
140 8c368a17 Daofeng Li
drop table if exists track2Ft;
141 8c368a17 Daofeng Li
create table track2Ft (
142 8c368a17 Daofeng Li
  name varchar(255) not null primary key,
143 8c368a17 Daofeng Li
  ft tinyint not null
144 8c368a17 Daofeng Li
);
145 8c368a17 Daofeng Li
load data local infile "track2Ft" into table track2Ft;
146 8c368a17 Daofeng Li
147 8c368a17 Daofeng Li
148 8c368a17 Daofeng Li
drop table if exists track2Style;
149 8c368a17 Daofeng Li
create table track2Style (
150 8c368a17 Daofeng Li
  name varchar(255) not null primary key,
151 8c368a17 Daofeng Li
  style text not null
152 8c368a17 Daofeng Li
);
153 8c368a17 Daofeng Li
load data local infile "track2Style" into table track2Style;
154 8c368a17 Daofeng Li
155 8c368a17 Daofeng Li
156 8c368a17 Daofeng Li
drop table if exists track2Regions;
157 8c368a17 Daofeng Li
create table track2Regions (
158 8c368a17 Daofeng Li
  name varchar(255) not null primary key,
159 8c368a17 Daofeng Li
    regionname varchar(255) not null,
160 8c368a17 Daofeng Li
          regions text not null
161 8c368a17 Daofeng Li
           );
162 8c368a17 Daofeng Li
163 8c368a17 Daofeng Li
164 8c368a17 Daofeng Li
drop table if exists metadataVocabulary;
165 8c368a17 Daofeng Li
create table metadataVocabulary (
166 8c368a17 Daofeng Li
  child varchar(255) not null,
167 8c368a17 Daofeng Li
  parent varchar(255) not null
168 8c368a17 Daofeng Li
);
169 8c368a17 Daofeng Li
load data local infile "metadataVocabulary" into table metadataVocabulary;
170 8c368a17 Daofeng Li
171 8c368a17 Daofeng Li
drop table if exists trackAttr2idx;
172 8c368a17 Daofeng Li
create table trackAttr2idx (
173 8c368a17 Daofeng Li
  idx varchar(255) not null primary key,
174 8c368a17 Daofeng Li
  attr varchar(255) not null,
175 8c368a17 Daofeng Li
  note varchar(255) null,
176 8c368a17 Daofeng Li
  description text null
177 8c368a17 Daofeng Li
);
178 8c368a17 Daofeng Li
load data local infile "trackAttr2idx" into table trackAttr2idx;
179 8c368a17 Daofeng Li
180 8c368a17 Daofeng Li
181 8c368a17 Daofeng Li
182 8c368a17 Daofeng Li
183 8c368a17 Daofeng Li
drop table if exists tempURL;
184 8c368a17 Daofeng Li
create table tempURL (
185 8c368a17 Daofeng Li
  session varchar(100) not null,
186 8c368a17 Daofeng Li
  offset INT unsigned not null,
187 8c368a17 Daofeng Li
  urlpiece text not null
188 8c368a17 Daofeng Li
);
189 8c368a17 Daofeng Li
190 8c368a17 Daofeng Li
191 8c368a17 Daofeng Li
drop table if exists dataset;
192 8c368a17 Daofeng Li
create table dataset (
193 8c368a17 Daofeng Li
  tablename varchar(255) not null,
194 8c368a17 Daofeng Li
  logo varchar(255) null,
195 8c368a17 Daofeng Li
  name varchar(255) not null,
196 8c368a17 Daofeng Li
  url varchar(255) null,
197 8c368a17 Daofeng Li
  description text not null
198 8c368a17 Daofeng Li
);
199 8c368a17 Daofeng Li
load data local infile "dataset" into table dataset;
200 8c368a17 Daofeng Li
201 8c368a17 Daofeng Li
drop table if exists mock;
202 8c368a17 Daofeng Li
create table mock (
203 8c368a17 Daofeng Li
  tkname varchar(255) not null
204 8c368a17 Daofeng Li
);
205 8c368a17 Daofeng Li
load data local infile "mock" into table mock;
206 8c368a17 Daofeng Li
207 8c368a17 Daofeng Li
208 8c368a17 Daofeng Li
drop table if exists scaffoldInfo;
209 8c368a17 Daofeng Li
create table scaffoldInfo (
210 8c368a17 Daofeng Li
  parent varchar(255) not null,
211 8c368a17 Daofeng Li
  child varchar(255) not null,
212 8c368a17 Daofeng Li
  childLength int unsigned not null
213 8c368a17 Daofeng Li
);
214 8c368a17 Daofeng Li
load data local infile "scaffoldInfo" into table scaffoldInfo;
215 8c368a17 Daofeng Li
216 8c368a17 Daofeng Li
217 8c368a17 Daofeng Li
218 8c368a17 Daofeng Li
drop table if exists cytoband;
219 8c368a17 Daofeng Li
create table cytoband (
220 8c368a17 Daofeng Li
  id int null auto_increment primary key,
221 8c368a17 Daofeng Li
  chrom char(20) not null,
222 8c368a17 Daofeng Li
  start int not null,
223 8c368a17 Daofeng Li
  stop int not null,
224 8c368a17 Daofeng Li
  name char(20) not null,
225 8c368a17 Daofeng Li
  colorIdx int not null
226 8c368a17 Daofeng Li
);