Statistics
| Branch: | Revision:

root / hg18 / makeDb.sql @ 84c81131

History | View | Annotate | Download (6 kB)

1 8c368a17 Daofeng Li
-- -------------------
2 8c368a17 Daofeng Li
--                  --
3 8c368a17 Daofeng Li
--  hg18   --
4 8c368a17 Daofeng Li
--                  --
5 8c368a17 Daofeng Li
-- -------------------
6 8c368a17 Daofeng Li
drop table if exists config;
7 8c368a17 Daofeng Li
create table config (
8 8c368a17 Daofeng Li
  bbiPath text not null,
9 8c368a17 Daofeng Li
  seqPath text null,
10 8c368a17 Daofeng Li
  defaultTracks text not null,
11 8c368a17 Daofeng Li
  defaultMdcategory varchar(255) not null,
12 8c368a17 Daofeng Li
  defaultGenelist text not null,
13 8c368a17 Daofeng Li
  defaultCustomtracks text not null,
14 8c368a17 Daofeng Li
  defaultPosition varchar(255) not null,
15 8c368a17 Daofeng Li
  defaultDataset varchar(255) not null,
16 8c368a17 Daofeng Li
  defaultDecor text null,
17 8c368a17 Daofeng Li
  defaultScaffold text not null,
18 8c368a17 Daofeng Li
  ideogram_wiggle1 varchar(255) null,
19 8c368a17 Daofeng Li
  ideogram_wiggle2 varchar(255) null,
20 8c368a17 Daofeng Li
  hasGene boolean not null,
21 8c368a17 Daofeng Li
  allowJuxtaposition boolean not null,
22 8c368a17 Daofeng Li
  keggSpeciesCode varchar(255) not null,
23 8c368a17 Daofeng Li
  information text not null,
24 8c368a17 Daofeng Li
  runmode tinyint not null,
25 8c368a17 Daofeng Li
  initmatplot boolean not null
26 8c368a17 Daofeng Li
);
27 8c368a17 Daofeng Li
insert into config values(
28 8c368a17 Daofeng Li
"/srv/epgg/data/data/subtleKnife/hg18/",
29 8c368a17 Daofeng Li
"/srv/epgg/data/data/subtleKnife/seq/hg18.gz",
30 8c368a17 Daofeng Li
"IMR90_chromhmm_fromhg19,wgEncodeBroadHmmGm12878HMM,wgEncodeBroadHmmH1hescHMM,wgEncodeBroadHmmHepg2HMM,wgEncodeBroadHmmHmecHMM,wgEncodeBroadHmmHsmmHMM,wgEncodeBroadHmmHuvecHMM,wgEncodeBroadHmmK562HMM,wgEncodeBroadHmmNhekHMM,wgEncodeBroadHmmNhlfHMM",
31 8c368a17 Daofeng Li
"Assay,Sample,Institution",
32 8c368a17 Daofeng Li
"CYP4Z1\\nCYP2A7\\nCYP2A6\\nCYP3A4\\nCYP1A1\\nCYP4V2\\nCYP51A1\\nCYP2C19\\nCYP26B1\\nCYP11B2\\nCYP24A1\\nCYP4B1\\nCYP2C8",
33 71d28e6f Daofeng Li
"13,http://epgg-test.wustl.edu/cc.gz",
34 8c368a17 Daofeng Li
"chr7,27029129,chr7,27318965",
35 8c368a17 Daofeng Li
"encode",
36 71d28e6f Daofeng Li
"refGene,rmsk_ensemble",
37 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,chrX,chrY,chrM",
38 8c368a17 Daofeng Li
\N,\N,
39 8c368a17 Daofeng Li
true,
40 8c368a17 Daofeng Li
true,
41 8c368a17 Daofeng Li
"hsa",
42 8c368a17 Daofeng Li
"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 8c368a17 Daofeng Li
0,
44 8c368a17 Daofeng Li
false
45 8c368a17 Daofeng Li
);
46 8c368a17 Daofeng Li
47 8c368a17 Daofeng Li
48 8c368a17 Daofeng Li
-- grouping types on genomic features
49 8c368a17 Daofeng Li
-- table name defined in macro: TBN_GF_GRP
50 8c368a17 Daofeng Li
drop table if exists gfGrouping;
51 8c368a17 Daofeng Li
create table gfGrouping (
52 8c368a17 Daofeng Li
  id TINYINT not null primary key,
53 8c368a17 Daofeng Li
  name char(50) not null
54 8c368a17 Daofeng Li
);
55 8c368a17 Daofeng Li
insert into gfGrouping values (2, "Genes");
56 8c368a17 Daofeng Li
-- insert into gfGrouping values (3, "non-coding RNA");
57 8c368a17 Daofeng Li
-- insert into gfGrouping values (4, "RepeatMasker");
58 8c368a17 Daofeng Li
-- insert into gfGrouping values (6, "Sequence conservation");
59 8c368a17 Daofeng Li
insert into gfGrouping values (5, "Others");
60 8c368a17 Daofeng Li
61 8c368a17 Daofeng Li
62 8c368a17 Daofeng Li
63 8c368a17 Daofeng Li
drop table if exists decorInfo;
64 8c368a17 Daofeng Li
create table decorInfo (
65 8c368a17 Daofeng Li
  name char(50) not null primary key,
66 8c368a17 Daofeng Li
  printname char(100) not null,
67 8c368a17 Daofeng Li
  parent char(50) null,
68 8c368a17 Daofeng Li
  grp tinyint not null,
69 8c368a17 Daofeng Li
  fileType tinyint not null,
70 8c368a17 Daofeng Li
  hasStruct tinyint null,
71 8c368a17 Daofeng Li
  queryUrl varchar(255) null
72 8c368a17 Daofeng Li
);
73 8c368a17 Daofeng Li
load data local infile 'decorInfo' into table decorInfo;
74 8c368a17 Daofeng Li
75 8c368a17 Daofeng Li
drop table if exists track2Label;
76 8c368a17 Daofeng Li
create table track2Label (
77 8c368a17 Daofeng Li
  name varchar(255) not null primary key,
78 8c368a17 Daofeng Li
  label text null
79 8c368a17 Daofeng Li
);
80 8c368a17 Daofeng Li
load data local infile 'track2Label' into table track2Label;
81 8c368a17 Daofeng Li
82 8c368a17 Daofeng Li
drop table if exists track2ProcessInfo;
83 8c368a17 Daofeng Li
create table track2ProcessInfo (
84 8c368a17 Daofeng Li
  name varchar(255) not null primary key,
85 8c368a17 Daofeng Li
  detail text null
86 8c368a17 Daofeng Li
);
87 8c368a17 Daofeng Li
load data local infile 'track2ProcessInfo' into table track2ProcessInfo;
88 8c368a17 Daofeng Li
89 8c368a17 Daofeng Li
drop table if exists track2BamInfo;
90 8c368a17 Daofeng Li
create table track2BamInfo (
91 8c368a17 Daofeng Li
  name varchar(255) not null,
92 8c368a17 Daofeng Li
  bamfile varchar(255) not null,
93 8c368a17 Daofeng Li
  bamfilelabel varchar(255) not null
94 8c368a17 Daofeng Li
);
95 8c368a17 Daofeng Li
load data local infile "track2BamInfo" into table track2BamInfo;
96 8c368a17 Daofeng Li
97 8c368a17 Daofeng Li
drop table if exists track2Detail;
98 8c368a17 Daofeng Li
create table track2Detail (
99 8c368a17 Daofeng Li
  name varchar(255) not null primary key,
100 8c368a17 Daofeng Li
  detail text null
101 8c368a17 Daofeng Li
);
102 8c368a17 Daofeng Li
load data local infile 'track2Detail' into table track2Detail;
103 8c368a17 Daofeng Li
104 8c368a17 Daofeng Li
drop table if exists track2GEO;
105 8c368a17 Daofeng Li
create table track2GEO (
106 8c368a17 Daofeng Li
  name varchar(255) not null primary key,
107 8c368a17 Daofeng Li
  geo char(20) not null
108 8c368a17 Daofeng Li
);
109 8c368a17 Daofeng Li
load data local infile 'track2GEO' into table track2GEO;
110 8c368a17 Daofeng Li
111 8c368a17 Daofeng Li
drop table if exists track2VersionInfo;
112 8c368a17 Daofeng Li
create table track2VersionInfo (
113 8c368a17 Daofeng Li
  name varchar(255) not null primary key,
114 8c368a17 Daofeng Li
  info varchar(255) not null
115 8c368a17 Daofeng Li
);
116 8c368a17 Daofeng Li
load data local infile 'track2VersionInfo' into table track2VersionInfo;
117 8c368a17 Daofeng Li
118 8c368a17 Daofeng Li
119 8c368a17 Daofeng Li
drop table if exists track2Annotation;
120 8c368a17 Daofeng Li
create table track2Annotation (
121 8c368a17 Daofeng Li
  name varchar(255) not null primary key,
122 8c368a17 Daofeng Li
  attridx varchar(255) not null
123 8c368a17 Daofeng Li
);
124 8c368a17 Daofeng Li
load data local infile "track2Annotation" into table track2Annotation;
125 8c368a17 Daofeng Li
126 8c368a17 Daofeng Li
drop table if exists track2Ft;
127 8c368a17 Daofeng Li
create table track2Ft (
128 8c368a17 Daofeng Li
  name varchar(255) not null primary key,
129 8c368a17 Daofeng Li
  ft tinyint not null
130 8c368a17 Daofeng Li
);
131 8c368a17 Daofeng Li
load data local infile "track2Ft" into table track2Ft;
132 8c368a17 Daofeng Li
133 8c368a17 Daofeng Li
drop table if exists track2Style;
134 8c368a17 Daofeng Li
create table track2Style (
135 8c368a17 Daofeng Li
  name varchar(255) not null primary key,
136 8c368a17 Daofeng Li
  style text not null
137 8c368a17 Daofeng Li
);
138 8c368a17 Daofeng Li
load data local infile "track2Style" into table track2Style;
139 8c368a17 Daofeng Li
140 8c368a17 Daofeng Li
drop table if exists track2Regions;
141 8c368a17 Daofeng Li
create table track2Regions (
142 8c368a17 Daofeng Li
  name varchar(255) not null primary key,
143 8c368a17 Daofeng Li
    regionname varchar(255) not null,
144 8c368a17 Daofeng Li
          regions text not null
145 8c368a17 Daofeng Li
           );
