Difference between revisions of "Chado Schema Documentation HOWTO"

From GMOD
Jump to: navigation, search
m (Module and Table Documentation)
m (Linking to Table and Module Documentation)
Line 10: Line 10:
 
</div>
 
</div>
  
=== Linking to Table and Module Documentation ===
+
=== Linking to Module Documentation ===
  
 
To link to a module on a wiki page use:
 
To link to a module on a wiki page use:
   <nowiki>{{ChadoModuleLink|Module Name|text to show}}</nowki>
+
   <nowiki>{{ChadoModuleLink|Module Name|text to show}}</nowiki>
  
 
For example:
 
For example:
   <nowiki>{{ChadoModuleLink|Publication|pub module}}</nowki>
+
   <nowiki>{{ChadoModuleLink|Publication|pub module}}</nowiki>
  
 
Which is shown as:
 
Which is shown as:
 
: {{ChadoModuleLink|Publication|pub module}}
 
: {{ChadoModuleLink|Publication|pub module}}
 +
 +
=== Linking to Table Documentation ===
 +
 +
To link to a specific table's description on a wiki page, use:
 +
  <nowiki>{{ChadoTableLink|table_name}}</nowiki>
 +
 +
For example:
 +
  <nowiki>{{chadoTableLink|feature}}</nowiki>
 +
 +
will result in:
 +
: {{chadoTableLink|feature}}
 +
 +
Note that this links to the table description on the [[Chado Tables]] page, not to the description on the table's module page.
  
 
=== Showing a Table Description ===
 
=== Showing a Table Description ===
 
To information about any table, use the ''Chado Table Template'' for that table:
 
To information about any table, use the ''Chado Table Template'' for that table:
 
   <nowiki>{{ChadoTable_</nowiki>''tablename''<nowiki>}}</nowiki>
 
   <nowiki>{{ChadoTable_</nowiki>''tablename''<nowiki>}}</nowiki>
which is exactly how the information is included on this page. A Chado Table Template itself is a perplexing nest of smaller and smaller templates.  This means it's hard to figure out how the wiki decides how it decides what to show.  However, all this complexity doesn't really matter as it is all auto-generated.
+
which is exactly how the information is included on this page.  
 +
 
 +
 
 +
 
 +
A Chado Table Template itself is a perplexing nest of smaller and smaller templates.  This means it's hard to figure out how the wiki decides how it decides what to show.  However, all this complexity doesn't really matter as it is all auto-generated.
  
 
The up side of this complexity is it is easy to change the appearance of all Chado tables in the wiki.  All you do is modify the appropriate template.
 
The up side of this complexity is it is easy to change the appearance of all Chado tables in the wiki.  All you do is modify the appropriate template.

Revision as of 05:00, 20 November 2010

Under Construction

This page or section is under construction.

You bet it is.

The Chado schema documentation on this wiki is a mixture of generated content and material directly entered by GMOD users into this wiki. The generated part of the documentation consists of the table definitions that are included on the Chado module pages and on the Chado Tables page, listing all the tables in Chado.

Module and Table Documentation

All of the table descriptions on Chado module pages and the Chado Tables page are generated every time their is a new release of Chado. The column and table details, including comments, come from the PostgreSQL data dictionary. An example table description is this one for cvterm:

<protect>

Table: cvterm
Module: CV

A term, class, universal or type within an ontology or controlled vocabulary. This table is also used for relations and properties. cvterms constitute nodes in the graph defined by the collection of cvterms and cvterm_relationships.

cvterm columns
FK Name Type Description
cvterm_id serial PRIMARY KEY
cv cv_id integer UNIQUE#1

NOT NULL
The cv or ontology or namespace to which this cvterm belongs.

name character varying(1024) UNIQUE#1

NOT NULL
A concise human-readable name or label for the cvterm. Uniquely identifies a cvterm within a cv.

definition text A human-readable text

definition.

dbxref dbxref_id integer UNIQUE

NOT NULL
Primary identifier dbxref - The unique global OBO identifier for this cvterm. Note that a cvterm may have multiple secondary dbxrefs - see also table: cvterm_dbxref.

is_obsolete integer UNIQUE#1

NOT NULL
Boolean 0=false,1=true; see GO documentation for details of obsoletion. Note that two terms with different primary dbxrefs may exist if one is obsolete.

is_relationshiptype integer NOT NULL

Boolean 0=false,1=true relations or relationship types (also known as Typedefs in OBO format, or as properties or slots) form a cv/ontology in themselves. We use this flag to indicate whether this cvterm is an actual term/class/universal or a relation. Relations may be drawn from the OBO Relations ontology, but are not exclusively drawn from there.

Tables referencing cvterm via foreign key constraints:

</protect>

Linking to Module Documentation

To link to a module on a wiki page use:

 {{ChadoModuleLink|Module Name|text to show}}

For example:

 {{ChadoModuleLink|Publication|pub module}}

Which is shown as:

pub module

Linking to Table Documentation

To link to a specific table's description on a wiki page, use:

 {{ChadoTableLink|table_name}}

For example:

 {{chadoTableLink|feature}}

will result in:

feature

Note that this links to the table description on the Chado Tables page, not to the description on the table's module page.

Showing a Table Description

To information about any table, use the Chado Table Template for that table:

 {{ChadoTable_tablename}}

which is exactly how the information is included on this page.


A Chado Table Template itself is a perplexing nest of smaller and smaller templates. This means it's hard to figure out how the wiki decides how it decides what to show. However, all this complexity doesn't really matter as it is all auto-generated.

The up side of this complexity is it is easy to change the appearance of all Chado tables in the wiki. All you do is modify the appropriate template.