Statistics
| Branch: | Revision:

root / hg18 / makeDb.sql @ 5f46a05f

History | View | Annotate | Download (6.2 kB)

1
-- -------------------
2
--                  --
3
--  hg18   --
4
--                  --
5
-- -------------------
6
drop table if exists config;
7
create table config (
8
  bbiPath text not null,
9
  seqPath text null,
10
  defaultTracks text not null,
11
  defaultMdcategory varchar(255) not null,
12
  defaultGenelist text not null,
13
  defaultCustomtracks text not null,
14
  defaultPosition varchar(255) not null,
15
  defaultDataset varchar(255) not null,
16
  defaultDecor text null,
17
  defaultScaffold text not null,
18
  ideogram_wiggle1 varchar(255) null,
19
  ideogram_wiggle2 varchar(255) null,
20
  hasGene boolean not null,
21
  allowJuxtaposition boolean not null,
22
  keggSpeciesCode varchar(255) not null,
23
  information text not null,
24
  runmode tinyint not null,
25
  initmatplot boolean not null
26
);
27
insert into config values(
28
"/srv/epgg/data/data/subtleKnife/hg18/",
29
"/srv/epgg/data/data/subtleKnife/seq/hg18.gz",
30
"IMR90_chromhmm_fromhg19,wgEncodeBroadHmmGm12878HMM,wgEncodeBroadHmmH1hescHMM,wgEncodeBroadHmmHepg2HMM,wgEncodeBroadHmmHmecHMM,wgEncodeBroadHmmHsmmHMM,wgEncodeBroadHmmHuvecHMM,wgEncodeBroadHmmK562HMM,wgEncodeBroadHmmNhekHMM,wgEncodeBroadHmmNhlfHMM",
31
"Assay,Sample,Institution",
32
"CYP4Z1\\nCYP2A7\\nCYP2A6\\nCYP3A4\\nCYP1A1\\nCYP4V2\\nCYP51A1\\nCYP2C19\\nCYP26B1\\nCYP11B2\\nCYP24A1\\nCYP4B1\\nCYP2C8",
33
"",
34
"chr7,27029129,chr7,27318965",
35
"encode",
36
"refGene,gc5Base",
37
"chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10,chr11,chr12,chr13,chr14,chr15,chr16,chr17,chr18,chr19,chr20,chr21,chr22,chrX,chrY,chrM",
38
\N,\N,
39
true,
40
true,
41
"hsa",
42
"Assembly version|hg18|Sequence source|<a href=http://hgdownload.soe.ucsc.edu/goldenPath/hg18/bigZips/ target=_blank>UCSC Genome Browser</a>|Date parsed|February 15, 2013|Chromosomes|25|Contigs & misc|68|Total bases|3,137,144,693|Logo art|<a href=http://turing.iimas.unam.mx/~cgg/gallery/EverybodysHive.html target=_blank>link</a>",
43
0,
44
false
45
);
46

    
47

    
48
-- grouping types on genomic features
49
-- table name defined in macro: TBN_GF_GRP
50
drop table if exists gfGrouping;
51
create table gfGrouping (
52
  id TINYINT not null primary key,
53
  name char(50) not null
54
);
55
insert into gfGrouping values (2, "Genes");
56
-- insert into gfGrouping values (3, "non-coding RNA");
57
-- insert into gfGrouping values (4, "RepeatMasker");
58
-- insert into gfGrouping values (6, "Sequence conservation");
59
insert into gfGrouping values (5, "Others");
60

    
61

    
62

    
63
drop table if exists decorInfo;
64
create table decorInfo (
65
  name char(50) not null primary key,
66
  printname char(100) not null,
67
  parent char(50) null,
68
  grp tinyint not null,
69
  fileType tinyint not null,
70
  hasStruct tinyint null,
71
  queryUrl varchar(255) null
72
);
73
load data local infile 'decorInfo' into table decorInfo;
74

    
75
drop table if exists track2Label;
76
create table track2Label (
77
  name varchar(255) not null primary key,
78
  label text null
79
);
80
load data local infile 'track2Label' into table track2Label;
81

    
82
drop table if exists track2ProcessInfo;
83
create table track2ProcessInfo (
84
  name varchar(255) not null primary key,
85
  detail text null
86
);
87
load data local infile 'track2ProcessInfo' into table track2ProcessInfo;
88

    
89
drop table if exists track2BamInfo;
90
create table track2BamInfo (
91
  name varchar(255) not null,
92
  bamfile varchar(255) not null,
93
  bamfilelabel varchar(255) not null
94
);
95
load data local infile "track2BamInfo" into table track2BamInfo;
96

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

    
104
drop table if exists track2GEO;
105
create table track2GEO (
106
  name varchar(255) not null primary key,
107
  geo char(20) not null
108
);
109
load data local infile 'track2GEO' into table track2GEO;
110

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

    
118

    
119
drop table if exists track2Annotation;
120
create table track2Annotation (
121
  name varchar(255) not null primary key,
122
  attridx varchar(255) not null
123
);
124
load data local infile "track2Annotation" into table track2Annotation;
125

    
126
drop table if exists track2Ft;
127
create table track2Ft (
128
  name varchar(255) not null primary key,
129
  ft tinyint not null
130
);
131
load data local infile "track2Ft" into table track2Ft;
132

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

    
140
drop table if exists track2Regions;
141
create table track2Regions (
142
  name varchar(255) not null primary key,
143
    regionname varchar(255) not null,
144
          regions text not null
145
           );
146

    
147

    
148
drop table if exists metadataVocabulary;
149
create table metadataVocabulary (
150
  child varchar(255) not null,
151
  parent varchar(255) not null
152
);
153
load data local infile "metadataVocabulary" into table metadataVocabulary;
154

    
155
drop table if exists trackAttr2idx;
156
create table trackAttr2idx (
157
  idx varchar(255) not null primary key,
158
  attr varchar(255) not null,
159
  note varchar(255) null,
160
  description text null
161
);
162
load data local infile "trackAttr2idx" into table trackAttr2idx;
163

    
164

    
165
drop table if exists tempURL;
166
create table tempURL (
167
  session varchar(100) not null,
168
  offset INT unsigned not null,
169
  urlpiece text not null
170
);
171

    
172

    
173
drop table if exists dataset;
174
create table dataset (
175
  tablename varchar(255) not null,
176
  logo varchar(255) null,
177
  name varchar(255) not null,
178
  url varchar(255) null,
179
  description text not null
180
);
181
load data local infile "dataset" into table dataset;
182

    
183
drop table if exists encode;
184
create table encode(
185
  tkname varchar(255) not null
186
);
187
load data local infile "encode" into table encode;
188

    
189
drop table if exists track2Categorical;
190
create table track2Categorical (
191
  name varchar(255) not null primary key,
192
  info text not null
193
);
194
load data local infile 'track2Categorical' into table track2Categorical;
195

    
196
drop table if exists scaffoldInfo;
197
create table scaffoldInfo (
198
  parent varchar(255) not null,
199
  child varchar(255) not null,
200
  childLength int unsigned not null
201
);
202
load data local infile "scaffoldInfo" into table scaffoldInfo;
203

    
204

    
205
drop table if exists publichub;
206
create table publichub (
207
  name varchar(255) not null,
208
  logo text null,
209
  url text not null,
210
  institution text not null,
211
  description text not null
212
);
213
load data local infile 'publichub' into table publichub;