You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds support for sequences as stored in i5k. In short:
Build CDS from child features (exons).
get polypeptide sequences from feature.residues
for mRNA, build from parent IF there was no feature.residues
I think this would be better if we had a configuration section for the field. You would then a) specify which features to display sequences for, and b) what to pass to options to determine how to build the features for your particular site.
$check = ['polypeptide', 'mRNA', 'CDS'];
if (!in_array($type, $check)) {
$out = 'N/A';
return$out;
}
$options = ['width' => 40, 'is_html' => 1];
// TODO: add in more options based on the sequence we're looking at.// 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.// sub_feature_types: Only include sub features (or child features) of the types provided in the array.// TODO: I guess this should be done in the LOAD instead of the formatter?if ($type == 'CDS') {
$options['aggregate'] = 1;
$options['sub_feature_types'] = ['exon'];
}
$returned = chado_get_feature_sequences(['feature_id' => $info->feature_id], $options);
if (!$returned[0]['residues']) {
$options['derive_from_parent'] = 1;
$returned = chado_get_feature_sequences(['feature_id' => $info->feature_id], $options);
}
The text was updated successfully, but these errors were encountered:
#71
This PR adds support for sequences as stored in i5k. In short:
I think this would be better if we had a configuration section for the field. You would then a) specify which features to display sequences for, and b) what to pass to
options
to determine how to build the features for your particular site.The text was updated successfully, but these errors were encountered: