Statistics
| Branch: | Revision:

root / tair10 / makeDb.sql @ master

History | View | Annotate | Download (6.5 kB)

1
-- -------------------
2
--                  --
3
--  tair10heatmap   --
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) 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/tair10/",
29
"/srv/epgg/data/data/subtleKnife/seq/tair10.gz",
30
"mock1,mock2,mock3,mock4,mock5,mock6,mock7,mock8,mock9,mock10,mock11,mock12,mock13,mock14,mock15,mock16,mock17,mock18,mock19,mock20", 
31
"Sample,mock term",
32
"CYP71B7\\nCYP86C3\\nCYP86C4\\nCYP79F2\\nCYP722A1\\nCYP86C1\\nCYP705A24\\nCYP76C6\\nCYP76C5\\nCYP94D1\\nCYP96A8\\nCYP705A27\\nCYP705A25\\nCYP59\\nCYP708A1\\nCYP79C3P\\nCYP86A7\\nCYP89A2\\nCYP89A7",
33
"3,http://vizhub.wustl.edu/hubSample/tair10/1.gz,5,http://vizhub.wustl.edu/hubSample/tair10/bed.gz,100,http://vizhub.wustl.edu/hubSample/tair10/hub.txt",
34
"Chr1,11000000,Chr1,11500000",
35
"mock",
36
"tair10Gene,repeat",
37
"Chr1,Chr2,Chr3,Chr4,Chr5,ChrC,ChrM",
38
\N,\N,
39
true,
40
true,
41
"ath",
42
"Assembly version|tair10|Sequence source|<a href=ftp://ftp.arabidopsis.org/home/tair/Sequences/whole_chromosomes/ target=_blank>TAIR</a>|Date parsed|December 1, 2011|Chromosomes|7|Total bases|119,667,750|Logo art|<a href=http://www.prl.msu.edu/Facultypages/NSF_MFT_Site/images/arabidopsis.jpg 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
/*
76
insert into decorInfo values('refseq','RefSeq genes',\N,2,0,1,'http://www.ncbi.nlm.nih.gov/gene?term=');
77
insert into decorInfo values('refseqpromoter','promoters (RefSeq genes)','refseq',2,0,0,\N);
78
insert into decorInfo values('refsequtr3',"3' UTRs (RefSeq genes)",'refseq',2,0,0,\N);
79
insert into decorInfo values('refsequtr5',"5' UTRs (RefSeq genes)",'refseq',2,0,0,\N);
80
insert into decorInfo values('refseqexons','exons (RefSeq genes)','refseq',2,0,0,\N);
81
insert into decorInfo values('refseqintrons','introns (RefSeq genes)','refseq',2,0,0,\N);
82
*/
83

    
84
drop table if exists track2Label;
85
create table track2Label (
86
  name varchar(255) not null primary key,
87
  label text null
88
);
89
load data local infile 'track2Label' into table track2Label;
90

    
91
drop table if exists track2ProcessInfo;
92
create table track2ProcessInfo (
93
  name varchar(255) not null primary key,
94
  detail text null
95
);
96
load data local infile 'track2ProcessInfo' into table track2ProcessInfo;
97

    
98
drop table if exists track2BamInfo;
99
create table track2BamInfo (
100
  name varchar(255) not null,
101
  bamfile varchar(255) not null,
102
  bamfilelabel varchar(255) not null
103
);
104
load data local infile "track2BamInfo" into table track2BamInfo;
105

    
106
drop table if exists track2Detail;
107
create table track2Detail (
108
  name varchar(255) not null primary key,
109
  detail text null
110
);
111
load data local infile 'track2Detail' into table track2Detail;
112

    
113
drop table if exists track2GEO;
114
create table track2GEO (
115
  name varchar(255) not null primary key,
116
  geo char(20) not null
117
);
118
load data local infile 'track2GEO' into table track2GEO;
119

    
120
drop table if exists track2VersionInfo;
121
create table track2VersionInfo (
122
  name varchar(255) not null primary key,
123
  info varchar(255) not null
124
);
125
load data local infile 'track2VersionInfo' into table track2VersionInfo;
126

    
127

    
128
drop table if exists track2Annotation;
129
create table track2Annotation (
130
  name varchar(255) not null primary key,
131
  attridx varchar(255) not null
132
);
133
load data local infile "track2Annotation" into table track2Annotation;
134

    
135
drop table if exists track2Ft;
136
create table track2Ft (
137
  name varchar(255) not null primary key,
138
  ft tinyint not null
139
);
140
load data local infile "track2Ft" into table track2Ft;
141

    
142
drop table if exists track2Style;
143
create table track2Style (
144
  name varchar(255) not null primary key,
145
  style text not null
146
);
147
load data local infile "track2Style" into table track2Style;
148

    
149
drop table if exists track2Regions;
150
create table track2Regions (
151
  name varchar(255) not null primary key,
152
    regionname varchar(255) not null,
153
          regions text not null
154
           );
155

    
156

    
157
drop table if exists metadataVocabulary;
158
create table metadataVocabulary (
159
  child varchar(255) not null,
160
  parent varchar(255) not null
161
);
162
load data local infile "metadataVocabulary" into table metadataVocabulary;
163

    
164
drop table if exists trackAttr2idx;
165
create table trackAttr2idx (
166
  idx varchar(255) not null primary key,
167
  attr varchar(255) not null,
168
  note varchar(255) null,
169
  description text null
170
);
171
load data local infile "trackAttr2idx" into table trackAttr2idx;
172

    
173

    
174
drop table if exists tempURL;
175
create table tempURL (
176
  session varchar(100) not null,
177
  offset INT unsigned not null,
178
  urlpiece text not null
179
);
180

    
181

    
182
drop table if exists dataset;
183
create table dataset (
184
  tablename varchar(255) not null,
185
  logo varchar(255) null,
186
  name varchar(255) not null,
187
  url varchar(255) null,
188
  description text not null
189
);
190
load data local infile "dataset" into table dataset;
191

    
192
drop table if exists mock;
193
create table mock (
194
  tkname varchar(255) not null
195
);
196
load data local infile "mock" into table mock;
197

    
198

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

    
207

    
208

    
209
drop table if exists cytoband;
210
create table cytoband (
211
  id int null auto_increment primary key,
212
  chrom char(20) not null,
213
  start int not null,
214
  stop int not null,
215
  name char(20) not null,
216
  colorIdx int not null
217
);
218