v4.0.0
Change log
User-facing changes:
- Expose
OntologyTermCollector
module so that it can be used on its own. For example:import text2term term_collector = OntologyTermCollector(ontology_iri="EFO") efo_terms = term_collector.get_ontology_terms(exclude_deprecated=True)
- Modify
OntologyTerm
to have a dictionary of complex OWL restrictions of the form:A :contains some/only :C
, where the dictionary key would be:contains
and the value would be:C
, which is either a class or another OWL restriction. In the latter case, we store a string representation of the restriction as the value, e.g.,{':contains': 'D and E'}
.pancreatitis = efo_terms["http://www.ebi.ac.uk/efo/EFO_0000278"] print(pancreatitis.restrictions) >> {'http://www.ebi.ac.uk/efo/EFO_0000784': 'http://purl.obolibrary.org/obo/UBERON_0001264'} print(efo_terms["http://www.ebi.ac.uk/efo/EFO_0000784"].labels.pop()) >> has_disease_location print(efo_terms["http://purl.obolibrary.org/obo/UBERON_0001264"].labels.pop()) >> pancreas
Developer-facing changes:
- Modify
OntologyTermCollector
to parse OWL restrictions (using owlready2) and to create a dictionary-based (simplified) representation of the restrictions. - Modify TermCollector to be able to reuse previously loaded ontology to apply different filters without having to reload.
- Rename
tagged_terms
totagged_term
and fix some references. - Remove no longer needed mapping functions in
onto_cache.py
. - Create new enumeration
OntologyTermType
to represent the different types of terms supported: Class, Property, Any. - Use string enumerations for
mapper
andterm_type
throughout. - Rename variable used both for term type and term type filter.
- Update ontologies with latest releases. Add FoodOn ontology.
- Update setuptools dependency version.
- Fix min_score filter issue.
- Fix issue accessing df to include unmapped terms when mappings df is empty.
Documentation / Logging
- Adds Sphinx Docs to be published in readthedocs.
- Add warning about mapping score when using BioPortal mapper.
- Add documentation about parameters in
text2term.map_terms()
. - Update documentation of
source_terms
parameter inmap_terms()
to clarify the different possibilities currently supported. - Add logging to t2t module and move some logging from individual mappers to t2t.
Testing
- Turn
simple_tests.py
into a more modular test suite. - Add some structure around all tests and documentation about them.
- Add tests for Zooma, Bioportal, TFIDF and syntactic mappers.
- Add
min_score
filter tests. - Add
include_unmapped
feature tests. - Add
OntologyTermCollector
tests.
Full Changelog: v3.0.2...v4.0.0