function tripal_get_dbxref

2.x tripal_db.api.inc tripal_get_dbxref($identifiers, $options = array())
3.x tripal_chado.module.DEPRECATED.api.inc tripal_get_dbxref($identifiers, $options = array())

Retrieves a chado database reference variable.

Example Usage:

  $identifiers = array(
    'accession' => 'synonym',
    'db_id' => array(
      'name' => 'SOFP'
    )
  );
  $dbxref_object = tripal_get_dbxref($identifiers);

The above code selects the synonym database reference and returns the following object:

 $dbxref_object = stdClass Object (
    [dbxref_id] => 2581
    [accession] => synonym
    [description] =>
    [version] =>
    [db_db_id] => 49
    [db_name] => SOFP
    [db_description] =>
    [db_urlprefix] =>
    [db_url] =>
  );

Parameters

$identifier: An array apropriate for use with the chado_generate_var for uniquely identifying a dbxref record. Alternatively, there are also some specially handled keys. They are:

  • property: An array/object describing the property to select records for. It should at least have either a type_name (if unique across cvs) or type_id. Other supported keys include: cv_id/cv_name (of the type), value and rank.

$options: An array of options. Supported keys include:

  • Any keys supported by chado_generate_var(). See that function definition for additional details.

NOTE: the $identifier parameter can really be any array similar to $values passed into chado_select_record(). It should fully specify the dbxref record to be returned.

Return value

If unique values were passed in as an identifier then an object describing the dbxref will be returned (will be a chado variable from chado_generate_var()). Otherwise, FALSE will be returned.

2 calls to tripal_get_dbxref()
2 string references to 'tripal_get_dbxref'

File

tripal_chado/api/modules/tripal_chado.module.DEPRECATED.api.inc, line 539
These api functions are deprecated, if your site is currently using them please update your code with the newer tripal_chado functions.

Code

function tripal_get_dbxref($identifiers, $options = array()) {
  chado_get_dbxref($identifiers, $options);
}