Releases: ccb-hms/ontology-mapper
v4.2.1
v4.2.0
v4.1.4
Minor improvements and bug fixes:
- Update the Command Line Interface to reflect recent changes
- Parameterize the
ngram
length parameter in theTFIDFMapper
- Ensure inputs to text2term are strings (closes #49)
- Add timers to post-mapping filters for debugging
Note: skipped v4.1.3 due to inability to re-publish a deleted release on PyPI.
v4.1.2
Updated version number and .gitignore for local files
v4.1.1
Fixes several bugs, including:
- Adding tags to a term with no initial tags no longer throws an error.
- Caching is now more effective, as previously the cache would recompile when it was unnecessary
- Increased efficiency of filtering terms
Also adds a preliminary GitHub Action for testing, but it is not currently functional yet.
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
v3.0.2
Updates various dependencies and makes them less strict by allowing compatible versions.
Fixes issue in command-line interface imports and mapping function, due to recent refactoring.
v3.0.1
Fixes a bug that prevents adding tags when the current tag variable is just None
v3.0.0
Removes 'map_file' and 'map_tagged_terms' functions in favor of 'map_terms'. Also adds functionality to ignore certain terms via tagging, and to include unmapped terms in the results.
v2.3.2
Fixes a bug where the min_score argument in "map" was ignored when not using the TFIDF mapper.