table.sql 62.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
-- MySQL dump 10.13  Distrib 5.5.49, for debian-linux-gnu (x86_64)
--
-- Host: localhost    Database: ens_test
-- ------------------------------------------------------
-- Server version	5.5.49-0ubuntu0.14.04.1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `allele`
--

DROP TABLE IF EXISTS `allele`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
25 26 27 28 29 30 31 32 33 34 35 36 37
CREATE TABLE `allele` (
  `allele_id` int(11) NOT NULL AUTO_INCREMENT,
  `variation_id` int(11) unsigned NOT NULL,
  `subsnp_id` int(11) unsigned DEFAULT NULL,
  `allele_code_id` int(11) unsigned NOT NULL,
  `population_id` int(11) unsigned DEFAULT NULL,
  `frequency` float unsigned DEFAULT NULL,
  `count` int(11) unsigned DEFAULT NULL,
  `frequency_submitter_handle` int(10) DEFAULT NULL,
  PRIMARY KEY (`allele_id`),
  KEY `variation_idx` (`variation_id`),
  KEY `subsnp_idx` (`subsnp_id`),
  KEY `population_idx` (`population_id`)
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `allele`
--

LOCK TABLES `allele` WRITE;
/*!40000 ALTER TABLE `allele` DISABLE KEYS */;
/*!40000 ALTER TABLE `allele` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `allele_code`
--
53

54 55 56
DROP TABLE IF EXISTS `allele_code`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
57 58
CREATE TABLE `allele_code` (
  `allele_code_id` int(11) NOT NULL AUTO_INCREMENT,
59
  `allele` varchar(60000) DEFAULT NULL,
60
  PRIMARY KEY (`allele_code_id`),
61
  UNIQUE KEY `allele_idx` (`allele`(1000))
Anja Thormann's avatar
Anja Thormann committed
62
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
63
/*!40101 SET character_set_client = @saved_cs_client */;
64

65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
--
-- Dumping data for table `allele_code`
--

LOCK TABLES `allele_code` WRITE;
/*!40000 ALTER TABLE `allele_code` DISABLE KEYS */;
/*!40000 ALTER TABLE `allele_code` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `associate_study`
--

DROP TABLE IF EXISTS `associate_study`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
81 82 83 84
CREATE TABLE `associate_study` (
  `study1_id` int(10) unsigned NOT NULL,
  `study2_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`study1_id`,`study2_id`)
Anja Thormann's avatar
Anja Thormann committed
85
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
86 87 88 89 90
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `associate_study`
--
91

92 93 94 95 96 97 98 99 100 101 102 103
LOCK TABLES `associate_study` WRITE;
/*!40000 ALTER TABLE `associate_study` DISABLE KEYS */;
/*!40000 ALTER TABLE `associate_study` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `attrib`
--

DROP TABLE IF EXISTS `attrib`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
104
CREATE TABLE `attrib` (
Magali Ruffier's avatar
Magali Ruffier committed
105
  `attrib_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
106 107 108 109
  `attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `value` text NOT NULL,
  PRIMARY KEY (`attrib_id`),
  UNIQUE KEY `type_val_idx` (`attrib_type_id`,`value`(80))
110 111
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
112

113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
--
-- Dumping data for table `attrib`
--

LOCK TABLES `attrib` WRITE;
/*!40000 ALTER TABLE `attrib` DISABLE KEYS */;
/*!40000 ALTER TABLE `attrib` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `attrib_set`
--

DROP TABLE IF EXISTS `attrib_set`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
129 130 131 132 133
CREATE TABLE `attrib_set` (
  `attrib_set_id` int(11) unsigned NOT NULL DEFAULT '0',
  `attrib_id` int(11) unsigned NOT NULL DEFAULT '0',
  UNIQUE KEY `set_idx` (`attrib_set_id`,`attrib_id`),
  KEY `attrib_idx` (`attrib_id`)
Anja Thormann's avatar
Anja Thormann committed
134
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
135 136 137 138 139
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `attrib_set`
--
140

141 142 143 144 145 146 147 148 149 150 151 152
LOCK TABLES `attrib_set` WRITE;
/*!40000 ALTER TABLE `attrib_set` DISABLE KEYS */;
/*!40000 ALTER TABLE `attrib_set` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `attrib_type`
--

DROP TABLE IF EXISTS `attrib_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
153 154 155 156 157 158 159
CREATE TABLE `attrib_type` (
  `attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `code` varchar(20) NOT NULL DEFAULT '',
  `name` varchar(255) NOT NULL DEFAULT '',
  `description` text,
  PRIMARY KEY (`attrib_type_id`),
  UNIQUE KEY `code_idx` (`code`)
Anja Thormann's avatar
Anja Thormann committed
160
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
161 162 163 164 165
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `attrib_type`
--
166

167 168 169 170 171 172 173 174 175 176 177 178
LOCK TABLES `attrib_type` WRITE;
/*!40000 ALTER TABLE `attrib_type` DISABLE KEYS */;
/*!40000 ALTER TABLE `attrib_type` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `compressed_genotype_region`
--

DROP TABLE IF EXISTS `compressed_genotype_region`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
179 180 181 182 183 184 185 186 187
CREATE TABLE `compressed_genotype_region` (
  `sample_id` int(10) unsigned NOT NULL,
  `seq_region_id` int(10) unsigned NOT NULL,
  `seq_region_start` int(11) NOT NULL,
  `seq_region_end` int(11) NOT NULL,
  `seq_region_strand` tinyint(4) NOT NULL,
  `genotypes` blob,
  KEY `pos_idx` (`seq_region_id`,`seq_region_start`),
  KEY `sample_idx` (`sample_id`)
Anja Thormann's avatar
Anja Thormann committed
188
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
189 190 191 192 193
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `compressed_genotype_region`
--
194

195 196 197 198 199 200 201 202 203 204 205 206
LOCK TABLES `compressed_genotype_region` WRITE;
/*!40000 ALTER TABLE `compressed_genotype_region` DISABLE KEYS */;
/*!40000 ALTER TABLE `compressed_genotype_region` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `compressed_genotype_var`
--

DROP TABLE IF EXISTS `compressed_genotype_var`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
207 208 209 210 211 212
CREATE TABLE `compressed_genotype_var` (
  `variation_id` int(11) unsigned NOT NULL,
  `subsnp_id` int(11) unsigned DEFAULT NULL,
  `genotypes` blob,
  KEY `variation_idx` (`variation_id`),
  KEY `subsnp_idx` (`subsnp_id`)
Anja Thormann's avatar
Anja Thormann committed
213
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
214 215 216 217 218
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `compressed_genotype_var`
--
219

220 221 222 223 224 225 226 227 228 229 230 231
LOCK TABLES `compressed_genotype_var` WRITE;
/*!40000 ALTER TABLE `compressed_genotype_var` DISABLE KEYS */;
/*!40000 ALTER TABLE `compressed_genotype_var` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `coord_system`
--

DROP TABLE IF EXISTS `coord_system`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
232 233 234 235 236 237 238 239 240 241 242
CREATE TABLE `coord_system` (
  `coord_system_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `species_id` int(10) unsigned NOT NULL DEFAULT '1',
  `name` varchar(40) NOT NULL,
  `version` varchar(255) DEFAULT NULL,
  `rank` int(11) NOT NULL,
  `attrib` set('default_version','sequence_level') DEFAULT NULL,
  PRIMARY KEY (`coord_system_id`),
  UNIQUE KEY `rank_idx` (`rank`,`species_id`),
  UNIQUE KEY `name_idx` (`name`,`version`,`species_id`),
  KEY `species_idx` (`species_id`)
Anja Thormann's avatar
Anja Thormann committed
243
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
244 245 246 247 248 249 250 251 252 253
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `coord_system`
--

LOCK TABLES `coord_system` WRITE;
/*!40000 ALTER TABLE `coord_system` DISABLE KEYS */;
/*!40000 ALTER TABLE `coord_system` ENABLE KEYS */;
UNLOCK TABLES;
254

255 256 257 258 259 260 261
--
-- Table structure for table `display_group`
--

DROP TABLE IF EXISTS `display_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
262 263 264 265 266 267 268
CREATE TABLE `display_group` (
  `display_group_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `display_priority` int(10) unsigned NOT NULL,
  `display_name` varchar(255) NOT NULL,
  PRIMARY KEY (`display_group_id`),
  UNIQUE KEY `display_name` (`display_name`),
  UNIQUE KEY `display_priority` (`display_priority`)
Anja Thormann's avatar
Anja Thormann committed
269
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
270 271 272 273 274 275 276 277 278 279
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `display_group`
--

LOCK TABLES `display_group` WRITE;
/*!40000 ALTER TABLE `display_group` DISABLE KEYS */;
/*!40000 ALTER TABLE `display_group` ENABLE KEYS */;
UNLOCK TABLES;
280

281 282 283 284 285 286 287
--
-- Table structure for table `failed_allele`
--

DROP TABLE IF EXISTS `failed_allele`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
288 289 290 291 292 293
CREATE TABLE `failed_allele` (
  `failed_allele_id` int(11) NOT NULL AUTO_INCREMENT,
  `allele_id` int(10) unsigned NOT NULL,
  `failed_description_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`failed_allele_id`),
  UNIQUE KEY `allele_idx` (`allele_id`,`failed_description_id`)
Anja Thormann's avatar
Anja Thormann committed
294
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
295 296 297 298 299 300 301 302 303 304 305 306 307 308
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `failed_allele`
--

LOCK TABLES `failed_allele` WRITE;
/*!40000 ALTER TABLE `failed_allele` DISABLE KEYS */;
/*!40000 ALTER TABLE `failed_allele` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `failed_description`
--
309

310 311 312
DROP TABLE IF EXISTS `failed_description`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
313 314 315 316
CREATE TABLE `failed_description` (
  `failed_description_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `description` text NOT NULL,
  PRIMARY KEY (`failed_description_id`)
Anja Thormann's avatar
Anja Thormann committed
317
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `failed_description`
--

LOCK TABLES `failed_description` WRITE;
/*!40000 ALTER TABLE `failed_description` DISABLE KEYS */;
INSERT INTO `failed_description` VALUES (1,'Variant maps to more than 3 different locations'),(2,'None of the variant alleles match the reference allele'),(3,'Variant has more than 3 different alleles'),(4,'Loci with no observed variant alleles in dbSNP'),(5,'Variant does not map to the genome'),(6,'Variant has no genotypes'),(7,'Genotype frequencies do not add up to 1'),(8,'Variant has no associated sequence'),(9,'Variant submission has been withdrawn by the 1000 genomes project due to high false positive rate'),(11,'Additional submitted allele data from dbSNP does not agree with the dbSNP refSNP alleles'),(12,'Variant has more than 3 different submitted alleles'),(13,'Alleles contain non-nucleotide characters'),(14,'Alleles contain ambiguity codes'),(15,'Mapped position is not compatible with reported alleles'),(16,'Flagged as suspect by dbSNP'),(17,'Variant can not be re-mapped to the current assembly'),(18,'Supporting evidence can not be re-mapped to the current assembly'),(19,'Variant maps to more than one genomic location'),(20,'Variant at first base in sequence');
/*!40000 ALTER TABLE `failed_description` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `failed_structural_variation`
--
333

334 335 336
DROP TABLE IF EXISTS `failed_structural_variation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
337 338 339 340 341 342
CREATE TABLE `failed_structural_variation` (
  `failed_structural_variation_id` int(11) NOT NULL AUTO_INCREMENT,
  `structural_variation_id` int(10) unsigned NOT NULL,
  `failed_description_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`failed_structural_variation_id`),
  UNIQUE KEY `structural_variation_idx` (`structural_variation_id`,`failed_description_id`)
Anja Thormann's avatar
Anja Thormann committed
343
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
344
/*!40101 SET character_set_client = @saved_cs_client */;
345

346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361
--
-- Dumping data for table `failed_structural_variation`
--

LOCK TABLES `failed_structural_variation` WRITE;
/*!40000 ALTER TABLE `failed_structural_variation` DISABLE KEYS */;
/*!40000 ALTER TABLE `failed_structural_variation` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `failed_variation`
--

DROP TABLE IF EXISTS `failed_variation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
362 363 364 365 366 367
CREATE TABLE `failed_variation` (
  `failed_variation_id` int(11) NOT NULL AUTO_INCREMENT,
  `variation_id` int(10) unsigned NOT NULL,
  `failed_description_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`failed_variation_id`),
  UNIQUE KEY `variation_idx` (`variation_id`,`failed_description_id`)
Anja Thormann's avatar
Anja Thormann committed
368
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
369 370 371 372 373
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `failed_variation`
--
374

375 376 377 378 379 380 381 382 383 384 385 386
LOCK TABLES `failed_variation` WRITE;
/*!40000 ALTER TABLE `failed_variation` DISABLE KEYS */;
/*!40000 ALTER TABLE `failed_variation` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `genotype_code`
--

DROP TABLE IF EXISTS `genotype_code`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
387 388 389 390 391 392 393
CREATE TABLE `genotype_code` (
  `genotype_code_id` int(11) unsigned NOT NULL,
  `allele_code_id` int(11) unsigned NOT NULL,
  `haplotype_id` tinyint(2) unsigned NOT NULL,
  `phased` tinyint(2) unsigned DEFAULT NULL,
  KEY `genotype_code_id` (`genotype_code_id`),
  KEY `allele_code_id` (`allele_code_id`)
Anja Thormann's avatar
Anja Thormann committed
394
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
395 396 397 398 399
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `genotype_code`
--
400

401 402 403 404 405 406 407 408 409 410 411 412
LOCK TABLES `genotype_code` WRITE;
/*!40000 ALTER TABLE `genotype_code` DISABLE KEYS */;
/*!40000 ALTER TABLE `genotype_code` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `individual`
--

DROP TABLE IF EXISTS `individual`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
413 414 415 416 417 418 419 420 421 422 423
CREATE TABLE `individual` (
  `individual_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `description` text,
  `gender` enum('Male','Female','Unknown') NOT NULL DEFAULT 'Unknown',
  `father_individual_id` int(10) unsigned DEFAULT NULL,
  `mother_individual_id` int(10) unsigned DEFAULT NULL,
  `individual_type_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`individual_id`),
  KEY `father_individual_idx` (`father_individual_id`),
  KEY `mother_individual_idx` (`mother_individual_id`)
Anja Thormann's avatar
Anja Thormann committed
424
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
425 426 427 428 429
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `individual`
--
430

431 432 433 434 435 436 437 438 439 440 441 442
LOCK TABLES `individual` WRITE;
/*!40000 ALTER TABLE `individual` DISABLE KEYS */;
/*!40000 ALTER TABLE `individual` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `individual_synonym`
--

DROP TABLE IF EXISTS `individual_synonym`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
443 444 445 446 447 448 449 450
CREATE TABLE `individual_synonym` (
  `synonym_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `individual_id` int(10) unsigned NOT NULL,
  `source_id` int(10) unsigned NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`synonym_id`),
  KEY `individual_idx` (`individual_id`),
  KEY `name` (`name`,`source_id`)
Anja Thormann's avatar
Anja Thormann committed
451
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
452 453 454 455 456
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `individual_synonym`
--
457

458 459 460 461 462 463 464 465 466 467 468 469
LOCK TABLES `individual_synonym` WRITE;
/*!40000 ALTER TABLE `individual_synonym` DISABLE KEYS */;
/*!40000 ALTER TABLE `individual_synonym` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `individual_type`
--

DROP TABLE IF EXISTS `individual_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
470 471 472 473 474
CREATE TABLE `individual_type` (
  `individual_type_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `description` text,
  PRIMARY KEY (`individual_type_id`)
Magali Ruffier's avatar
Magali Ruffier committed
475
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
476 477 478 479 480 481 482 483 484 485 486
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `individual_type`
--

LOCK TABLES `individual_type` WRITE;
/*!40000 ALTER TABLE `individual_type` DISABLE KEYS */;
INSERT INTO `individual_type` VALUES (1,'fully_inbred','multiple organisms have the same genome sequence'),(2,'partly_inbred','single organisms have reduced genome variability due to human intervention'),(3,'outbred','a single organism which breeds freely'),(4,'mutant','a single or multiple organisms with the same genome sequence that have a natural or experimentally induced mutation');
/*!40000 ALTER TABLE `individual_type` ENABLE KEYS */;
UNLOCK TABLES;
487

488 489 490 491 492 493 494
--
-- Table structure for table `meta`
--

DROP TABLE IF EXISTS `meta`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
495 496 497 498 499 500 501 502
CREATE TABLE `meta` (
  `meta_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `species_id` int(10) unsigned DEFAULT '1',
  `meta_key` varchar(40) NOT NULL,
  `meta_value` varchar(255) NOT NULL,
  PRIMARY KEY (`meta_id`),
  UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
  KEY `species_value_idx` (`species_id`,`meta_value`)
503 504 505 506 507 508 509 510 511 512 513 514
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `meta`
--

LOCK TABLES `meta` WRITE;
/*!40000 ALTER TABLE `meta` DISABLE KEYS */;
INSERT INTO `meta` VALUES (1,NULL,'schema_type','variation'),(2,NULL,'schema_version','84'),(3,NULL,'patch','patch_84_85_a.sql|schema version'),(4,NULL,'patch','patch_84_85_b.sql|create sample_synonym'),(5,NULL,'patch','patch_84_85_c.sql|drop column moltype from variation_synonym'),(6,NULL,'patch','patch_84_85_d.sql|Making attrib_id auto_increment'),(7,NULL,'patch','patch_84_85_e.sql|drop the table tagged_variation_feature'),(8,NULL,'patch','patch_84_85_f.sql|add phenotype_ontology_accession'),(9,NULL,'patch','patch_84_85_g.sql|allow the column description to store more text in the source table');
/*!40000 ALTER TABLE `meta` ENABLE KEYS */;
UNLOCK TABLES;
515

516 517 518 519 520 521 522
--
-- Table structure for table `meta_coord`
--

DROP TABLE IF EXISTS `meta_coord`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
523 524 525 526 527
CREATE TABLE `meta_coord` (
  `table_name` varchar(40) NOT NULL,
  `coord_system_id` int(10) unsigned NOT NULL,
  `max_length` int(11) DEFAULT NULL,
  UNIQUE KEY `table_name` (`table_name`,`coord_system_id`)
Anja Thormann's avatar
Anja Thormann committed
528
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
529 530 531 532 533 534 535 536 537 538 539 540 541 542
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `meta_coord`
--

LOCK TABLES `meta_coord` WRITE;
/*!40000 ALTER TABLE `meta_coord` DISABLE KEYS */;
/*!40000 ALTER TABLE `meta_coord` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `motif_feature_variation`
--
543

544 545 546
DROP TABLE IF EXISTS `motif_feature_variation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
547 548 549 550 551 552 553
CREATE TABLE `motif_feature_variation` (
  `motif_feature_variation_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `variation_feature_id` int(11) unsigned NOT NULL,
  `feature_stable_id` varchar(128) DEFAULT NULL,
  `motif_feature_id` int(11) unsigned NOT NULL,
  `allele_string` text,
  `somatic` tinyint(1) NOT NULL DEFAULT '0',
554 555
  `consequence_types` set('TF_binding_site_variant','TFBS_ablation','TFBS_fusion','TFBS_amplification','TFBS_translocation') DEFAULT NULL,
  `motif_name` varchar(60) DEFAULT NULL,
556 557 558 559 560 561 562 563
  `motif_start` int(11) unsigned DEFAULT NULL,
  `motif_end` int(11) unsigned DEFAULT NULL,
  `motif_score_delta` float DEFAULT NULL,
  `in_informative_position` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`motif_feature_variation_id`),
  KEY `variation_feature_idx` (`variation_feature_id`),
  KEY `consequence_type_idx` (`consequence_types`),
  KEY `somatic_feature_idx` (`feature_stable_id`,`somatic`)
Anja Thormann's avatar
Anja Thormann committed
564
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
565 566 567 568 569 570 571 572 573 574 575 576 577 578
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `motif_feature_variation`
--

LOCK TABLES `motif_feature_variation` WRITE;
/*!40000 ALTER TABLE `motif_feature_variation` DISABLE KEYS */;
/*!40000 ALTER TABLE `motif_feature_variation` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `phenotype`
--
579

580 581 582
DROP TABLE IF EXISTS `phenotype`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
583 584 585 586 587 588 589
CREATE TABLE `phenotype` (
  `phenotype_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `stable_id` varchar(255) DEFAULT NULL,
  `name` varchar(50) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`phenotype_id`),
  UNIQUE KEY `desc_idx` (`description`),
590 591 592 593 594 595 596 597 598 599 600 601 602
  KEY `name_idx` (`name`),
  KEY `stable_idx` (`stable_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `phenotype`
--

LOCK TABLES `phenotype` WRITE;
/*!40000 ALTER TABLE `phenotype` DISABLE KEYS */;
/*!40000 ALTER TABLE `phenotype` ENABLE KEYS */;
UNLOCK TABLES;
603

604 605 606 607 608 609 610
--
-- Table structure for table `phenotype_feature`
--

DROP TABLE IF EXISTS `phenotype_feature`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628
CREATE TABLE `phenotype_feature` (
  `phenotype_feature_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `phenotype_id` int(11) unsigned DEFAULT NULL,
  `source_id` int(11) unsigned DEFAULT NULL,
  `study_id` int(11) unsigned DEFAULT NULL,
  `type` enum('Gene','Variation','StructuralVariation','SupportingStructuralVariation','QTL','RegulatoryFeature') DEFAULT NULL,
  `object_id` varchar(255) DEFAULT NULL,
  `is_significant` tinyint(1) unsigned DEFAULT '1',
  `seq_region_id` int(11) unsigned DEFAULT NULL,
  `seq_region_start` int(11) unsigned DEFAULT NULL,
  `seq_region_end` int(11) unsigned DEFAULT NULL,
  `seq_region_strand` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`phenotype_feature_id`),
  KEY `phenotype_idx` (`phenotype_id`),
  KEY `object_idx` (`object_id`,`type`),
  KEY `type_idx` (`type`),
  KEY `pos_idx` (`seq_region_id`,`seq_region_start`,`seq_region_end`),
  KEY `source_idx` (`source_id`)
629 630 631 632 633 634
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `phenotype_feature`
--
635

636 637 638 639 640 641 642 643 644 645 646 647
LOCK TABLES `phenotype_feature` WRITE;
/*!40000 ALTER TABLE `phenotype_feature` DISABLE KEYS */;
/*!40000 ALTER TABLE `phenotype_feature` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `phenotype_feature_attrib`
--

DROP TABLE IF EXISTS `phenotype_feature_attrib`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
648 649 650 651 652 653
CREATE TABLE `phenotype_feature_attrib` (
  `phenotype_feature_id` int(11) unsigned NOT NULL,
  `attrib_type_id` int(11) DEFAULT NULL,
  `value` varchar(255) DEFAULT NULL,
  KEY `phenotype_feature_idx` (`phenotype_feature_id`),
  KEY `type_value_idx` (`attrib_type_id`,`value`)
Anja Thormann's avatar
Anja Thormann committed
654
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
655 656 657 658 659
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `phenotype_feature_attrib`
--
660

661 662 663 664 665 666 667 668 669 670 671 672
LOCK TABLES `phenotype_feature_attrib` WRITE;
/*!40000 ALTER TABLE `phenotype_feature_attrib` DISABLE KEYS */;
/*!40000 ALTER TABLE `phenotype_feature_attrib` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `phenotype_ontology_accession`
--

DROP TABLE IF EXISTS `phenotype_ontology_accession`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
Alessandro Vullo's avatar
Alessandro Vullo committed
673 674 675
CREATE TABLE `phenotype_ontology_accession` (
  `phenotype_id` int(11) unsigned NOT NULL,
  `accession` varchar(255) NOT NULL,
676
  `linked_by_attrib` set('437','438','439','440','441','442','443','444') DEFAULT NULL,
Alessandro Vullo's avatar
Alessandro Vullo committed
677 678
  PRIMARY KEY (`phenotype_id`,`accession`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
679 680 681 682 683
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `phenotype_ontology_accession`
--
Alessandro Vullo's avatar
Alessandro Vullo committed
684

685 686 687 688 689 690 691 692 693 694 695 696
LOCK TABLES `phenotype_ontology_accession` WRITE;
/*!40000 ALTER TABLE `phenotype_ontology_accession` DISABLE KEYS */;
/*!40000 ALTER TABLE `phenotype_ontology_accession` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `population`
--

DROP TABLE IF EXISTS `population`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
697 698 699 700 701 702 703 704 705 706 707
CREATE TABLE `population` (
  `population_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `size` int(10) DEFAULT NULL,
  `description` text,
  `collection` tinyint(1) DEFAULT '0',
  `freqs_from_gts` tinyint(1) DEFAULT NULL,
  `display` enum('LD','MARTDISPLAYABLE','UNDISPLAYABLE') DEFAULT 'UNDISPLAYABLE',
  `display_group_id` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`population_id`),
  KEY `name_idx` (`name`)
708 709 710 711 712 713
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `population`
--
714

715 716 717 718 719 720 721 722 723 724 725 726
LOCK TABLES `population` WRITE;
/*!40000 ALTER TABLE `population` DISABLE KEYS */;
/*!40000 ALTER TABLE `population` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `population_genotype`
--

DROP TABLE IF EXISTS `population_genotype`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
727 728 729 730 731 732 733 734 735 736 737 738
CREATE TABLE `population_genotype` (
  `population_genotype_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `variation_id` int(11) unsigned NOT NULL,
  `subsnp_id` int(11) unsigned DEFAULT NULL,
  `genotype_code_id` int(11) DEFAULT NULL,
  `frequency` float DEFAULT NULL,
  `population_id` int(10) unsigned DEFAULT NULL,
  `count` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`population_genotype_id`),
  KEY `population_idx` (`population_id`),
  KEY `variation_idx` (`variation_id`),
  KEY `subsnp_idx` (`subsnp_id`)
Anja Thormann's avatar
Anja Thormann committed
739
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
740 741 742 743 744
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `population_genotype`
--
745

746 747 748 749 750 751 752 753 754 755 756 757
LOCK TABLES `population_genotype` WRITE;
/*!40000 ALTER TABLE `population_genotype` DISABLE KEYS */;
/*!40000 ALTER TABLE `population_genotype` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `population_structure`
--

DROP TABLE IF EXISTS `population_structure`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
758 759 760 761 762
CREATE TABLE `population_structure` (
  `super_population_id` int(10) unsigned NOT NULL,
  `sub_population_id` int(10) unsigned NOT NULL,
  UNIQUE KEY `super_population_idx` (`super_population_id`,`sub_population_id`),
  KEY `sub_population_idx` (`sub_population_id`)
Anja Thormann's avatar
Anja Thormann committed
763
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
764 765 766 767 768 769 770 771 772 773
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `population_structure`
--

LOCK TABLES `population_structure` WRITE;
/*!40000 ALTER TABLE `population_structure` DISABLE KEYS */;
/*!40000 ALTER TABLE `population_structure` ENABLE KEYS */;
UNLOCK TABLES;
774

775 776 777 778 779 780 781
--
-- Table structure for table `population_synonym`
--

DROP TABLE IF EXISTS `population_synonym`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
782 783 784 785 786 787 788 789
CREATE TABLE `population_synonym` (
  `synonym_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `population_id` int(10) unsigned NOT NULL,
  `source_id` int(10) unsigned NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`synonym_id`),
  KEY `population_idx` (`population_id`),
  KEY `name` (`name`,`source_id`)
Anja Thormann's avatar
Anja Thormann committed
790
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
791 792 793 794 795 796 797 798 799 800
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `population_synonym`
--

LOCK TABLES `population_synonym` WRITE;
/*!40000 ALTER TABLE `population_synonym` DISABLE KEYS */;
/*!40000 ALTER TABLE `population_synonym` ENABLE KEYS */;
UNLOCK TABLES;
801

802 803 804 805 806 807 808
--
-- Table structure for table `protein_function_predictions`
--

DROP TABLE IF EXISTS `protein_function_predictions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
809 810 811 812 813
CREATE TABLE `protein_function_predictions` (
  `translation_md5_id` int(11) unsigned NOT NULL,
  `analysis_attrib_id` int(11) unsigned NOT NULL,
  `prediction_matrix` mediumblob,
  PRIMARY KEY (`translation_md5_id`,`analysis_attrib_id`)
Anja Thormann's avatar
Anja Thormann committed
814
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
815 816 817 818 819 820 821 822 823 824 825 826 827 828
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `protein_function_predictions`
--

LOCK TABLES `protein_function_predictions` WRITE;
/*!40000 ALTER TABLE `protein_function_predictions` DISABLE KEYS */;
/*!40000 ALTER TABLE `protein_function_predictions` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `protein_function_predictions_attrib`
--
829

830 831 832
DROP TABLE IF EXISTS `protein_function_predictions_attrib`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
833 834 835 836 837 838
CREATE TABLE `protein_function_predictions_attrib` (
  `translation_md5_id` int(11) unsigned NOT NULL,
  `analysis_attrib_id` int(11) unsigned NOT NULL,
  `attrib_type_id` int(11) unsigned NOT NULL,
  `position_values` blob,
  PRIMARY KEY (`translation_md5_id`,`analysis_attrib_id`,`attrib_type_id`)
Anja Thormann's avatar
Anja Thormann committed
839
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
840 841 842 843 844 845 846 847 848 849 850 851 852 853
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `protein_function_predictions_attrib`
--

LOCK TABLES `protein_function_predictions_attrib` WRITE;
/*!40000 ALTER TABLE `protein_function_predictions_attrib` DISABLE KEYS */;
/*!40000 ALTER TABLE `protein_function_predictions_attrib` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `publication`
--
854

855 856 857
DROP TABLE IF EXISTS `publication`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
858 859 860 861 862 863 864 865 866 867 868 869
CREATE TABLE `publication` (
  `publication_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) DEFAULT NULL,
  `authors` varchar(255) DEFAULT NULL,
  `pmid` int(10) DEFAULT NULL,
  `pmcid` varchar(255) DEFAULT NULL,
  `year` int(10) unsigned DEFAULT NULL,
  `doi` varchar(50) DEFAULT NULL,
  `ucsc_id` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`publication_id`),
  KEY `pmid_idx` (`pmid`),
  KEY `doi_idx` (`doi`)
Anja Thormann's avatar
Anja Thormann committed
870
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
871
/*!40101 SET character_set_client = @saved_cs_client */;
872

873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888
--
-- Dumping data for table `publication`
--

LOCK TABLES `publication` WRITE;
/*!40000 ALTER TABLE `publication` DISABLE KEYS */;
/*!40000 ALTER TABLE `publication` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `read_coverage`
--

DROP TABLE IF EXISTS `read_coverage`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
889 890 891 892 893 894
CREATE TABLE `read_coverage` (
  `seq_region_id` int(10) unsigned NOT NULL,
  `seq_region_start` int(11) NOT NULL,
  `seq_region_end` int(11) NOT NULL,
  `level` tinyint(4) NOT NULL,
  `sample_id` int(10) unsigned NOT NULL,
895 896
  KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`),
  KEY `sample_idx` (`sample_id`)
Anja Thormann's avatar
Anja Thormann committed
897
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
898 899 900 901 902 903 904 905 906 907
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `read_coverage`
--

LOCK TABLES `read_coverage` WRITE;
/*!40000 ALTER TABLE `read_coverage` DISABLE KEYS */;
/*!40000 ALTER TABLE `read_coverage` ENABLE KEYS */;
UNLOCK TABLES;
908

909 910 911 912 913 914 915
--
-- Table structure for table `regulatory_feature_variation`
--

DROP TABLE IF EXISTS `regulatory_feature_variation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
916 917 918 919 920 921 922
CREATE TABLE `regulatory_feature_variation` (
  `regulatory_feature_variation_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `variation_feature_id` int(11) unsigned NOT NULL,
  `feature_stable_id` varchar(128) DEFAULT NULL,
  `feature_type` text,
  `allele_string` text,
  `somatic` tinyint(1) NOT NULL DEFAULT '0',
923
  `consequence_types` set('regulatory_region_variant','regulatory_region_ablation','regulatory_region_fusion','regulatory_region_amplification','regulatory_region_translocation') DEFAULT NULL,
924 925 926 927
  PRIMARY KEY (`regulatory_feature_variation_id`),
  KEY `variation_feature_idx` (`variation_feature_id`),
  KEY `consequence_type_idx` (`consequence_types`),
  KEY `somatic_feature_idx` (`feature_stable_id`,`somatic`)
Anja Thormann's avatar
Anja Thormann committed
928
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
929 930 931 932 933 934 935 936 937 938 939 940 941 942
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `regulatory_feature_variation`
--

LOCK TABLES `regulatory_feature_variation` WRITE;
/*!40000 ALTER TABLE `regulatory_feature_variation` DISABLE KEYS */;
/*!40000 ALTER TABLE `regulatory_feature_variation` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `sample`
--
943

944 945 946
DROP TABLE IF EXISTS `sample`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
947 948 949 950 951 952 953 954 955 956
CREATE TABLE `sample` (
  `sample_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `individual_id` int(10) unsigned NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text,
  `study_id` int(10) unsigned DEFAULT NULL,
  `display` enum('REFERENCE','DEFAULT','DISPLAYABLE','UNDISPLAYABLE','LD','MARTDISPLAYABLE') DEFAULT 'UNDISPLAYABLE',
  `has_coverage` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `variation_set_id` set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64') DEFAULT NULL,
  PRIMARY KEY (`sample_id`),
957 958
  KEY `individual_idx` (`individual_id`),
  KEY `study_idx` (`study_id`)
Anja Thormann's avatar
Anja Thormann committed
959
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
960 961 962 963 964 965 966 967 968 969
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `sample`
--

LOCK TABLES `sample` WRITE;
/*!40000 ALTER TABLE `sample` DISABLE KEYS */;
/*!40000 ALTER TABLE `sample` ENABLE KEYS */;
UNLOCK TABLES;
970

971 972 973 974 975 976 977
--
-- Table structure for table `sample_genotype_multiple_bp`
--

DROP TABLE IF EXISTS `sample_genotype_multiple_bp`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
978 979 980
CREATE TABLE `sample_genotype_multiple_bp` (
  `variation_id` int(10) unsigned NOT NULL,
  `subsnp_id` int(15) unsigned DEFAULT NULL,
981 982
  `allele_1` varchar(25000) DEFAULT NULL,
  `allele_2` varchar(25000) DEFAULT NULL,
983 984 985 986
  `sample_id` int(10) unsigned DEFAULT NULL,
  KEY `variation_idx` (`variation_id`),
  KEY `subsnp_idx` (`subsnp_id`),
  KEY `sample_idx` (`sample_id`)
Anja Thormann's avatar
Anja Thormann committed
987
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
988 989 990 991 992 993 994 995 996 997 998 999 1000 1001
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `sample_genotype_multiple_bp`
--

LOCK TABLES `sample_genotype_multiple_bp` WRITE;
/*!40000 ALTER TABLE `sample_genotype_multiple_bp` DISABLE KEYS */;
/*!40000 ALTER TABLE `sample_genotype_multiple_bp` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `sample_population`
--
1002

1003 1004 1005
DROP TABLE IF EXISTS `sample_population`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
1006 1007 1008
CREATE TABLE `sample_population` (
  `sample_id` int(10) unsigned NOT NULL,
  `population_id` int(10) unsigned NOT NULL,
1009 1010
  KEY `sample_idx` (`sample_id`),
  KEY `population_idx` (`population_id`)
Anja Thormann's avatar
Anja Thormann committed
1011
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `sample_population`
--

LOCK TABLES `sample_population` WRITE;
/*!40000 ALTER TABLE `sample_population` DISABLE KEYS */;
/*!40000 ALTER TABLE `sample_population` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `sample_synonym`
--
1026

1027 1028 1029
DROP TABLE IF EXISTS `sample_synonym`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
Magali Ruffier's avatar
Magali Ruffier committed
1030 1031 1032 1033 1034 1035 1036 1037 1038
CREATE TABLE `sample_synonym` (
  `synonym_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `sample_id` int(10) unsigned NOT NULL,
  `source_id` int(10) unsigned NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`synonym_id`),
  KEY `sample_idx` (`sample_id`),
  KEY `name` (`name`,`source_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `sample_synonym`
--

LOCK TABLES `sample_synonym` WRITE;
/*!40000 ALTER TABLE `sample_synonym` DISABLE KEYS */;
/*!40000 ALTER TABLE `sample_synonym` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `seq_region`
--
Magali Ruffier's avatar
Magali Ruffier committed
1053

1054 1055 1056
DROP TABLE IF EXISTS `seq_region`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
1057 1058 1059 1060 1061 1062 1063
CREATE TABLE `seq_region` (
  `seq_region_id` int(10) unsigned NOT NULL,
  `name` varchar(40) NOT NULL,
  `coord_system_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`seq_region_id`),
  UNIQUE KEY `name_cs_idx` (`name`,`coord_system_id`),
  KEY `cs_idx` (`coord_system_id`)
Anja Thormann's avatar
Anja Thormann committed
1064
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
1065
/*!40101 SET character_set_client = @saved_cs_client */;
1066

1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082
--
-- Dumping data for table `seq_region`
--

LOCK TABLES `seq_region` WRITE;
/*!40000 ALTER TABLE `seq_region` DISABLE KEYS */;
/*!40000 ALTER TABLE `seq_region` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `source`
--

DROP TABLE IF EXISTS `source`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
1083 1084 1085 1086
CREATE TABLE `source` (
  `source_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(24) NOT NULL,
  `version` int(11) DEFAULT NULL,
Alessandro Vullo's avatar
Alessandro Vullo committed
1087
  `description` varchar(400) DEFAULT NULL,
1088 1089 1090 1091 1092
  `url` varchar(255) DEFAULT NULL,
  `type` enum('chip','lsdb') DEFAULT NULL,
  `somatic_status` enum('germline','somatic','mixed') DEFAULT 'germline',
  `data_types` set('variation','variation_synonym','structural_variation','phenotype_feature','study') DEFAULT NULL,
  PRIMARY KEY (`source_id`)
1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `source`
--

LOCK TABLES `source` WRITE;
/*!40000 ALTER TABLE `source` DISABLE KEYS */;
/*!40000 ALTER TABLE `source` ENABLE KEYS */;
UNLOCK TABLES;
1104

1105 1106 1107 1108 1109 1110 1111
--
-- Table structure for table `strain_gtype_poly`
--

DROP TABLE IF EXISTS `strain_gtype_poly`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
1112 1113 1114 1115
CREATE TABLE `strain_gtype_poly` (
  `variation_id` int(10) unsigned NOT NULL,
  `sample_name` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`variation_id`)
Anja Thormann's avatar
Anja Thormann committed
1116
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `strain_gtype_poly`
--

LOCK TABLES `strain_gtype_poly` WRITE;
/*!40000 ALTER TABLE `strain_gtype_poly` DISABLE KEYS */;
/*!40000 ALTER TABLE `strain_gtype_poly` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `structural_variation`
--
1131

1132 1133 1134
DROP TABLE IF EXISTS `structural_variation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151
CREATE TABLE `structural_variation` (
  `structural_variation_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `variation_name` varchar(255) DEFAULT NULL,
  `alias` varchar(255) DEFAULT NULL,
  `source_id` int(10) unsigned NOT NULL,
  `study_id` int(10) unsigned DEFAULT NULL,
  `class_attrib_id` int(10) unsigned NOT NULL DEFAULT '0',
  `clinical_significance` set('uncertain significance','not provided','benign','likely benign','likely pathogenic','pathogenic','drug response','histocompatibility','other','confers sensitivity','risk factor','association','protective') DEFAULT NULL,
  `validation_status` enum('validated','not validated','high quality') DEFAULT NULL,
  `is_evidence` tinyint(4) DEFAULT '0',
  `somatic` tinyint(1) NOT NULL DEFAULT '0',
  `copy_number` tinyint(2) DEFAULT NULL,
  PRIMARY KEY (`structural_variation_id`),
  UNIQUE KEY `variation_name` (`variation_name`),
  KEY `source_idx` (`source_id`),
  KEY `study_idx` (`study_id`),
  KEY `attrib_idx` (`class_attrib_id`)
1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `structural_variation`
--

LOCK TABLES `structural_variation` WRITE;
/*!40000 ALTER TABLE `structural_variation` DISABLE KEYS */;
/*!40000 ALTER TABLE `structural_variation` ENABLE KEYS */;
UNLOCK TABLES;
1163

1164 1165 1166 1167 1168 1169 1170
--
-- Table structure for table `structural_variation_association`
--

DROP TABLE IF EXISTS `structural_variation_association`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
1171 1172 1173 1174 1175 1176
CREATE TABLE `structural_variation_association` (
  `structural_variation_id` int(10) unsigned NOT NULL,
  `supporting_structural_variation_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`structural_variation_id`,`supporting_structural_variation_id`),
  KEY `structural_variation_idx` (`structural_variation_id`),
  KEY `supporting_structural_variation_idx` (`supporting_structural_variation_id`)
Anja Thormann's avatar
Anja Thormann committed
1177
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `structural_variation_association`
--

LOCK TABLES `structural_variation_association` WRITE;
/*!40000 ALTER TABLE `structural_variation_association` DISABLE KEYS */;
/*!40000 ALTER TABLE `structural_variation_association` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `structural_variation_feature`
--
1192

1193 1194 1195
DROP TABLE IF EXISTS `structural_variation_feature`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223
CREATE TABLE `structural_variation_feature` (
  `structural_variation_feature_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `seq_region_id` int(10) unsigned NOT NULL,
  `outer_start` int(11) DEFAULT NULL,
  `seq_region_start` int(11) NOT NULL,
  `inner_start` int(11) DEFAULT NULL,
  `inner_end` int(11) DEFAULT NULL,
  `seq_region_end` int(11) NOT NULL,
  `outer_end` int(11) DEFAULT NULL,
  `seq_region_strand` tinyint(4) NOT NULL,
  `structural_variation_id` int(10) unsigned NOT NULL,
  `variation_name` varchar(255) DEFAULT NULL,
  `source_id` int(10) unsigned NOT NULL,
  `study_id` int(10) unsigned DEFAULT NULL,
  `class_attrib_id` int(10) unsigned NOT NULL DEFAULT '0',
  `allele_string` longtext,
  `is_evidence` tinyint(1) NOT NULL DEFAULT '0',
  `somatic` tinyint(1) NOT NULL DEFAULT '0',
  `breakpoint_order` tinyint(4) DEFAULT NULL,
  `length` int(10) DEFAULT NULL,
  `variation_set_id` set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64') NOT NULL DEFAULT '',
  PRIMARY KEY (`structural_variation_feature_id`),
  KEY `pos_idx` (`seq_region_id`,`seq_region_start`,`seq_region_end`),
  KEY `structural_variation_idx` (`structural_variation_id`),
  KEY `source_idx` (`source_id`),
  KEY `study_idx` (`study_id`),
  KEY `attrib_idx` (`class_attrib_id`),
  KEY `variation_set_idx` (`variation_set_id`)
1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `structural_variation_feature`
--

LOCK TABLES `structural_variation_feature` WRITE;
/*!40000 ALTER TABLE `structural_variation_feature` DISABLE KEYS */;
/*!40000 ALTER TABLE `structural_variation_feature` ENABLE KEYS */;
UNLOCK TABLES;
1235

1236 1237 1238 1239 1240 1241 1242
--
-- Table structure for table `structural_variation_sample`
--

DROP TABLE IF EXISTS `structural_variation_sample`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
1243 1244 1245 1246 1247 1248 1249
CREATE TABLE `structural_variation_sample` (
  `structural_variation_sample_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `structural_variation_id` int(10) unsigned NOT NULL,
  `sample_id` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`structural_variation_sample_id`),
  KEY `structural_variation_idx` (`structural_variation_id`),
  KEY `sample_idx` (`sample_id`)
Anja Thormann's avatar
Anja Thormann committed
1250
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `structural_variation_sample`
--

LOCK TABLES `structural_variation_sample` WRITE;
/*!40000 ALTER TABLE `structural_variation_sample` DISABLE KEYS */;
/*!40000 ALTER TABLE `structural_variation_sample` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `study`
--
1265

1266 1267 1268
DROP TABLE IF EXISTS `study`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
1269 1270 1271 1272 1273 1274 1275 1276 1277 1278
CREATE TABLE `study` (
  `study_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `source_id` int(10) unsigned NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text,
  `url` varchar(255) DEFAULT NULL,
  `external_reference` varchar(255) DEFAULT NULL,
  `study_type` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`study_id`),
  KEY `source_idx` (`source_id`)
1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `study`
--

LOCK TABLES `study` WRITE;
/*!40000 ALTER TABLE `study` DISABLE KEYS */;
/*!40000 ALTER TABLE `study` ENABLE KEYS */;
UNLOCK TABLES;
1290

1291 1292 1293 1294 1295 1296 1297
--
-- Table structure for table `submitter_handle`
--

DROP TABLE IF EXISTS `submitter_handle`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
1298 1299 1300 1301 1302
CREATE TABLE `submitter_handle` (
  `handle_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `handle` varchar(25) DEFAULT NULL,
  PRIMARY KEY (`handle_id`),
  UNIQUE KEY `handle` (`handle`)
1303 1304 1305 1306 1307 1308
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `submitter_handle`
--
1309