Statistics
| Branch: | Revision:

root / spombe201203 / makeDb.sql @ 8c368a17

History | View | Annotate | Download (6.8 kB)

1
drop table if exists config;
2
create table config (
3
  bbiPath text not null,
4
  seqPath text null,
5
  defaultTracks text not null,
6
  defaultMdcategory varchar(255) not null,
7
  defaultGenelist text not null,
8
  defaultCustomtracks text not 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/spombe201203/",
24
"/srv/epgg/data/data/subtleKnife/seq/spombe201203.gz",
25
"mock1,mock2,mock3,mock4,mock5,mock6,mock7,mock8,mock9,mock10,mock11,mock12,mock13,mock14,mock15,mock16,mock17,mock18,mock19,mock20", 
26
"Sample,mock term",
27
"no gene",
28
"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
"chromosome3,322500,chromosome3,353700",
30
"mock",
31
"pombase_gene,repeat",
32
"chromosome1,chromosome2,chromosome3,mating_type_region,Spmit,telomeric_contig",
33
\N,\N,
34
true,
35
true,
36
"spo",
37
"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
0,
39
false
40
);
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
-- for stuff that can be plotted as decorative tracks (no genome)
59
-- the grp is also from gfGrouping table
60
-- filetype: 0: server bigBed, 2: server bigWig
61
-- name will be used to compose bbi file "name.bigBed"
62
drop table if exists decorInfo;
63
create table decorInfo (
64
  name char(50) not null primary key,
65
  printname char(100) not null,
66
  parent char(50) null,
67
  grp tinyint not null,
68
  fileType tinyint not null,
69
  hasStruct tinyint null,
70
  queryUrl varchar(255) null
71
);
72
load data local infile 'decorInfo' into table decorInfo;
73

    
74
/*
75
insert into decorInfo values('pombase_gene','PomBase gene',\N,2,0,1,'http://genomebrowser.pombase.org/Schizosaccharomyces_pombe/Transcript/Summary?db=core;t=');
76
insert into decorInfo values('pombase_genepromoter','promoters (PomBase genes)','pombase_gene',2,0,0,\N);
77
insert into decorInfo values('pombase_geneutr3',"3' UTRs (PomBase genes)",'pombase_gene',2,0,0,\N);
78
insert into decorInfo values('pombase_geneutr5',"5' UTRs (PomBase genes)",'pombase_gene',2,0,0,\N);
79
insert into decorInfo values('pombase_geneexons','exons (PomBase genes)','pombase_gene',2,0,0,\N);
80
insert into decorInfo values('pombase_geneintrons','introns (PomBase genes)','pombase_gene',2,0,0,\N);
81

    
82
insert into decorInfo values('repeat','LTR and repeats',\N,5,0,0,\N);
83
insert into decorInfo values('gc5Base','GC percent',\N,5,8,0,\N);
84
*/
85

    
86

    
87

    
88
drop table if exists track2Label;
89
create table track2Label (
90
  name varchar(255) not null primary key,
91
  label text null
92
);
93
load data local infile 'track2Label' into table track2Label;
94

    
95
drop table if exists track2ProcessInfo;
96
create table track2ProcessInfo (
97
  name varchar(255) not null primary key,
98
  detail text null
99
);
100
load data local infile 'track2ProcessInfo' into table track2ProcessInfo;
101

    
102
drop table if exists track2BamInfo;
103
create table track2BamInfo (
104
  name varchar(255) not null,
105
  bamfile varchar(255) not null,
106
  bamfilelabel varchar(255) not null
107
);
108
load data local infile "track2BamInfo" into table track2BamInfo;
109

    
110
drop table if exists track2Detail;
111
create table track2Detail (
112
  name varchar(255) not null primary key,
113
  detail text null
114
);
115
load data local infile 'track2Detail' into table track2Detail;
116

    
117
drop table if exists track2GEO;
118
create table track2GEO (
119
  name varchar(255) not null primary key,
120
  geo char(20) not null
121
);
122
load data local infile 'track2GEO' into table track2GEO;
123

    
124
drop table if exists track2VersionInfo;
125
create table track2VersionInfo (
126
  name varchar(255) not null primary key,
127
  info varchar(255) not null
128
);
129
load data local infile 'track2VersionInfo' into table track2VersionInfo;
130

    
131
-- new trackDetail end here
132

    
133
drop table if exists track2Annotation;
134
create table track2Annotation (
135
  name varchar(255) not null primary key,
136
  attridx varchar(255) not null
137
);
138
load data local infile "track2Annotation" into table track2Annotation;
139

    
140
drop table if exists track2Ft;
141
create table track2Ft (
142
  name varchar(255) not null primary key,
143
  ft tinyint not null
144
);
145
load data local infile "track2Ft" into table track2Ft;
146

    
147

    
148
drop table if exists track2Style;
149
create table track2Style (
150
  name varchar(255) not null primary key,
151
  style text not null
152
);
153
load data local infile "track2Style" into table track2Style;
154

    
155

    
156
drop table if exists track2Regions;
157
create table track2Regions (
158
  name varchar(255) not null primary key,
159
    regionname varchar(255) not null,
160
          regions text not null
161
           );
162

    
163

    
164
drop table if exists metadataVocabulary;
165
create table metadataVocabulary (
166
  child varchar(255) not null,
167
  parent varchar(255) not null
168
);
169
load data local infile "metadataVocabulary" into table metadataVocabulary;
170

    
171
drop table if exists trackAttr2idx;
172
create table trackAttr2idx (
173
  idx varchar(255) not null primary key,
174
  attr varchar(255) not null,
175
  note varchar(255) null,
176
  description text null
177
);
178
load data local infile "trackAttr2idx" into table trackAttr2idx;
179

    
180

    
181

    
182

    
183
drop table if exists tempURL;
184
create table tempURL (
185
  session varchar(100) not null,
186
  offset INT unsigned not null,
187
  urlpiece text not null
188
);
189

    
190

    
191
drop table if exists dataset;
192
create table dataset (
193
  tablename varchar(255) not null,
194
  logo varchar(255) null,
195
  name varchar(255) not null,
196
  url varchar(255) null,
197
  description text not null
198
);
199
load data local infile "dataset" into table dataset;
200

    
201
drop table if exists mock;
202
create table mock (
203
  tkname varchar(255) not null
204
);
205
load data local infile "mock" into table mock;
206

    
207

    
208
drop table if exists scaffoldInfo;
209
create table scaffoldInfo (
210
  parent varchar(255) not null,
211
  child varchar(255) not null,
212
  childLength int unsigned not null
213
);
214
load data local infile "scaffoldInfo" into table scaffoldInfo;
215

    
216

    
217

    
218
drop table if exists cytoband;
219
create table cytoband (
220
  id int null auto_increment primary key,
221
  chrom char(20) not null,
222
  start int not null,
223
  stop int not null,
224
  name char(20) not null,
225
  colorIdx int not null
226
);
227