Created by: tgrego
This PR deprecates the SequenceOntologyMapper, providing the missing alternative ways to have all the functionality it provides.
To get the SO acc of a feature:
$feature->feature_so_acc
To get the SO acc of a gene/transcript biotype:
$feature->get_Biotype->so_acc
To get the SO name of a SO acc:
$oa = Bio::EnsEMBL::Registry->get_adaptor('multi','ontology','OntologyTerm');
$so_name = $oa->fetch_by_accession($so_acc)->name;
If you want biotype SOs and fallback to feature SOs, implement that logic in your code.
SequenceOntologyMapper provides a way to access SO terms for biotypes and feature types, through a series of lookup tables. The Gene and Transcript biotype SO terms could already be accessed alternatively using the Biotype object that can be accessed by the get_Biotype method on gene and transcript objects. Feature type SO terms were missing and are now implemented, through the new method feature_so_acc that is inherited and can be overridden by features.
Removing the SequenceOntologyMapper
Although a 'feature' thing, Slice implements feature_so_acc. Slice is however not a feature, but will return either the SO of its coordinate system if available or of a generic region.
Bio::EnsEMBL::Compara::ConstrainedElement was included in the SequenceOntologyMapper. It is however not a feature, and thus will need implementation of feature_so_acc. Attention, this is in ensembl-compara.
GFFSerializer in this repo used the SequenceOntologyMapper and was updated to use the alternative ways, removing the SequenceOntologyMapper requirement. Other modules in ensembl-production and ensembl-io (and maybe more?) make use of SequenceOntologyMapper and require similar updates.
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.