Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make child sequence path configurable site to site #72

Open
bradfordcondon opened this issue Mar 25, 2019 · 0 comments
Open

make child sequence path configurable site to site #72

bradfordcondon opened this issue Mar 25, 2019 · 0 comments

Comments

@bradfordcondon
Copy link
Contributor

#71

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);
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant