Chado Schema API

Provides an application programming interface (API) for describing Chado tables. This API consists of a set of functions, one for each table in Chado. Each function simply returns a Drupal style array that defines the table.

Because Drupal 6 does not handle foreign key (FK) relationships, however FK relationships are needed to for Tripal Views. Therefore, FK relationships have been added to the schema defintitions below.

The functions provided in this documentation should not be called as is, but if you need the Drupal-style array definition for any table, use the following function call:

$table_desc = chado_get_schema($table)

where the variable $table contains the name of the table you want to retireve. The chado_get_schema function determines the appropriate version of Chado and uses the Drupal hook infrastructure to call the appropriate hook function to retrieve the table schema.

Parent topics

File

tripal_core/api/tripal_core.chado_schema.api.inc, line 3

Functions

Name Locationsort descending Description
chado_table_exists tripal_core/api/tripal_core.chado_schema.api.inc Check that any given Chado table exists.
chado_column_exists tripal_core/api/tripal_core.chado_schema.api.inc Check that any given column in a Chado table exists.
chado_sequence_exists tripal_core/api/tripal_core.chado_schema.api.inc Check that any given column in a Chado table exists.
chado_dbschema_exists tripal_core/api/tripal_core.chado_schema.api.inc Check that any given schema exists.
chado_is_local tripal_core/api/tripal_core.chado_schema.api.inc Check that the Chado schema exists within the local database
chado_is_installed tripal_core/api/tripal_core.chado_schema.api.inc Check whether chado is installed (either in the same or a different database)
chado_get_version tripal_core/api/tripal_core.chado_schema.api.inc Returns the version number of the currently installed Chado instance. It can return the real or effective version. Note, this function is executed in the hook_init() of the tripal_core module which then sets theā€¦
chado_get_table_names tripal_core/api/tripal_core.chado_schema.api.inc Retrieves the list of tables in the Chado schema. By default it only returns the default Chado tables, but can return custom tables added to the Chado schema if requested
chado_get_schema tripal_core/api/tripal_core.chado_schema.api.inc Retrieves the chado tables Schema API array.
chado_get_custom_table_schema tripal_core/api/tripal_core.chado_schema.api.inc Retrieves the schema in an array for the specified custom table.