Forráskód Böngészése

Renamed include files in cv module. Updated some code in the example modul and added comments to the OBO loader file

Stephen Ficklin 11 éve
szülő
commit
ae39e21c8a

+ 0 - 0
tripal_cv/includes/tripal_cv_admin.inc → tripal_cv/includes/tripal_cv.admin.inc


+ 0 - 0
tripal_cv/includes/charts.inc → tripal_cv/includes/tripal_cv.charts.inc


+ 0 - 0
tripal_cv/includes/cv_form.inc → tripal_cv/includes/tripal_cv.cv_form.inc


+ 0 - 0
tripal_cv/includes/cvterm_form.inc → tripal_cv/includes/tripal_cv.cvterm_form.inc


+ 0 - 0
tripal_cv/includes/cvtermpath_form.inc → tripal_cv/includes/tripal_cv.cvtermpath_form.inc


+ 186 - 18
tripal_cv/includes/obo_loader.inc → tripal_cv/includes/tripal_cv.obo_loader.inc

@@ -15,6 +15,14 @@
 /**
  * Provides the form to load an already existing controlled
  *  Vocabulary into chado
+ *  
+ * @param $form
+ *   The form array 
+ * @param $form_state
+ *   The form state array
+ *   
+ * @return
+ *   The form array with new additions
  *
  * @ingroup tripal_obo_loader
  */