146 8c368a17 Daofeng Li
147 8c368a17 Daofeng Li
148 8c368a17 Daofeng Li
drop table if exists metadataVocabulary;
149 8c368a17 Daofeng Li
create table metadataVocabulary (
150 8c368a17 Daofeng Li
  child varchar(255) not null,
151 8c368a17 Daofeng Li
  parent varchar(255) not null
152 8c368a17 Daofeng Li
);
153 8c368a17 Daofeng Li
load data local infile "metadataVocabulary" into table metadataVocabulary;
154 8c368a17 Daofeng Li
155 8c368a17 Daofeng Li
drop table if exists trackAttr2idx;
156 8c368a17 Daofeng Li
create table trackAttr2idx (
157 8c368a17 Daofeng Li
  idx varchar(255) not null primary key,
158 8c368a17 Daofeng Li
  attr varchar(255) not null,
159 8c368a17 Daofeng Li
  note varchar(255) null,
160 8c368a17 Daofeng Li
  description text null
161 8c368a17 Daofeng Li
);
162 8c368a17 Daofeng Li
load data local infile "trackAttr2idx" into table trackAttr2idx;
163 8c368a17 Daofeng Li
164 8c368a17 Daofeng Li
165 8c368a17 Daofeng Li
drop table if exists tempURL;
166 8c368a17 Daofeng Li
create table tempURL (
167 8c368a17 Daofeng Li
  session varchar(100) not null,
168 8c368a17 Daofeng Li
  offset INT unsigned not null,
169 8c368a17 Daofeng Li
  urlpiece text not null
170 8c368a17 Daofeng Li
);
171 8c368a17 Daofeng Li
172 8c368a17 Daofeng Li
173 8c368a17 Daofeng Li
drop table if exists dataset;
174 8c368a17 Daofeng Li
create table dataset (
175 8c368a17 Daofeng Li
  tablename varchar(255) not null,
176 8c368a17 Daofeng Li
  logo varchar(255) null,
177 8c368a17 Daofeng Li
  name varchar(255) not null,
178 8c368a17 Daofeng Li
  url varchar(255) null,
179 8c368a17 Daofeng Li
  description text not null
180 8c368a17 Daofeng Li
);
181 8c368a17 Daofeng Li
load data local infile "dataset" into table dataset;
182 8c368a17 Daofeng Li
183 8c368a17 Daofeng Li
drop table if exists encode;
184 8c368a17 Daofeng Li
create table encode(
185 8c368a17 Daofeng Li
  tkname varchar(255) not null
186 8c368a17 Daofeng Li
);
187 8c368a17 Daofeng Li
load data local infile "encode" into table encode;
188 8c368a17 Daofeng Li
189 8c368a17 Daofeng Li
drop table if exists track2Categorical;
190 8c368a17 Daofeng Li
create table track2Categorical (
191 8c368a17 Daofeng Li
  name varchar(255) not null primary key,
192 8c368a17 Daofeng Li
  info text not null
193 8c368a17 Daofeng Li
);
194 8c368a17 Daofeng Li
load data local infile 'track2Categorical' into table track2Categorical;
195 8c368a17 Daofeng Li
196 8c368a17 Daofeng Li
drop table if exists scaffoldInfo;
197 8c368a17 Daofeng Li
create table scaffoldInfo (
198 8c368a17 Daofeng Li
  parent varchar(255) not null,
199 8c368a17 Daofeng Li
  child varchar(255) not null,
200 8c368a17 Daofeng Li
  childLength int unsigned not null
201 8c368a17 Daofeng Li
);
202 8c368a17 Daofeng Li
load data local infile "scaffoldInfo" into table scaffoldInfo;