function tripal_get_location_string
2.x tripal_feature.api.inc | tripal_get_location_string($featureloc) |
3.x tripal_chado.module.DEPRECATED.api.inc | tripal_get_location_string($featureloc) |
Returns a string representing a feature location in an alignment
Parameters
unknown $featureloc: A single featureloc object generated using chado_generate_var that contains a record from the chado.featureloc table.
2 calls to tripal_get_location_string()
- tripal_feature_load_featureloc_sequences in tripal_feature/
theme/ tripal_feature.theme.inc - Get the sequence this feature is located on
- tripal_get_fasta_defline in tripal_feature/
api/ tripal_feature.api.inc - Returns a definition line that can be used in a FASTA file
File
- tripal_feature/
api/ tripal_feature.api.inc, line 711 - Provides an application programming interface (API) for working with features
Code
function tripal_get_location_string($featureloc) {
$feature = $featureloc->feature_id;
$strand = '';
if ($featureloc->strand == 1) {
$strand = '+';
}
elseif ($featureloc->strand == -1) {
$strand = '-';
}
return $featureloc->srcfeature_id->name . ":" . ($featureloc->fmin + 1) . ".." . $featureloc->fmax . $strand;
}