@@ -95,8 +103,14 @@ function tripal_cv_obo_form($form, &$form_state) {
 
 /**
  * The submit function for the load ontology form. It registers a
- *   tripal job to run the obo_loader.php script
- *
+ *   tripal job to import the user specified ontology file
+ *   
+ * @param $form
+ *   The form array 
+ * @param $form_state
+ *   The form state array
+ *   
+ * 
  * @ingroup tripal_obo_loader
  */
 function tripal_cv_obo_form_submit($form, &$form_state) {
@@ -109,6 +123,15 @@ function tripal_cv_obo_form_submit($form, &$form_state) {
 }
 
 /**
+ * A wrapper function for importing the user specified OBO file into Chado by 
+ * specifying the obo_id of the OBO. It requires that the file be in OBO v1.2 
+ * compatible format.  This function is typically executed via the Tripal jobs 
+ * management after a user submits a job via the Load Onotloies form.
+ * 
+ * @param $obo_id
+ *   An obo_id from the tripal_cv_obo file that specifies which OBO file to import
+ * @param $job_id
+ *   The job_id of the job from the Tripal jobs management system. 
  *
  * @ingroup tripal_obo_loader
  */
@@ -143,6 +166,20 @@ function tripal_cv_load_obo_v1_2_id($obo_id, $jobid = NULL) {
 }
 
 /**
+ * A wrapper function for importing the user specified OBO file into Chado by 
+ * specifying the filename and path of the OBO. It requires that the file be in OBO v1.2 
+ * compatible format.  This function is typically executed via the Tripal jobs 
+ * management after a user submits a job via the Load Onotloies form.
+ * 
+ * @param $obo_name
+ *   The name of the OBO (typially the ontology or controlled vocabulary name)
+ * @param $file
+ *   The path on the file system where the ontology can be found
+ * @param $job_id
+ *   The job_id of the job from the Tripal jobs management system. 
+ * @param $is_new
+ *   Set to TRUE if this is a new ontology that does not yet exist in the 
+ *   tripal_cv_obo table.  If TRUE the OBO will be added to the table.
  *
  * @ingroup tripal_obo_loader
  */
@@ -159,11 +196,23 @@ function tripal_cv_load_obo_v1_2_file($obo_name, $file, $jobid = NULL, $is_new =
 
   // update the cvtermpath table
   tripal_cv_load_update_cvtermpath($newcvs, $jobid);
-
-
 }
 
 /**
+ * A wrapper function for importing the user specified OBO file into Chado by 
+ * specifying the remote URL of the OBO. It requires that the file be in OBO v1.2 
+ * compatible format.  This function is typically executed via the Tripal jobs 
+ * management after a user submits a job via the Load Onotloies form.
+ * 
+ * @param $obo_name
+ *   The name of the OBO (typially the ontology or controlled vocabulary name)
+ * @param $url
+ *   The remote URL of the OBO file.
+ * @param $job_id
+ *   The job_id of the job from the Tripal jobs management system. 
+ * @param $is_new
+ *   Set to TRUE if this is a new ontology that does not yet exist in the 
+ *   tripal_cv_obo table.  If TRUE the OBO will be added to the table.
  *
  * @ingroup tripal_obo_loader
  */
@@ -205,7 +254,16 @@ function tripal_cv_load_obo_v1_2_url($obo_name, $url, $jobid = NULL, $is_new = T
 }
 
 /**
- *
+ * A function for executing the cvtermpath function of Chado.  This function
+ * populates the cvtermpath table of Chado for quick lookup of term 
+ * relationships
+ * 
+ * @param $newcvs
+ *   An associative array of controlled vocabularies to update.  The key must be
+ *   the name of the vocabulary and the value the cv_id from the cv table of chado.
+ * @param $jobid
+ *   The job_id of the job from the Tripal jobs management system. 
+ * 
  * @ingroup tripal_obo_loader
  */
 function tripal_cv_load_update_cvtermpath($newcvs, $jobid) {
@@ -217,7 +275,22 @@ function tripal_cv_load_update_cvtermpath($newcvs, $jobid) {
 }
 
 /**
- *
+ * Imports a given OBO file into Chado.  This function is usually called by
+ * one of three wrapper functions:  tripal_cv_load_obo_v1_2_id, 
+ * tripal_cv_load_obo_v1_2_file or tirpal_cv_load_obo_v1_2_url. But, it can
+ * be called directly if the full path to an OBO file is available on the 
+ * file system.
+ * 
+ * @param $flie
+ *   The full path to the OBO file on the file system
+ * @param $jobid
+ *   The job_id of the job from the Tripal jobs management system.
+ * @param $newcvs
+ *   An empty array passed by reference that upon return will contain the list 
+ *   of newly added vocabularies.  The key will contain the CV name and the
+ *   value the new cv_id
+ * 
+ * 
  * @ingroup tripal_obo_loader
  */
 function tripal_cv_load_obo_v1_2($file, $jobid = NULL, &$newcvs) {
@@ -278,7 +351,11 @@ function tripal_cv_load_obo_v1_2($file, $jobid = NULL, &$newcvs) {
 }
 
 /**
- *
+ * Immediately terminates loading of the OBO file.
+ * 
+ * @param $message
+ *   The error message to present to the user
+ *   
  * @ingroup tripal_obo_loader
  */
 function tripal_cv_obo_quiterror($message) {
@@ -289,8 +366,20 @@ function tripal_cv_obo_quiterror($message) {
 }
 
 /**
- *
- *
+ * OBO files are divided into a typedefs terms section and vocabulary terms section.  
+ * This function loads the typedef terms from the OBO.
+ * 
+ * @param $defaultcv
+ *   A database object containing a record from the cv table for the 
+ *   default controlled vocabulary
+ * @param $newcvs
+ *   An associative array of controlled vocabularies for this OBO.  The key must be
+ *   the name of the vocabulary and the value the cv_id from the cv table of chado.
+ * @param $default_db
+ *   The name of the default database.
+ * @param $jobid
+ *   The job_id of the job from the Tripal jobs management system.
+ *   
  * @ingroup tripal_obo_loader
  */
 function tripal_cv_obo_load_typedefs($defaultcv, $newcvs, $default_db, $jobid) {
@@ -340,7 +429,19 @@ function tripal_cv_obo_load_typedefs($defaultcv, $newcvs, $default_db, $jobid) {
 }
 
 /**
- *
+ * OBO files are divided into a typedefs section and a terms section.  This 
+ * function loads the typedef terms from the OBO.
+ * 
+ * @param $defaultcv
+ *   A database object containing a record from the cv table for the 
+ *   default controlled vocabulary
+ * @param $jobid
+ *  The job_id of the job from the Tripal jobs management system.
+ * @param $newcvs
+ *   An associative array of controlled vocabularies for this OBO.  The key must be
+ *   the name of the vocabulary and the value the cv_id from the cv table of chado.
+ * @param $default_db
+ *   The name of the default database.
  * @ingroup tripal_obo_loader
  */
 function tripal_cv_obo_process_terms($defaultcv, $jobid = NULL, &$newcvs, $default_db) {
@@ -402,7 +503,19 @@ function tripal_cv_obo_process_terms($defaultcv, $jobid = NULL, &$newcvs, $defau
 }
 
 /**
- *
+ * Uses the provided term array to add/update information to Chado about the 
+ * term including the term, dbxref, synonyms, properties, and relationships.
+ * 
+ * @param $term
+ *   An array representing the cvterm. 
+ * @param $defaultcv
+ *   A database object containing a record from the cv table for the 
+ *   default controlled vocabulary
+ * @is_relationship
+ *   Set to 1 if this term is a relationship term
+ * @default_db
+ *   The name of the default database.
+ * 
  * @ingroup tripal_obo_loader
  */
 function tripal_cv_obo_process_term($term, $defaultcv, $is_relationship = 0, &$newcvs, $default_db) {
@@ -563,7 +676,21 @@ function tripal_cv_obo_process_term($term, $defaultcv, $is_relationship = 0, &$n
 }
 
 /**
- * Add a cvterm relationship
+ * Adds a cvterm relationship
+ * 
+ * @param $cvterm
+ *   A database object for the cvterm 
+ * @param $rel
+ *   The relationship name
+ * @param $objname
+ *   The relationship term name
+ * @param $defaultcv
+ *   A database object containing a record from the cv table for the 
+ *   default controlled vocabulary
+ * @object_is_relationship
+ *   Set to 1 if this term is a relationship term
+ * @default_db
+ *   The name of the default database.
  *
  * @ingroup tripal_obo_loader
  */
@@ -643,7 +770,11 @@ function tripal_cv_obo_add_relationship($cvterm, $defaultcv, $rel,
 }
 
 /**
- *
+ * Retreives the term array from the temp loading table for a given term id.
+ * 
+ * @param id
+ *   The id of the term to retrieve
+ *   
  * @ingroup tripal_obo_loader
  */
 function tripal_cv_obo_get_term($id) {
@@ -657,7 +788,13 @@ function tripal_cv_obo_get_term($id) {
 }
 
 /**
- *
+ * Adds the synonyms to a term
+ * 
+ * @param term
+ *   An array representing the cvterm. It must have a 'synonym' key/value pair.
+ * @param cvterm
+ *   The database object of the cvterm to which the synonym will be added.
+ * 
  * @ingroup tripal_obo_loader
  */
 function tripal_cv_obo_add_synonyms($term, $cvterm) {
@@ -749,8 +886,16 @@ function tripal_cv_obo_add_synonyms($term, $cvterm) {
 }
 
 /**
- * Actually parse the OBO file
+ * Parse the OBO file and populate the templ loading table
  *
+ * @param $file
+ *   The path on the file system where the ontology can be found 
+ * @param $header
+ *   An array passed by reference that will be populated with the header
+ *   information from the OBO file
+ * @param $jobid
+ *   The job_id of the job from the Tripal jobs management system.
+ * 
  * @ingroup tripal_obo_loader
  */
 function tripal_cv_obo_parse($obo_file, &$header, $jobid) {
@@ -874,7 +1019,12 @@ function tripal_cv_obo_parse($obo_file, &$header, $jobid) {
 }
 
 /**
- * Add database reference to cvterm
+ * Adds a database reference to a cvterm
+ * 
+ * @param cvterm
+ *   The database object of the cvterm to which the synonym will be added.
+ * @param xref
+ *   The cross refernce.  It should be of the form from the OBO specification
  *
  * @ingroup tripal_obo_loader
  */
@@ -932,7 +1082,16 @@ function tripal_cv_obo_add_cvterm_dbxref($cvterm, $xref) {
 }
 
 /**
- * Add property to CVterm
+ * Adds a property to a cvterm
+ * 
+ * @param cvterm
+ *   A database object for the cvterm to which properties will be added
+ * @param $property
+ *   The name of the property to add
+ * @param $value 
+ *   The value of the property
+ * @param rank
+ *   The rank of the property
  *
  * @ingroup tripal_obo_loader
  */
@@ -999,7 +1158,16 @@ function tripal_cv_obo_add_cvterm_prop($cvterm, $property, $value, $rank) {
 }
 
 /**
- * Add Database Reference
+ * Adds a database cross reference to a cvterm
+ * 
+ * @param db_id
+ *   The database ID of the cross reference
+ * @param accession
+ *   The cross reference's accession
+ * @param $version
+ *   The version of the dbxref
+ * @param $description
+ *   The description of the cross reference
  *
  * @ingroup tripal_obo_loader
  */

+ 0 - 0
tripal_cv/includes/trees.inc → tripal_cv/includes/tripal_cv.trees.inc


+ 7 - 7
tripal_cv/tripal_cv.module

@@ -17,13 +17,13 @@
 require_once 'api/tripal_cv.api.inc';
 require_once 'api/tripal_cv.schema.api.inc';
 
-require_once 'includes/tripal_cv_admin.inc';
-require_once 'includes/charts.inc';
-require_once 'includes/trees.inc';
-require_once 'includes/obo_loader.inc';
-require_once 'includes/cv_form.inc';
-require_once 'includes/cvterm_form.inc';
-require_once 'includes/cvtermpath_form.inc';
+require_once 'includes/tripal_cv.admin.inc';
+require_once 'includes/tripal_cv.charts.inc';
+require_once 'includes/tripal_cv.trees.inc';
+require_once 'includes/tripal_cv.obo_loader.inc';
+require_once 'includes/tripal_cv.cv_form.inc';
+require_once 'includes/tripal_cv.cvterm_form.inc';
+require_once 'includes/tripal_cv.cvtermpath_form.inc';
 
 /**
  * Implements hook_init().

+ 63 - 0
tripal_example/includes/tripal_example.admin.inc

@@ -1 +1,64 @@
 <?php
+/**
+ * @file
+ * This file contains the functions used for administration of the module
+ *
+ */
+
+function tripal_example_admin_examples_listing() {
+  $output = '';
+
+  // set the breadcrumb
+  $breadcrumb = array();
+  $breadcrumb[] = l('Home', '<front>');
+  $breadcrumb[] = l('Administration', 'admin');
+  $breadcrumb[] = l('Tripal', 'admin/tripal');
+  $breadcrumb[] = l('Chado', 'admin/tripal/chado');
+  $breadcrumb[] = l('Examples', 'admin/tripal/chado/tripal_example');
+  drupal_set_breadcrumb($breadcrumb);
+
+  /*
+  // Add the view
+  $view = views_embed_view('tripal_example_admin_examples','default');
+  if (isset($view)) {
+    $output .= $view;
+  }
+  else {
+    $output .= '<p>The Tripal Example Module uses primarily views to provide an '
+      . 'administrative interface. Currently one or more views needed for this '
+      . 'administrative interface are disabled. <strong>Click each of the following links to '
+      . 'enable the pertinent views</strong>:</p>';
+    $output .= '<ul>';
+      $output .= '<li>'.l('Example Admin', 'admin/tripal/chado/tripal_example/views/examples/enable').'</li>';
+    $output .= '</ul>';
+  }
+  */
+
+  return $output;
+}
+
+/**
+ * Administrative settings form
+ *
+ * @ingroup tripal_example
+ */
+function tripal_example_admin() {
+  $form = array();
+
+  $form['nothing'] = array(
+    '#markup' => t('There are currently no settings to configure.')
+  );
+
+  return system_settings_form($form);
+}
+
+
+
+/**
+ *
+ * @ingroup tripal_example
+ */
+function tripal_example_admin_validate($form, &$form_state) {
+  
+}
+

+ 75 - 0
tripal_example/includes/tripal_example.blocks.inc

@@ -1 +1,76 @@
 <?php
+
+/**
+ * @ingroup tripal_example
+ */
+function tripal_example_block_info() {
+
+  $blocks['libreferences']['info'] = t('Tripal Example Cross References');
+  $blocks['libreferences']['cache'] = DRUPAL_NO_CACHE;
+
+  $blocks['libbase']['info'] = t('Tripal Example Details');
+  $blocks['libbase']['cache'] = DRUPAL_NO_CACHE;
+
+  $blocks['libterms']['info'] = t('Tripal Example Terms');
+  $blocks['libterms']['cache'] = DRUPAL_NO_CACHE;
+
+  $blocks['libsynonyms']['info'] = t('Tripal Example Synonyms');
+  $blocks['libsynonyms']['cache'] = DRUPAL_NO_CACHE;
+
+  $blocks['libproperties']['info'] = t('Tripal Example Properties');
+  $blocks['libproperties']['cache'] = DRUPAL_NO_CACHE;
+
+  $blocks['featurelibs']['info'] = t('Tripal Feature Examples');
+  $blocks['featurelibs']['cache'] = DRUPAL_NO_CACHE;
+
+  $blocks['orglibs']['info'] = t('Tripal Organism Examples');
+  $blocks['orglibs']['cache'] = DRUPAL_NO_CACHE;
+
+  return $blocks;
+}
+
+
+/**
+ * @ingroup tripal_example
+ */
+function tripal_example_block_view($delta = '') {
+
+  if (user_access('access chado_example content') and arg(0) == 'node' and is_numeric(arg(1))) {
+    $nid = arg(1);
+    $node = node_load($nid);
+
+    $block = array();
+    switch ($delta) {
+      case 'libreferences':
+        $block['subject'] = t('Cross References');
+        $block['content'] = theme('tripal_example_references', $node);
+        break;
+      case 'libbase':
+        $block['subject'] = t('Example Details');
+        $block['content'] = theme('tripal_example_base', $node);
+        break;
+      case 'libsynonyms':
+        $block['subject'] = t('Synonyms');
+        $block['content'] = theme('tripal_example_synonyms', $node);
+        break;
+      case 'libproperties':
+        $block['subject'] = t('Properties');
+        $block['content'] = theme('tripal_example_properties', $node);
+        break;
+      case 'libterms':
+        $block['subject'] = t('Example Terms');
+        $block['content'] = theme('tripal_example_terms', $node);
+        break;
+      case 'featurelibs':
+        $block['subject'] = t('Examples');
+        $block['content'] = theme('tripal_feature_examples', $node);
+        break;
+      case 'orglibs':
+        $block['subject'] = t('Examples');
+        $block['content'] = theme('tripal_organism_examples', $node);
+        break;
+      default :
+    }
+    return $block;
+  }
+}

+ 17 - 7
tripal_example/includes/tripal_example.chado_node.inc

@@ -31,7 +31,7 @@ function tripal_example_node_info() {
   // to recrords in Chado.  Syncing is the process of creating Drupal nodes
   // and linking them to the appropriate record.
   //  'chado_node_api' => array(
-  //    'base_table' => 'example',       // the base table name (e.g. feature, library, contact)
+  //    'base_table' => 'example',       // the base table name (e.g. feature, example, contact)
   //    'hook_prefix' => 'chado_example',// the node type hook prefix
   //    'record_type_title' => array(
   //      'singular' => t('Library'),    // how to refer to the record
@@ -474,12 +474,22 @@ function chado_example_load($nodes) {
  */
 function tripal_example_node_presave($node) {
 
-  // set the title to ensure it is always unique
-  //switch ($node->type) {
-  //  case 'chado_example':
-  //    $node->title = $node->uniquename;
-  //    break;
-  //}
+  /*
+  // set the node title
+  switch ($node->type) {
+    case 'chado_example':
+      // for a form submission the 'examplename' field will be set,
+      // for a sync, we must pull from the example object
+      if(property_exists($node, 'examplename')) {
+        // set the title
+        $node->title = $node->examplename;
+      }
+      else {
+        $node->title = $node->example->name;
+      }
+      break;
+  }
+  */
 }
 
 /**

+ 245 - 0
tripal_example/tripal_example.module

@@ -1 +1,246 @@
 <?php
+
+/**
+ * @file
+ * This file contains all Drupal hooks for the module other than any
+ * node hooks and block hooks. Those go in the [module name].chado_node.inc file
+ * and [module_name].blocks.inc respectively
+ *
+ */
+
+/* 
+// include any files that might be required
+require('api/tripal_example.api.inc');
+require('theme/tripal_example.theme.inc');
+require('includes/tripal_example.admin.inc');
+require('includes/tripal_example.chado_node.inc');
+*/
+
+
+
+
+/**
+ * Set the permission types that the chado module uses.  Essentially we
+ * want permissionis that protect creation, editing and deleting of chado
+ * data objects
+ *
+ * @ingroup tripal_example
+ */
+function tripal_example_permisssions() {
+  /*
+  return array(
+    'access chado_example content' => array(
+      'title' => t('View Examples'),
+      'description' => t('Allow users to view example pages.'),
+    ),
+    'create chado_example content' => array(
+      'title' => t('Create Examples'),
+      'description' => t('Allow users to create new example pages.'),
+    ),
+    'delete chado_example content' => array(
+      'title' => t('Delete Examples'),
+      'description' => t('Allow users to delete example pages.'),
+    ),
+    'edit chado_example content' => array(
+      'title' => t('Edit Examples'),
+      'description' => t('Allow users to edit example pages.'),
+    ),
+    'adminster tripal example' => array(
+      'title' => t('Administer Examples'),
+      'description' => t('Allow users to administer all examples.'),
+    ),
+  );
+  */
+}
+
+/**
+ * Menu items are automatically added for the new node types created
+ * by this module to the 'Create Content' Navigation menu item.  This function
+ * adds more menu items needed for this module.
+ *
+ * @ingroup tripal_example
+ */
+function tripal_example_menu() {
+  $items = array();
+  
+  /*
+  // The administative settings menu
+  $items['admin/tripal/chado/tripal_example'] = array(
+    'title' => 'Examples',
+    'description' => 'Any example.',
+    'page callback' => 'tripal_example_admin_examples_listing',
+    'access arguments' => array('administer tripal example'),
+    'type' => MENU_NORMAL_ITEM,
+  );
+
+  $items['admin/tripal/chado/tripal_example/help'] = array(
+    'title' => 'Help',
+    'description' => 'Basic Description of Tripal Library Module Functionality',
+    'page callback' => 'theme',
+    'page arguments' => array('tripal_example_help'),
+    'access arguments' => array('administer tripal example'),
+    'type' => MENU_LOCAL_TASK,
+    'weight' => 10
+  );
+
+  $items['admin/tripal/chado/tripal_example/configuration'] = array(
+    'title' => 'Settings',
+    'description' => 'Configure the Tripal Library module',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('tripal_example_admin'),
+    'access arguments' => array('administer tripal example'),
+    'type' => MENU_LOCAL_TASK,
+    'weight' => 5
+  );
+  $items['admin/tripal/chado/tripal_example/sync'] = array(
+    'title' => ' Sync',
+    'description' => 'Create pages on this site for examples stored in Chado',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('tripal_core_chado_node_sync_form', 'tripal_example', 'chado_example'),
+    'access arguments' => array('administer tripal example'),
+    'type' => MENU_LOCAL_TASK,
+    'weight' => 2
+  );
+
+  $items['admin/tripal/chado/tripal_example/views/examples/enable'] = array(
+    'title' => 'Enable Library Administrative View',
+    'page callback' => 'tripal_views_admin_enable_view',
+    'page arguments' => array('tripal_example_admin_examples', 'admin/tripal/chado/tripal_example'),
+    'access arguments' => array('administer tripal example'),
+    'type' => MENU_CALLBACK,
+  );
+  */
+
+  return $items;
+}
+
+/**
+ * Implements hook_views_api()
+ * Purpose: Essentially this hook tells drupal that there is views support for
+ *  for this module which then includes tripal_db.views.inc where all the
+ *  views integration code is
+ *
+ * @ingroup tripal_example
+ */
+function tripal_example_views_api() {
+  return array(
+    'api' => 3.0,
+  );
+}
+
+
+/**
+ *  We need to let drupal know about our theme functions and their arguments.
+ *  We create theme functions to allow users of the module to customize the
+ *  look and feel of the output generated in this module
+ *
+ * @ingroup tripal_example
+ */
+function tripal_example_theme($existing, $type, $theme, $path) {
+  $core_path = drupal_get_path('module', 'tripal_core');
+
+  /*
+  $items = array(
+    'node__chado_example' => array(
+      'template' => 'node--chado-generic',
+      'render element' => 'node',
+      'base hook' => 'node',
+      'path' => "$core_path/theme",
+    ),
+
+    // tripal_example templates
+    'tripal_example_base' => array(
+      'variables' => array('node' => NULL),
+      'template' => 'tripal_example_base',
+      'path' => "$path/theme/tripal_example",
+    ),
+    'tripal_example_properties' => array(
+      'variables' => array('node' => NULL),
+      'template' => 'tripal_example_properties',
+      'path' => "$path/theme/tripal_example",
+    ),
+    'tripal_example_publications' => array(
+      'variables' => array('node' => NULL),
+      'template' => 'tripal_example_publications',
+      'path' => "$path/theme/tripal_example",
+    ),
+    'tripal_example_references' => array(
+      'variables' => array('node' => NULL),
+      'template' => 'tripal_example_references',
+      'path' => "$path/theme/tripal_example",
+    ),
+    'tripal_example_synonyms' => array(
+      'variables' => array('node' => NULL),
+      'template' => 'tripal_example_synonyms',
+      'path' => "$path/theme/tripal_example",
+    ),
+    'tripal_example_terms' => array(
+      'variables' => array('node' => NULL),
+      'template' => 'tripal_example_terms',
+      'path' => "$path/theme/tripal_example",
+    ),
+    'tripal_example_help' => array(
+      'template' => 'tripal_example_help',
+      'variables' =>  array(NULL),
+      'path' => "$path/theme",
+    ),
+
+    // teaser
+    'tripal_example_teaser' => array(
+      'variables' => array('node' => NULL),
+      'template' => 'tripal_example_teaser',
+      'path' => "$path/theme/tripal_example",
+    ),
+
+    // tripal_organism templates
+    'tripal_organism_examples' => array(
+      'variables' => array('node' => NULL),
+      'template' => 'tripal_organism_examples',
+      'path' => "$path/theme/tripal_organism",
+    ),
+
+    // tripal_feature templates
+    'tripal_feature_examples' => array(
+      'variables' => array('node' => NULL),
+      'template' => 'tripal_feature_examples',
+      'path' => "$path/theme/tripal_feature",
+    ),
+
+  );
+  */
+  return $items;
+}
+
+/**
+ * Implements hook_help()
+ * Purpose: Adds a help page to the module list
+ */
+function tripal_example_help ($path, $arg) {
+  if ($path == 'admin/help#tripal_example') {
+    return theme('tripal_example_help', array());
+  }
+}
+
+
+/**
+ *
+ * @ingroup tripal_example
+ */
+function tripal_example_cron() {
+
+}
+
+
+/**
+ * Implementation of hook_form_alter()
+ *
+ * @param $form
+ * @param $form_state
+ * @param $form_id
+ */
+function tripal_example_form_alter(&$form, &$form_state, $form_id) {
+  // turn of preview button for insert/updates
+  if ($form_id == "chado_example_node_form") {
+    $form['actions']['preview']['#access'] = FALSE;
+  }
+}