Skip to content

Feature/biotype update to keep legacy biotype()

Marek Szuba requested to merge github/fork/tgrego/feature/biotype into master

Created by: tgrego

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion;
  • Review the contributing guidelines for this repository; remember in particular:
    • do not modify code without testing for regression
    • provide simple unit tests to test the changes
    • if you change the schema you must patch the test databases as well, see Updating the schema
    • the PR must not fail unit testing

Description

One or more sentences describing in detail the proposed changes.

Recent addition of Biotype objects used the old biotype method in gene and transcript. This proven not to be 100% backwards compatible, so this is to include legacy biotype() dealing with the biotype name string, together with new get_Biotype and set_Biotype methods that deal with biotype objects.

Use case

Describe the problem. Please provide an example representing the motivation behind the need for having these changes in place.

to_json($gene->biotype) would refuse to do it's job because $gene->biotype was returning an object, even though that object would behave as a string if to_json would make the effort to try it... Now we bring $gene->biotype back to being a real string, and provide new methods to deal with objects.

Benefits

Backwards compatibility

Possible Drawbacks

If applicable, describe any possible undesirable consequence of the changes.

Might have missed something

Testing

Have you added/modified unit tests to test the changes?

Yes.

If so, do the tests pass/fail?

Pass, of course.

Have you run the entire test suite and no regression was detected?

Yes.

Merge request reports