function tripal_get_feature_sequences
2.x tripal_feature.api.inc | tripal_get_feature_sequences($feature, $options) |
3.x tripal_chado.module.DEPRECATED.api.inc | tripal_get_feature_sequences($feature, $options) |
Retrieves the sequences for a given feature.
If a feature has multiple alignments or multiple relationships then multiple sequences will be returned.
Parameters
$feature: An associative array describing the feature. Valid keys include:
- feature_id: The feature_id of the feature for which the sequence will be retrieved.
- name: The feature name. This will appear on the FASTA definition line.
- parent_id: (optional) only retrieve a sequence if 'derive_from_parent' is true and the parent matches this ID.
- featureloc_id: (optional) only retrieve a sequence if 'derive_from_parent' is true and the alignment is defined with this featureloc_id.
$options: An associative array of options. Valid keys include:
- width: Indicate the number of bases to use per line. A new line will be added after the specified number of bases on each line.
- is_html: Set to '1' if the sequence is meant to be displayed on a web page. This will cause a <br> tag to separate lines of the FASTA sequence.
- derive_from_parent: Set to '1' if the sequence should be obtained from the parent to which this feature is aligned.
- aggregate: Set to '1' if the sequence should only contain sub features, excluding intro sub feature sequence. For example, set this option to obtain just the coding sequence of an mRNA.
- upstream: An integer specifing the number of upstream bases to include in the output.
- downstream: An integer specifying the number of downstream bases to include in the output.
- sub_feature_types: Only include sub features (or child features) of the types provided in the array.
- relationship_type: If a relationship name is provided (e.g. sequence_of) then any sequences that are in relationships of this type with matched sequences are also included.
- relationship_part: If a relationship is provided in the preceeding argument then the rel_part must be either 'object' or 'subject' to indicate which side of the relationship the matched features belong.
Return value
an array of matching sequence in the following keys for each sequence:
- types: an array of feature types that were used to derive the sequence (e.g. from an aggregated sequence)
- upstream: the number of upstream bases included in the sequence
- downstream: the number of downstream bases included in the sequence
- defline: the definintion line used to create a FASTA sequence
- residues: the residues
- featureloc_id: the featureloc_id if the sequences is from an alignment
1 call to tripal_get_feature_sequences()
- tripal_feature_sequence.tpl.php in legacy/
tripal_feature/ theme/ templates/ tripal_feature_sequence.tpl.php
File
- tripal_chado/
api/ modules/ tripal_chado.module.DEPRECATED.api.inc, line 744 - 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_feature_sequences($feature, $options) {
chado_get_feature_sequences($feature, $options);
}