Skip to content

Biotype in Core schema

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

Created by: tgrego


  • 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


One or more sentences describing in detail the proposed changes.

From ensembl-production pull request #97, the biotype table has been updated to master_biotype and added to the script that copies over data to the core database. The biotype table is thus created in the core schema.

A BiotypeAdaptor was created to interface with this new table. A Biotype class was created that allows the creation of biotype objects, containing all the information on a biotype (such as the biotype_group or the so_acc).

Gene and Transcript classes have biotype methods, these have been rewritten to use and retrieve Biotype objects instead of using the string of the biotype name.

Tests have been added in the biotype.t file.

Use case

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

The biotype column in the gene and transcript tables made it easy to get the biotype name of a feature. However getting extra related information, such as the biotype group or SO acc, was not easy.


If applicable, describe the advantages the changes will have.

Having the biotype table in the core schema makes it easy to retrieving this data. There is no need to query the production database, or to use the SequenceOntologyMapper.

Possible Drawbacks

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

The changes made are expected to be compatible with legacy behaviour.


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


If so, do the tests pass/fail?

Pass, of course.

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


Merge request reports