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
Set Permissions: By default only the site administrator account has access to create, edit, delete or administer analyses. Navigate to the and set the permissions under the 'tripal_stock' section as appropriate for your site. For a simple setup, allow anonymous users access to view content and create a special role for creating, editing and other administrative tasks.
Set Ontologies: 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. To Set the Controlled Vocabularies for Stocks: First, ensure your Controlled Vocabulary is in Chado. This can be done by either loading an existing Ontology into Chado using the Tripal Ontology Loader OR create your ontology from scratch by first creating a controlled vocabulary and then adding terms to it. Then go to the Configuration Page for Stocks and, in the "Set Stock Controlled Vocabularies" Fieldset, select the Controlled Vocaulary name for Stock Types, Stock Properties and Stock Relationship Types.
Set Permissions: The stock module supports the Drupal user permissions interface for controlling access to stock content and functions. These permissions include viewing, creating, editing or administering of stock content. The default is that only the original site administrator has these permissions. You can add roles for classifying users, assign users to roles and assign permissions for the stock content to those roles. For a simple setup, allow anonymous users access to view organism content and allow the site administrator all other permissions.
Sync Stocks: if you chado database already contains stocks, they need to be sync'd 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 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.
Create a Generic Stock: 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:
Details Page of a Stock: 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/[nid]. You can get to the Details page for a given stock from either of the stock listings described below. 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.
Adding/Updating/Deleting Stocks and their Properties, Database References and Relationships: 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).
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.
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.
For 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.