-- HOMD database SQL structure Dump
-- http://www.homd.org
-- Generation Time: Apr 29, 2010 at 09:50 AM
-- Server version: 5.0.45

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Database: `HOMD_genomes`
--

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

--
-- Table structure for table `annotated_org`
--

CREATE TABLE IF NOT EXISTS `annotated_org` (
  `id` int(11) NOT NULL auto_increment,
  `seq_id` varchar(20) NOT NULL,
  `db_name` varchar(50) NOT NULL,
  `creation_date` date NOT NULL default '0000-00-00',
  `seqfile_date` date NOT NULL,
  `last_annotation_date` date NOT NULL,
  `cycle` tinyint(2) NOT NULL default '0',
  `cycle_count` int(11) NOT NULL default '0',
  `contigs_received` int(11) NOT NULL default '0',
  `minimal_contig` int(11) NOT NULL default '0',
  `contigs_rejected` int(11) NOT NULL default '0',
  `contigs_accepted` int(11) NOT NULL default '0',
  `total_bps` int(11) NOT NULL default '0',
  `GC` float NOT NULL default '0',
  `bps_received` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `short` (`db_name`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 AUTO_INCREMENT=728 ;

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

--
-- Table structure for table `annotation_history`
--

CREATE TABLE IF NOT EXISTS `annotation_history` (
  `seq_id` varchar(20) NOT NULL,
  `db_name` varchar(50) NOT NULL,
  `date` datetime NOT NULL,
  `no_nr_hits` int(11) NOT NULL,
  `no_swiss_hits` int(11) NOT NULL,
  `no_nr_new_hits` int(11) NOT NULL,
  `no_swiss_new_hits` int(11) NOT NULL,
  `no_go_hits` int(11) NOT NULL,
  `no_kegg_hits` int(11) NOT NULL,
  `no_interpro_hits` int(11) NOT NULL,
  `nr_date` date NOT NULL,
  `sp_date` date NOT NULL,
  `ip_date` date default '0000-00-00',
  KEY `date` (`date`),
  KEY `short` (`db_name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `HOMD_block_option`
--

CREATE TABLE IF NOT EXISTS `HOMD_block_option` (
  `db_uid` varchar(100) NOT NULL,
  `location` varchar(1) NOT NULL COMMENT '"G"=>blocks in Genome Viewer. "D"=>blocks in Dynamic annotation',
  `block` varchar(50) NOT NULL,
  `link_name` varchar(50) NOT NULL,
  `db_date` date NOT NULL COMMENT 'Create database date',
  `run_date` date NOT NULL COMMENT 'the latest modificated date',
  KEY `db_uid` (`db_uid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `HOMD_page_link`
--

CREATE TABLE IF NOT EXISTS `HOMD_page_link` (
  `page_name` varchar(20) NOT NULL,
  `description` text,
  `page_URL` varchar(100) NOT NULL,
  `story_id` int(5) NOT NULL,
  KEY `page_name` (`page_name`),
  KEY `name` (`page_URL`),
  KEY `story_id` (`story_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `HOMD_seqid_taxonid_index`
--

CREATE TABLE IF NOT EXISTS `HOMD_seqid_taxonid_index` (
  `Oral_taxon_id` int(5) NOT NULL,
  `seq_id` varchar(9) NOT NULL,
  KEY `seq_id` (`seq_id`),
  KEY `Oral_taxon_id` (`Oral_taxon_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `HOMD_tool_list`
--

CREATE TABLE IF NOT EXISTS `HOMD_tool_list` (
  `tool_type` varchar(20) NOT NULL COMMENT '"homd"=> all of annotation tools available. "ncbi"=>only ncbi genome veiwer and wEMBOSS available',
  `seq_id` varchar(9) NOT NULL,
  `db_uid` varchar(100) NOT NULL COMMENT 'Link to homd germ db or ncbi germ db',
  `db_uid_inNCBI` varchar(100) default NULL,
  `number_contig` int(11) default NULL,
  `combined_length` bigint(20) default NULL,
  `GC` varchar(5) default NULL,
  `DNA_Molecular_Summary` text,
  `ORF_Annotation_Summary` text,
  `flag` tinyint(1) default NULL COMMENT 'Access permission. 0 means public, 1 means non-public (seek permission table in detial)',
  `version` int(5) NOT NULL default '0' COMMENT 'Sequence-based version',
  `version_short` varchar(50) default NULL,
  `download_info` text COMMENT 'seq_download_info',
  `active` tinyint(1) NOT NULL default '0' COMMENT 'Whether show on the web or not',
  KEY `seq_id` (`seq_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `permission`
--

CREATE TABLE IF NOT EXISTS `permission` (
  `db_uid` tinytext NOT NULL,
  `type` char(1) NOT NULL COMMENT 'group or user',
  `guid` int(11) NOT NULL COMMENT 'group id or user id',
  KEY `type` (`type`,`guid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `seq_genomes`
--

CREATE TABLE IF NOT EXISTS `seq_genomes` (
  `seq_id` varchar(9) NOT NULL,
  `Inclusive_higher_taxa` varchar(50) NOT NULL,
  `genus` varchar(50) default NULL,
  `species` varchar(50) NOT NULL default '',
  `culture_collection` varchar(50) default NULL,
  `status` varchar(25) NOT NULL,
  `sequence_center` varchar(80) default NULL,
  `number_contig` int(8) default NULL COMMENT 'the latest version',
  `combined_length` int(15) default NULL COMMENT 'the latest version',
  `flag` int(2) default NULL COMMENT 'Jacques''s flag in genome list',
  `oral_pathogen` tinyint(1) default NULL COMMENT '"0" means oral bacteria. "1" means oral pathogen.',
  PRIMARY KEY  (`seq_id`),
  KEY `genus` (`genus`),
  KEY `species` (`species`),
  KEY `culture_collection` (`culture_collection`),
  KEY `flag` (`flag`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `seq_genomes_extra`
--

CREATE TABLE IF NOT EXISTS `seq_genomes_extra` (
  `seq_id` varchar(11) NOT NULL,
  `isolate_origin` text,
  `ncbi_id` varchar(10) default NULL,
  `ncbi_taxon_id` varchar(10) default NULL,
  `goldstamp_id` varchar(10) default NULL,
  `genbank_acc` varchar(100) default NULL,
  `cmr_id` varchar(10) default NULL,
  `GC` varchar(5) default NULL,
  `GC_comment` text,
  `atcc_medium_number` varchar(25) default NULL,
  `non_atcc_medium` varchar(25) default NULL,
  `16s_rRNA` text,
  `16s_rRNA_comment` text,
  `Type_strain` varchar(10) default NULL,
  `oral` varchar(80) default NULL,
  `Number_of_Clones_6_06` int(10) default NULL,
  `Air_or_Anerobe` varchar(10) default NULL,
  `shape` varchar(20) default NULL,
  `gram_stain` varchar(10) default NULL,
  `ATCC_List_1` varchar(14) default NULL,
  `Other_internal_names` text,
  `flag_explanation` varchar(50) default NULL,
  `NCBI_Nucleotide_Entries_7_06` int(7) default NULL,
  `Biochemistry` text,
  `DNA_Molecular_Summary` text,
  `ORF_Annotation_Summary` text,
  `Unnamed_Field4` text,
  `Unnamed_Field5` text,
  PRIMARY KEY  (`seq_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;