nid); } } /** * This function simply defines all tables needed for the module to work * correctly. By putting the table definitions in a separate function we * can easily provide the entire list for hook_install or individual * tables for an update. * * @ingroup tripal_featuremap */ function tripal_featuremap_get_schemas() { $schema = array(); $schema['chado_featuremap'] = array( 'fields' => array( 'vid' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0 ), 'nid' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0 ), 'featuremap_id' => array( 'type' => 'int', 'not null' => TRUE, 'default' => 0 ) ), 'indexes' => array( 'featuremap_id' => array('featuremap_id') ), 'unique keys' => array( 'nid_vid' => array('nid', 'vid'), 'vid' => array('vid') ), 'primary key' => array('nid'), ); return $schema; } /** * Implementation of hook_requirements(). */ function tripal_featuremap_requirements($phase) { $requirements = array(); if ($phase == 'install') { // make sure chado is installed if (!tripal_core_is_chado_installed()) { $requirements ['tripal_featuremap'] = array( 'title' => "tripal_featuremap", 'value' => "ERROR: Chado most be installed before this module can be enabled", 'severity' => REQUIREMENT_ERROR, ); } } return $requirements; } /* * */ function tripal_featuremap_add_cvterms() { // add cvterms for the map unit types tripal_cv_add_cvterm(array('name' => 'cM','def' => 'Centimorgan units'), 'tripal_featuremap', 0, 1, 'tripal'); tripal_cv_add_cvterm(array('name' => 'bp','def' => 'Base pairs units'), 'tripal_featuremap', 0, 1, 'tripal'); tripal_cv_add_cvterm(array('name' => 'bin_unit','def' => 'The bin unit'), 'tripal_featuremap', 0, 1, 'tripal'); tripal_cv_add_cvterm(array('name' => 'marker_order','def' => 'Units simply to define marker order.'), 'tripal_featuremap', 0, 1, 'tripal'); tripal_cv_add_cvterm(array('name' => 'undefined','def' => 'A catch-all for an undefined unit type'), 'tripal_featuremap', 0, 1, 'tripal'); }