function chado_abbreviate_infraspecific_rank

3.x tripal_chado.organism.api.inc chado_abbreviate_infraspecific_rank($rank)

A handy function to abbreviate the infraspecific rank.

Parameters

$rank: The rank below species.

Return value

The proper abbreviation for the rank.

Related topics

3 calls to chado_abbreviate_infraspecific_rank()
chado_get_organism_scientific_name in tripal_chado/api/modules/tripal_chado.organism.api.inc
Returns the full scientific name of an organism.
TaxonomyImporter::addOrganism in tripal_chado/includes/TripalImporter/TaxonomyImporter.inc
Adds a new organism record to Chado.
tripal_abbreviate_infraspecific_rank in tripal_chado/api/modules/tripal_chado.module.DEPRECATED.api.inc
A handy function to abbreviate the infraspecific rank.

File

tripal_chado/api/modules/tripal_chado.organism.api.inc, line 329
Provides API functions specificially for managing feature records in Chado.

Code

function chado_abbreviate_infraspecific_rank($rank) {
  $abb = '';
  switch ($rank) {
    case 'no_rank':
      $abb = '';
      break;
    case 'subspecies':
      $abb = 'subsp.';
      break;
    case 'varietas':
      $abb = 'var.';
      break;
    case 'variety':
      $abb = 'var.';
      break;
    case 'subvarietas':
      $abb = 'subvar.';
      break;
    case 'subvariety':
      $abb = 'subvar.';
      break;
    case 'forma':
      $abb = 'f.';
      break;
    case 'subforma':
      $abb = 'subf.';
      break;
    default:
      $abb = $rank;
  }
  return $abb;
}