GFF serialiser update to drop ontology requirement
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
Using one or more sentences, describe in detail the proposed changes. Biotypes and Features are been updated to provide Sequence Ontology terms in addition to SO accessions (see https://github.com/Ensembl/ensembl/pull/364).
Where an OntologyTermAdaptor was required to look up SO terms, now the core API can be used directly. One of those cases is the GFF serialiser.
This updated the GFF serialiser to drop the ontology adaptor requirement and use the core API directly. The constructor was in the form:
my $ontology_adaptor = $registry->get_adaptor( 'Multi', 'Ontology', 'OntologyTerm' );
my $serializer = Bio::EnsEMBL::Utils::IO::GFFSerializer->new($ontology_adaptor, $output_fh);
with an optional extra param - Default source of the features. Defaults to .
Because of this a work around was implemented to keep old constructor calls functioning as normal, but raising a warning telling the user the first argument is not required anymore.
This branch was branched out of biotype_so_term
as those changes yet to be merged are a requirement. For review if https://github.com/Ensembl/ensembl/pull/364 has not been merged yet it yes helpful to rebase against biotype_so_term branch.
Use case
Describe the problem. Please provide an example representing the motivation behind the need for having these changes in place. GFFSerializer->new()
Benefits
If applicable, describe the advantages the changes will have. No need for ontology_adaptor requirement.
Possible Drawbacks
If applicable, describe any possible undesirable consequence of the changes. Old code will get a warning until updated.
Testing
Have you added/modified unit tests to test the changes? yes
If so, do the tests pass/fail? pass
Have you run the entire test suite and no regression was detected? yes