-- phpMyAdmin SQL Dump
-- version 4.0.10.20
-- https://www.phpmyadmin.net
--
-- Machine: psbsql01
-- Genereertijd: 25 jun 2018 om 14:16
-- Serverversie: 5.7.17
-- PHP-versie: 5.3.3

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `ad_anchorpoints`
--

CREATE TABLE IF NOT EXISTS `ad_anchorpoints` (
  `anchorpoint_id` int(11) NOT NULL DEFAULT '0',
  `multiplicon_id` int(11) NOT NULL DEFAULT '0',
  `basecluster` int(11) DEFAULT NULL,
  `species_x` varchar(21) NOT NULL,
  `gene_x` varchar(50) NOT NULL DEFAULT '',
  `species_y` varchar(21) NOT NULL,
  `gene_y` varchar(50) NOT NULL DEFAULT '',
  `coord_x` int(11) NOT NULL DEFAULT '0',
  `coord_y` int(11) NOT NULL DEFAULT '0',
  `is_real_anchorpoint` int(11) DEFAULT NULL,
  `exp_id` smallint(6) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`anchorpoint_id`,`exp_id`),
  KEY `ad_anchorpoints_ibfk_1` (`multiplicon_id`),
  KEY `ad_anchorpoints_ibfk_2` (`gene_x`),
  KEY `ad_anchorpoints_ibfk_3` (`gene_y`),
  KEY `ad_anchorpoints_ibfk_4` (`exp_id`),
  KEY `ad_anchorpoints_ibfk_5` (`species_x`),
  KEY `ad_anchorpoints_ibfk_6` (`species_y`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `ad_dated_anchorpoints`
--

CREATE TABLE IF NOT EXISTS `ad_dated_anchorpoints` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `multiplicon_id` int(6) NOT NULL DEFAULT '0',
  `segment_y` int(6) NOT NULL DEFAULT '0',
  `segment_x` int(6) NOT NULL DEFAULT '0',
  `species_y` varchar(21) NOT NULL,
  `gene_y` varchar(50) NOT NULL DEFAULT '',
  `species_x` varchar(21) NOT NULL,
  `gene_x` varchar(50) NOT NULL DEFAULT '',
  `Ks` float DEFAULT NULL,
  `is_Ks_outlier` tinyint(2) NOT NULL DEFAULT '0',
  `Kn` float DEFAULT NULL,
  `4dtv` float DEFAULT NULL,
  `is_4dtv_outlier` char(2) NOT NULL DEFAULT '',
  `exp_id` smallint(6) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`,`exp_id`),
  KEY `ad_dated_anchorpoints_ibfk_1` (`multiplicon_id`),
  KEY `ad_dated_anchorpoints_ibfk_2` (`gene_x`),
  KEY `ad_dated_anchorpoints_ibfk_3` (`gene_y`),
  KEY `ad_dated_anchorpoints_ibfk_4` (`exp_id`),
  KEY `ad_dated_anchorpoints_ibfk_5` (`species_x`),
  KEY `ad_dated_anchorpoints_ibfk_6` (`species_y`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `ad_dated_multiplicons`
--

CREATE TABLE IF NOT EXISTS `ad_dated_multiplicons` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `multiplicon_id` int(11) NOT NULL DEFAULT '0',
  `segment_y` int(11) NOT NULL DEFAULT '0',
  `segment_x` int(11) NOT NULL DEFAULT '0',
  `mean_ks` float DEFAULT NULL,
  `std_dev_ks` float DEFAULT NULL,
  `total_aps` int(11) NOT NULL DEFAULT '0',
  `dateable_ks` int(11) NOT NULL DEFAULT '0',
  `excluded_ks` int(11) NOT NULL DEFAULT '0',
  `mean_4dtv` float DEFAULT NULL,
  `std_dev_4dtv` float DEFAULT NULL,
  `dateable_4dtv` int(11) NOT NULL DEFAULT '0',
  `excluded_4dtv` int(11) NOT NULL DEFAULT '0',
  `exp_id` smallint(6) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`,`exp_id`),
  KEY `ad_dated_multiplicons_ibfk_1` (`exp_id`),
  KEY `ad_dated_multiplicons_ibfk_2` (`multiplicon_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `ad_duplication_types`
--

CREATE TABLE IF NOT EXISTS `ad_duplication_types` (
  `species` varchar(21) NOT NULL,
  `gene_id` varchar(50) NOT NULL,
  `is_block` tinyint(1) NOT NULL DEFAULT '0',
  `is_syntenic` tinyint(1) NOT NULL,
  `is_tandem` tinyint(1) NOT NULL DEFAULT '0',
  `tandem_representative` varchar(50) DEFAULT NULL,
  `exp_id` smallint(6) NOT NULL,
  PRIMARY KEY (`gene_id`,`exp_id`),
  KEY `ad_duplication_types_ibfk_1` (`exp_id`),
  KEY `ad_duplication_types_ibfk_2` (`species`),
  KEY `is_block` (`is_block`),
  KEY `is_tandem` (`is_tandem`),
  KEY `tandem_representative` (`tandem_representative`),
  KEY `is_syntenic` (`is_syntenic`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `ad_experiments`
--

CREATE TABLE IF NOT EXISTS `ad_experiments` (
  `exp_id` smallint(6) unsigned NOT NULL DEFAULT '0',
  `description` varchar(255) NOT NULL DEFAULT '',
  `description_advanced` text,
  `organisms` varchar(255) NOT NULL DEFAULT '',
  `to_show` enum('true','false') NOT NULL DEFAULT 'false',
  PRIMARY KEY (`exp_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `ad_genes`
--

CREATE TABLE IF NOT EXISTS `ad_genes` (
  `gene_id` varchar(50) NOT NULL DEFAULT '',
  `species` varchar(21) NOT NULL,
  `chr` varchar(100) NOT NULL DEFAULT '',
  `coordinate` int(11) NOT NULL DEFAULT '0',
  `orientation` char(1) NOT NULL DEFAULT '+',
  `remapped_coordinate` int(11) NOT NULL DEFAULT '0',
  `is_tandem` int(11) NOT NULL DEFAULT '0',
  `is_tandem_representative` int(11) NOT NULL DEFAULT '0',
  `tandem_representative` varchar(50) DEFAULT NULL,
  `remapped` int(11) NOT NULL DEFAULT '0',
  `exp_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`gene_id`,`exp_id`),
  KEY `ad_genes_ibfk_2` (`exp_id`),
  KEY `ad_genes_ibfk_3` (`species`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `ad_list_elements`
--

CREATE TABLE IF NOT EXISTS `ad_list_elements` (
  `element_id` int(11) NOT NULL DEFAULT '0',
  `segment_id` int(11) NOT NULL DEFAULT '0',
  `species` varchar(21) NOT NULL,
  `gene_id` varchar(50) NOT NULL DEFAULT '',
  `position` int(11) NOT NULL DEFAULT '0',
  `orientation` char(1) NOT NULL DEFAULT '+',
  `exp_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`element_id`,`exp_id`),
  KEY `ad_list_elements_ibfk_1` (`gene_id`),
  KEY `ad_list_elements_ibfk_2` (`segment_id`),
  KEY `ad_list_elements_ibfk_3` (`exp_id`),
  KEY `ad_list_elements_ibfk_4` (`species`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `ad_multiplicons`
--

CREATE TABLE IF NOT EXISTS `ad_multiplicons` (
  `multiplicon_id` int(11) NOT NULL DEFAULT '0',
  `species_x` varchar(21) NOT NULL,
  `list_x` varchar(100) NOT NULL DEFAULT '',
  `parent` int(11) NOT NULL DEFAULT '0',
  `species_y` varchar(21) NOT NULL,
  `list_y` varchar(100) NOT NULL DEFAULT '',
  `level` int(11) NOT NULL DEFAULT '0',
  `number_of_anchorpoints` int(11) NOT NULL DEFAULT '0',
  `profile_length` int(11) NOT NULL DEFAULT '0',
  `begin_x` int(11) NOT NULL DEFAULT '0',
  `end_x` int(11) NOT NULL DEFAULT '0',
  `begin_y` int(11) NOT NULL DEFAULT '0',
  `end_y` int(11) NOT NULL DEFAULT '0',
  `is_redundant` int(11) NOT NULL DEFAULT '0',
  `exp_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`multiplicon_id`,`exp_id`),
  KEY `ad_multiplicons_ibfk_1` (`exp_id`),
  KEY `species_x` (`species_x`),
  KEY `species_y` (`species_y`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `ad_multiplicon_parents`
--

CREATE TABLE IF NOT EXISTS `ad_multiplicon_parents` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `child_multiplicon_id` int(11) NOT NULL,
  `parent_multiplicon_id` int(11) NOT NULL,
  `exp_id` smallint(5) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `child_index` (`child_multiplicon_id`),
  KEY `parent_index` (`parent_multiplicon_id`),
  KEY `exp_index` (`exp_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `ad_profiles`
--

CREATE TABLE IF NOT EXISTS `ad_profiles` (
  `multiplicon_id` int(11) NOT NULL,
  `num_segments` int(11) NOT NULL DEFAULT '0',
  `num_species` int(11) NOT NULL DEFAULT '0',
  `exp_id` smallint(6) unsigned NOT NULL DEFAULT '0',
  KEY `multiplicon_id` (`multiplicon_id`),
  KEY `exp_id` (`exp_id`),
  KEY `size` (`num_segments`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `ad_redundant`
--

CREATE TABLE IF NOT EXISTS `ad_redundant` (
  `multiplicon_id` int(11) NOT NULL,
  `parent_id` int(11) NOT NULL,
  `exp_id` int(11) NOT NULL,
  PRIMARY KEY (`multiplicon_id`,`parent_id`,`exp_id`),
  KEY `redundant_id` (`multiplicon_id`),
  KEY `parent_id` (`parent_id`),
  KEY `exp_id` (`exp_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Tabelstructuur voor tabel `ad_redundant`
--


-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `ad_segments`
--

CREATE TABLE IF NOT EXISTS `ad_segments` (
  `segment_id` int(11) NOT NULL DEFAULT '0',
  `multiplicon_id` int(11) NOT NULL DEFAULT '0',
  `species` varchar(21) NOT NULL,
  `list` varchar(100) NOT NULL DEFAULT '',
  `first` varchar(50) NOT NULL DEFAULT '',
  `last` varchar(50) NOT NULL DEFAULT '',
  `order` int(11) NOT NULL DEFAULT '0',
  `exp_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`segment_id`,`exp_id`),
  KEY `ad_segments_ibfk_1` (`multiplicon_id`),
  KEY `ad_segments_ibfk_2` (`first`),
  KEY `ad_segments_ibfk_3` (`last`),
  KEY `ad_segments_ibfk_4` (`exp_id`),
  KEY `species` (`species`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `ad_segments_orientation`
--

CREATE TABLE IF NOT EXISTS `ad_segments_orientation` (
  `segment_id` int(11) NOT NULL,
  `flip` int(1) NOT NULL,
  `exp_id` smallint(5) NOT NULL,
  KEY `exp_id` (`exp_id`),
  KEY `segment_id` (`segment_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `ad_synteny`
--

CREATE TABLE IF NOT EXISTS `ad_synteny` (
  `species` varchar(21) NOT NULL,
  `cloud` int(11) NOT NULL,
  `gene_x` varchar(50) NOT NULL,
  `gene_y` varchar(50) NOT NULL,
  `coord_x` int(11) NOT NULL,
  `coord_y` int(11) NOT NULL,
  `exp_id` smallint(5) NOT NULL,
  KEY `species` (`species`),
  KEY `gene_x` (`gene_x`),
  KEY `gene_y` (`gene_y`),
  KEY `exp_id` (`exp_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `annotation`
--

CREATE TABLE IF NOT EXISTS `annotation` (
  `gene_id` varchar(50) NOT NULL,
  `species` varchar(21) NOT NULL,
  `transcript` varchar(100) DEFAULT NULL,
  `coord_cds` text,
  `start` int(11) NOT NULL DEFAULT '0',
  `stop` int(11) NOT NULL DEFAULT '0',
  `coord_transcript` text,
  `seq` mediumtext NOT NULL,
  `strand` char(1) NOT NULL,
  `chr` varchar(100) NOT NULL,
  `type` enum('coding','rna','te','pseudo') NOT NULL DEFAULT 'coding',
  `check_transcript` enum('none','ne','eq') NOT NULL DEFAULT 'none',
  `check_protein` enum('none','ne','eq') NOT NULL DEFAULT 'none',
  `transl_table` tinyint(4) NOT NULL DEFAULT '1',
  PRIMARY KEY (`gene_id`),
  KEY `species` (`species`),
  KEY `chr` (`chr`),
  KEY `type` (`type`),
  KEY `check_transcript` (`check_transcript`),
  KEY `check_protein` (`check_protein`),
  KEY `transcript` (`transcript`),
  KEY `type_species_idx` (`type`,`species`),
  KEY `species_type_idx` (`species`,`type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `annotation_all_splice_variants`
--

CREATE TABLE IF NOT EXISTS `annotation_all_splice_variants` (
  `gene_id` varchar(50) NOT NULL,
  `species` varchar(21) NOT NULL,
  `transcript` varchar(100) DEFAULT NULL,
  `coord_cds` text,
  `start` int(11) NOT NULL DEFAULT '0',
  `stop` int(11) NOT NULL DEFAULT '0',
  `coord_transcript` text,
  `seq` mediumtext NOT NULL,
  `strand` char(1) NOT NULL,
  `chr` varchar(100) NOT NULL,
  `type` enum('coding','rna','te','pseudo') NOT NULL DEFAULT 'coding',
  `check_transcript` enum('none','ne','eq') NOT NULL DEFAULT 'none',
  `check_protein` enum('none','ne','eq') NOT NULL DEFAULT 'none',
  KEY `species` (`species`),
  KEY `chr` (`chr`),
  KEY `type` (`type`),
  KEY `gene_id` (`gene_id`),
  KEY `transcript` (`transcript`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `annotation_extra`
--

CREATE TABLE IF NOT EXISTS `annotation_extra` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `species` varchar(21) NOT NULL,
  `gene_id` varchar(50) NOT NULL,
  `value` text NOT NULL,
  `type` varchar(50) NOT NULL,
  `comment` text,
  PRIMARY KEY (`id`),
  KEY `gene` (`gene_id`),
  KEY `species` (`species`),
  KEY `type` (`type`),
  KEY `value_index` (`value`(20)),
  FULLTEXT KEY `value_fulltext` (`value`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `annot_sources`
--

CREATE TABLE IF NOT EXISTS `annot_sources` (
  `source` varchar(255) NOT NULL,
  `url` varchar(250) NOT NULL,
  `species` varchar(21) NOT NULL,
  `common_name` varchar(100) NOT NULL DEFAULT '',
  `eco_type` varchar(100) DEFAULT NULL,
  `description` text NOT NULL,
  `paper` text DEFAULT NULL,
  `pubmed_id` int(11) DEFAULT NULL,
  `tax_id` int(11) NOT NULL DEFAULT '0',
  `mitochondrion` varchar(15) DEFAULT NULL,
  `chloroplast` varchar(15) DEFAULT NULL,
  `disclaimer` text DEFAULT NULL,
  PRIMARY KEY (`species`),
  KEY `common_name` (`common_name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `configuration`
--

CREATE TABLE IF NOT EXISTS `configuration` (
  `method` varchar(100) NOT NULL DEFAULT '',
  `key` varchar(255) NOT NULL DEFAULT '',
  `value` text NOT NULL,
  `comment` text NOT NULL,
  PRIMARY KEY (`method`,`key`,`value`(100),`comment`(500)),
  KEY `method` (`method`),
  KEY `key` (`key`),
  KEY `value` (`value`(50))
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `dna_motifs_cns`
--

CREATE TABLE IF NOT EXISTS `dna_motifs_cns` (
  `experiment_id` mediumint(9) NOT NULL,
  `motif_id` char(20) NOT NULL,
  `gene_id` varchar(50) NOT NULL,
  `species` varchar(21) NOT NULL,
  `chr` varchar(100) NOT NULL,
  `start` int(11) NOT NULL,
  `stop` int(11) NOT NULL,
  `score` double NOT NULL,
  `ortho_genes` mediumtext NOT NULL,
  KEY `experiment_id` (`experiment_id`),
  KEY `motif_id` (`motif_id`),
  KEY `gene_id` (`gene_id`),
  KEY `species` (`species`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `dna_motifs_experiments`
--

CREATE TABLE IF NOT EXISTS `dna_motifs_experiments` (
  `experiment_id` mediumint(9) NOT NULL,
  `species` varchar(21) NOT NULL,
  `type` enum('motif','alignment','pwm') NOT NULL,
  `location` enum('D_1000','I_0','U_1000','U_2000') NOT NULL,
  `orthology_source` varchar(50) NOT NULL,
  PRIMARY KEY (`experiment_id`),
  KEY `species` (`species`),
  KEY `type` (`type`),
  KEY `location` (`location`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `dna_motifs_info`
--

CREATE TABLE IF NOT EXISTS `dna_motifs_info` (
  `motif_id` char(20) NOT NULL,
  `name` varchar(100) NOT NULL,
  `description` text NOT NULL,
  `sequence` text NOT NULL,
  `pubmed_id` varchar(50) NOT NULL,
  PRIMARY KEY (`motif_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `dna_motifs_tfs`
--

CREATE TABLE IF NOT EXISTS `dna_motifs_tfs` (
  `motif_id` char(20) NOT NULL,
  `transcription_factor` varchar(50) NOT NULL,
  `species` varchar(21) NOT NULL,
  KEY `motif_id` (`motif_id`),
  KEY `transcription_factor` (`transcription_factor`),
  KEY `species` (`species`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `functional_clusters`
--

CREATE TABLE IF NOT EXISTS `functional_clusters` (
  `exp_id` tinyint(4) NOT NULL,
  `cluster_id` varchar(30) NOT NULL,
  `species` varchar(21) NOT NULL,
  `chr` varchar(50) NOT NULL,
  `e-value` double NOT NULL,
  `cluster_size` int(4) NOT NULL,
  `num_genes` int(4) NOT NULL,
  `identifier` varchar(20) NOT NULL,
  `start` int(11) NOT NULL,
  `stop` int(11) NOT NULL,
  `comment` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`exp_id`,`cluster_id`),
  KEY `go` (`identifier`),
  KEY `species` (`species`),
  KEY `chr` (`chr`),
  KEY `exp_id` (`exp_id`),
  KEY `cluster_id` (`cluster_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `functional_clusters_data`
--

CREATE TABLE IF NOT EXISTS `functional_clusters_data` (
  `exp_id` tinyint(4) NOT NULL,
  `cluster_id` varchar(30) NOT NULL,
  `gene_id` varchar(50) NOT NULL,
  `comment` varchar(50) DEFAULT NULL,
  KEY `cluster_id` (`cluster_id`),
  KEY `gene_id` (`gene_id`),
  KEY `exp_id` (`exp_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `functional_clusters_experiments`
--

CREATE TABLE IF NOT EXISTS `functional_clusters_experiments` (
  `exp_id` tinyint(4) NOT NULL,
  `data_type` enum('GO','InterPro','MapMan') NOT NULL,
  `extra` varchar(30) DEFAULT NULL,
  `min_genes_cluster` mediumint(9) DEFAULT NULL,
  `max_genes_cluster` mediumint(9) DEFAULT NULL,
  `max_cluster_size` mediumint(9) DEFAULT NULL,
  `e-value` double DEFAULT NULL,
  `cluster_overlap` mediumint(9) DEFAULT NULL,
  `has_tandems` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`exp_id`),
  KEY `type` (`data_type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `functional_data`
--

CREATE TABLE IF NOT EXISTS `functional_data` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` enum('go','interpro','signalp','mapman') NOT NULL,
  `name` varchar(50) NOT NULL,
  `desc` varchar(255) NOT NULL DEFAULT '',
  `info` varchar(50) NOT NULL,
  `num_sptr_steps` mediumint(9) NOT NULL DEFAULT '0',
  `num_parents` mediumint(9) NOT NULL DEFAULT '0',
  `alt_ids` varchar(255) DEFAULT NULL,
  `is_obsolete` tinyint(1) NOT NULL,
  `replacement` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `go` (`name`),
  KEY `type` (`info`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `functional_data_extra`
--

CREATE TABLE IF NOT EXISTS `functional_data_extra` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` enum('go','interpro','mapman') NOT NULL DEFAULT 'interpro',
  `name` varchar(50) NOT NULL,
  `key` enum('abstract','contains','associated_go','found_in','description') NOT NULL,
  `value` mediumtext NOT NULL,
  PRIMARY KEY (`id`),
  KEY `name` (`name`,`key`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `functional_parents`
--

CREATE TABLE IF NOT EXISTS `functional_parents` (
  `child` varchar(50) NOT NULL,
  `parent` varchar(50) NOT NULL,
  `type` enum('go','interpro','signalp','mapman') NOT NULL COMMENT 'matches type from functional_data. ',
  `relationship` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`child`,`parent`,`type`),
  KEY `child` (`child`),
  KEY `parent` (`parent`),
  KEY `functional type` (`type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


-- --------------------------------------------------------

--
-- Table structure for table `gene_families`
--

CREATE TABLE IF NOT EXISTS `gene_families` (
  `gf_id` varchar(50) NOT NULL DEFAULT '',
  `gf_type` varchar(10) NOT NULL COMMENT 'links to gene_family_types id',
  `is_valid` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Indicates whether or not the gene family is valid.',
  `is_redundant` tinyint(1) NOT NULL DEFAULT '0',
  `info` text,
  PRIMARY KEY (`gf_id`),
  KEY `gf_type` (`gf_type`),
  KEY `is_valid` (`is_valid`),
  KEY `is_redundant` (`is_redundant`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `gene_family_subfamilies`
--

CREATE TABLE IF NOT EXISTS `gene_family_subfamilies` (
  `parent_gf_id` varchar(50) NOT NULL COMMENT 'parent gf identifier',
  `parent_gf_type` varchar(10) NOT NULL COMMENT 'links to gene_family_types id',
  `child_gf_id` varchar(50) NOT NULL COMMENT 'child gf identifier',
  `child_gf_type` varchar(10) NOT NULL COMMENT 'links to gene_family_types id',
  PRIMARY KEY (`parent_gf_id`,`child_gf_id`),
  KEY `parent gf id` (`parent_gf_id`),
  KEY `child gf id` (`child_gf_id`),
  KEY `parent gf type` (`parent_gf_type`),
  KEY `child gf type` (`child_gf_type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `gene_family_types`
--

CREATE TABLE IF NOT EXISTS `gene_family_types` (
  `id` varchar(10) NOT NULL COMMENT 'unique identifier for this gene family type. foreign key to other GF tables',
  `name` varchar(50) NOT NULL COMMENT 'description of gene family type',
  `prefix` varchar(10) NOT NULL COMMENT 'prefix used for building the gf type. for compatibility reasons. shouldn''t be used.',
  `gene_type` enum('coding','rna','pseudo','te') NOT NULL DEFAULT 'coding' COMMENT 'should match type from table annotation',
  `method` varchar(500) NOT NULL COMMENT 'JSON style information of the building method+parameters used',
  `ancestry` enum('homology','orthology','homeology','other') NOT NULL DEFAULT 'homology' COMMENT 'type of gene family content',
  `parent_id` varchar(10) DEFAULT NULL COMMENT 'link to the parent id if appropriate',
  PRIMARY KEY (`id`),
  KEY `type` (`ancestry`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `gene_go`
--

CREATE TABLE IF NOT EXISTS `gene_go` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `species` varchar(21) NOT NULL,
  `gene_id` varchar(50) NOT NULL,
  `go` varchar(10) NOT NULL DEFAULT '',
  `evidence` varchar(3) NOT NULL,
  `go_source` enum('primary','from_tree','from_family','from_iortho','from_family_enrichment') NOT NULL DEFAULT 'primary',
  `provider` varchar(20) DEFAULT NULL,
  `comment` text NOT NULL,
  `is_shown` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `go` (`go`),
  KEY `gene_id` (`gene_id`),
  KEY `species` (`species`),
  KEY `provider` (`provider`),
  KEY `go_source` (`go_source`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `gene_mapman`
--

CREATE TABLE IF NOT EXISTS `gene_mapman` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `species` varchar(21) NOT NULL,
  `gene_id` varchar(50) NOT NULL,
  `mapman` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `species` (`species`),
  KEY `gene_id` (`gene_id`),
  KEY `mapman` (`mapman`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `gene_protein_motif`
--

CREATE TABLE IF NOT EXISTS `gene_protein_motif` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `motif_id` varchar(50) NOT NULL DEFAULT '0',
  `species` varchar(21) NOT NULL,
  `gene_id` varchar(50) NOT NULL DEFAULT '',
  `start` int(11) DEFAULT '0',
  `stop` int(11) DEFAULT '0',
  `score` double DEFAULT NULL,
  `comment` text,
  PRIMARY KEY (`id`),
  KEY `gene_id` (`gene_id`),
  KEY `motif_id` (`motif_id`),
  KEY `species` (`species`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `gf_data`
--

CREATE TABLE IF NOT EXISTS `gf_data` (
  `gf_id` varchar(50) NOT NULL DEFAULT '',
  `gf_type` varchar(10) NOT NULL COMMENT 'links to gene_family_types id',
  `species` varchar(21) NOT NULL,
  `gene_id` varchar(50) NOT NULL DEFAULT '',
  `synteny_data` longtext,
  `cluster_data` float DEFAULT NULL,
  `outlier` smallint(6) NOT NULL DEFAULT '0',
  PRIMARY KEY (`gf_id`,`gene_id`),
  KEY `gene_id` (`gene_id`),
  KEY `species` (`species`),
  KEY `gf_id` (`gf_id`),
  KEY `gf_type` (`gf_type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `gf_functional_data`
--

CREATE TABLE IF NOT EXISTS `gf_functional_data` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `gf_id` varchar(50) NOT NULL DEFAULT '',
  `gf_type` varchar(10) NOT NULL COMMENT 'type of gene family. links to gene_family_types id',
  `name` varchar(50) NOT NULL,
  `type` enum('go','interpro','signalp','mapman') NOT NULL,
  `is_hidden` tinyint(1) NOT NULL DEFAULT '0',
  `p_value` double NOT NULL DEFAULT '0',
  `enrichment_score` double NOT NULL DEFAULT '0',
  `f_score` double NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `gf_id` (`gf_id`),
  KEY `type` (`type`),
  KEY `name` (`name`),
  KEY `gf_type` (`gf_type`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `meta_annotation`
--

CREATE TABLE IF NOT EXISTS `meta_annotation` (
  `data_type` enum('species','chromosome','chromosome_indicator','gene') NOT NULL DEFAULT 'species',
  `identifier` varchar(100) NOT NULL,
  `species` varchar(21) NOT NULL,
  `filter` varchar(20) NOT NULL,
  `key` varchar(20) NOT NULL,
  `value` int(15) NOT NULL,
  KEY `data_type` (`data_type`),
  KEY `identifier` (`identifier`),
  KEY `species` (`species`),
  KEY `filter` (`filter`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `meta_profiles`
--

CREATE TABLE IF NOT EXISTS `meta_profiles` (
  `id` varchar(50) NOT NULL,
  `type` enum('go','interpro','mapman') DEFAULT NULL,
  `source` enum('all','primary','ortho_projection') NOT NULL DEFAULT 'primary',
  `description` varchar(255) NOT NULL,
  `num_genes` int(11) NOT NULL DEFAULT '0',
  `num_species` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`,`source`),
  KEY `type` (`type`),
  KEY `source` (`source`),
  KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `msa`
--

CREATE TABLE IF NOT EXISTS `msa` (
  `msa_id` varchar(100) NOT NULL DEFAULT '',
  `gf_id` varchar(50) NOT NULL DEFAULT '',
  `aln` mediumtext NOT NULL,
  `aln_strip` mediumtext NOT NULL,
  `method` varchar(255) NOT NULL DEFAULT '',
  `length` int(11) NOT NULL DEFAULT '0',
  `strip_length` int(11) NOT NULL DEFAULT '0',
  `strip_par` varchar(255) DEFAULT NULL,
  `comment` text,
  PRIMARY KEY (`msa_id`),
  KEY `msa_ibfk_1` (`gf_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `news`
--

CREATE TABLE IF NOT EXISTS `news` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `author` varchar(50) NOT NULL DEFAULT '',
  `date` date DEFAULT NULL,
  `message` varchar(255) NOT NULL DEFAULT '',
  `full_message` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `orthologs`
--

CREATE TABLE IF NOT EXISTS `orthologs` (
  `gene_id` varchar(50) NOT NULL,
  `species` varchar(21) NOT NULL,
  `type` enum('ORTHO','anchor_point','BHIF','TROG') NOT NULL,
  `gene_content` mediumtext NOT NULL,
  `comment` text,
  PRIMARY KEY (`gene_id`,`type`),
  KEY `gene_id` (`gene_id`),
  KEY `species` (`species`),
  KEY `type` (`type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `phylo_profiles`
--

CREATE TABLE IF NOT EXISTS `phylo_profiles` (
  `gf_id` varchar(50) NOT NULL DEFAULT '',
  `gf_type` varchar(10) NOT NULL COMMENT 'type of gene family',
  `num_genes` int(11) NOT NULL DEFAULT '0',
  `num_species` int(11) NOT NULL DEFAULT '0',
  KEY `gf_id` (`gf_id`),
  KEY `size` (`num_genes`),
  KEY `gf_type` (`gf_type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `publications`
--

CREATE TABLE IF NOT EXISTS `publications` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `source` enum('TAIR','PUBMED') NOT NULL,
  `source_type` varchar(20) DEFAULT NULL,
  `source_id` varchar(15) NOT NULL,
  `title` text NOT NULL,
  `authors` text,
  `journal` varchar(100) DEFAULT NULL,
  `year` year(4) DEFAULT NULL,
  `assoc_pubmed_id` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `source` (`source`),
  KEY `source_id` (`source_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `similarities`
--

CREATE TABLE IF NOT EXISTS `similarities` (
  `species` varchar(21) NOT NULL,
  `query` varchar(50) NOT NULL DEFAULT '',
  `hits` mediumblob NOT NULL,
  PRIMARY KEY (`query`),
  KEY `species` (`species`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `trees`
--

CREATE TABLE IF NOT EXISTS `trees` (
  `tree_id` varchar(100) NOT NULL DEFAULT '',
  `msa_id` varchar(100) NOT NULL DEFAULT '',
  `method` varchar(100) NOT NULL DEFAULT '',
  `tree_bsbl` text NOT NULL,
  `tree_notung` mediumtext,
  PRIMARY KEY (`tree_id`),
  KEY `trees_ibfk_1` (`msa_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `tree_nodes`
--

CREATE TABLE IF NOT EXISTS `tree_nodes` (
  `tree_id` varchar(100) NOT NULL DEFAULT '',
  `node_id` varchar(8) NOT NULL DEFAULT '0',
  `bs` int(11) NOT NULL DEFAULT '0',
  `consistency` double DEFAULT NULL,
  `type` varchar(100) NOT NULL DEFAULT '',
  `date` varchar(100) DEFAULT NULL,
  `gene_content` text,
  `size` int(11) DEFAULT NULL,
  KEY `tree_id` (`tree_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
