Description:'; //================================================================================ $text .= '
The Tripal Stock Module provides functionality for adding, editing, deleting and accessing chado stocks. The stock module was designed to store information about stock collections in a laboratory. What is called a stock could also be called a strain or an accession. There is a lot in common between a Drosophila stock and a Saccharomyces strain and an Arabidopsis line. They all come from some taxon, have genotypes, physical locations in the lab, some conceivable relationship with a publication, some conceivable relationship with a sequence feature (such as a transgene), and could be described by some ontology term. For more information about the chado Stock Module see the GMOD Wiki Page
'; $text .= 'Since at the time of this modules developement there is no accepted ontology for describing stocks, their properties and relationships, this module allows you to select the controlled vocabularies (CVs) in your Chado Database you would like to govern these data.
'; $text .= 'To Set the Controlled Vocabularies for Stocks:'; $text .= 'This module also provides User Permissions to control which users or groups of users (roles) can view/access stock content (access chado_stock content), create stocks (create chado_stock content), edit or delete stocks (edit chado_stock content or delete chado_stock content). The default is that only the original administration account has these permissions. To allow additional users/roles any combination of the above permissions:
'; $text .= 'Another important step, if you chado database already contains stocks, is to sync\' Chado with Drupal. This creates Drupal Content including detail pages for each stock (known as nodes in Drupal). To sync\' Chado with Drupal simply go to the Configuration Page for Stocks and in the "Sync Stocks" Fieldset select the Organisms whose associated stocks you would like to sync. If this list doesn\'t contain an organism which you know is in Chado go to the Organism Configuration Page and make sure it is sync\'d with Drupal.
'; $text .= 'This allows you to create content in your drupal and chado for a stock (only the unique stock identifier is duplicated). A Generic Stock must have a unique name, a type and an organism. In addition, you can optionally supply a more human-readable name, a primary database reference and even a short description. The Create Generic Stock form is a multistep form with the first step creating the Basic stock (stored in the stock table). All the remaining steps are optional and descriptions of each follow:
'; $text .= 'Each stock get\'s it\'s own page on this website. This page is meant to give an overall picture of the stock including listing the basic details, as well as, all properties, database references and relationships. To understand where it is -All page content in Drupal is known as a node and is given a unique identifier or nid. Thus every drupal page has a path of node/
If you want to customize the look of the stock Details page simply copy the PHP/HTML template node-chado_stock.tpl.php from theme_tripal to the base theme you are currently using. Then edit it as desired. There are plans to integrate this details page with Drupal Panels which will provide a much more user-friendly and no-programming-needed method to customize this page.
'; $text .= 'Adding/Updating/Deleting Stocks and their Properties, Database References and Relationships:'; $text .= 'The Stock Details Page also acts as a landing pad for updating/deleting stocks. To update a stock, go to the stocks details page and click on the Edit tab near the top of the page. This tab will only be visable if you have permission to edit chado stock content (See post installation steps above for information on setting user permissions). If you want to delete a stock, click the Edit tab and then near the bottom of the form, click the Delete button. This will delete the entire stock including it\'s properties, database references and any relationships including it.
'; $text .= 'To update/delete a given property of a stock, click the "Edit Properties" Tab near the top of the stock details page. This form provides a listing of all existing properties for the given stock with form elements allowing you to change their value. After editing the properties you wanted to, simply click the "Update Properties" button to update all the properties for that stock. To delete a given property simply click the "Delete" Button beside the property you want to delete. You cannot undo this action! To add a property to the given stock simply fill out the "Add Property" form at the bottom of the "Edit Properties" Tab.
'; $text .= 'Adding, updating and deleting Database References and Relationships for a given stock is exactly the same as the method for properties. To edit Database References, click the "Edit DB References" tab and to add/edit/update stock relationships, click the "Edit Relationships" tab.
'; $text .= 'Basic Listing of Stocks:'; $text .= 'This module also provides a basic listing of all stocks currently sync\'d with Drupal. To access this listing, there should be a Stocks Primary Menu item which links you to this page. This page lists each stock on it\'s own row and provides a link to each stock by clicking on it\'s name. Currently there is no way to easily customize this listing.
'; $text .= 'Flexible Listing of Stocks using Drupal Views:'; $text .= 'In order to access a more flexible listing of stocks you must first install the Drupal Views2 module. You should then be able to access the default views here. Essentially, Views is a module which allows you to create custom SQL queries completely through the web interface without knowing SQL. Furthermore, it also does some formatting of the results allowing you to display them as HTML lists, tables or grids. You can also expose filters to the user to let them customize the results they see and even implement various sorting.
'; $text .= 'To use one of the Default Views simply click "Enable" and then "Edit" to change it to show exactly what you want. To view the current listing simply clikc "View Page" at the top of the Edit user interface. There are a number of good tutorials out there for Views2, any of which can be used to help you create your own custom listings of biological content. (Note: there aren\'t any tutorials specifically for tripal content but any tutorial for Views2 will show you how to use the views interface.
'; return $text; } /** * Purpose: Provide administration options for chado_stocks * * @return * Form array (as described by the drupal form api) * * @ingroup tripal_stock */ function tripal_stock_admin() { $form = array(); // before proceeding check to see if we have any // currently processing jobs. If so, we don't want // to give the opportunity to sync Stocks $active_jobs = FALSE; if(tripal_get_module_active_jobs('tripal_stock')){ $active_jobs = TRUE; } if($active_jobs){ $form['notice'] = array( '#type' => 'fieldset', '#title' => t('Stock Management Temporarily Unavailable') ); $form['notice']['message'] = array( '#value' => t("Currently, stock management jobs are waiting or ". "are running. Managemment features have been hidden until these ". "jobs complete. Please check back later once these jobs have ". "finished. You can view the status of pending jobs in the Tripal ". "jobs page."), ); } else { // SET Vocabularies ----------------------------------------------------------------------------------------- $form['set_cv'] = array( '#type' => 'fieldset', '#title' => t('Set Stock Controlled Vocabularies'), '#weight' => -10 ); $form['set_cv']['message'] = array( '#value' => t("This setting allows you to set which chado controlled vocabularies (cv)" ." are used. Cvs are used to control user input for the type of stock," ." any properties they enter for a stock & the types of relationships" ." between stocks. Only cvs already loaded into chado can be selected here.") ); $cv_options = tripal_cv_get_cv_options(); $form['set_cv']['stock_types_cv'] = array( '#type' => 'select', '#title' => t('Controlled Vocabulary governing Stock Types'), '#options' => $cv_options, '#default_value' => variable_get('chado_stock_types_cv', 0) ); $form['set_cv']['stock_prop_types_cv'] = array( '#type' => 'select', '#title' => t('Controlled Vocabulary governing Types of Stock Properties'), '#description' => t("This cv must contain a cvterm entry where name='synonym'."), '#options' => $cv_options, '#default_value' => variable_get('chado_stock_prop_types_cv', 0) ); $form['set_cv']['stock_relationship_cv'] = array( '#type' => 'select', '#title' => t('Controlled Vocabulary governing Types of Relationsips between Stocks'), '#options' => $cv_options, '#default_value' => variable_get('chado_stock_relationship_cv', 0) ); $form['set_cv']['button'] = array( '#type' => 'submit', '#value' => t('Set Controlled Vacabularies') ); // SYNC STOCKS----------------------------------------------------------------------------------------------- $form['sync'] = array( '#type' => 'fieldset', '#title' => t('Sync Stocks'), '#weight' => -10 ); $form['sync']['description'] = array( '#type' => 'item', '#value' => t("Click the 'Sync all Germplasm' button to create Drupal ". "content for stocks in chado. Depending on the ". "number of stocks in the chado database this may take a long ". "time to complete. ") ); $form['sync']['organisms'] = array( '#type' => 'checkboxes', '#title' => t('Organisms for which Stocks should be sync\'d'), '#description' => t('Only sync\'d Organisms are listed. Leaving an organism unchecked does not delete already sync\'d Stocks.'), '#options' => tripal_organism_get_organism_options(), '#required' => FALSE, '#prefix' => '