Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/SynBioDex/Owlet
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Bartley committed Jan 16, 2022
2 parents 12e9100 + 829881b commit ebda60a
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
python-version: 3.x
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "tyto/ontologies/sbol-owl3"]
path = tyto/ontologies/sbol-owl3
url = https://github.com/SynBioDex/sbol-owl3.git
[submodule "tyto/ontologies/sbol-owl"]
path = tyto/ontologies/sbol-owl
url = https://github.com/dissys/sbol-owl.git
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![gh-action badge](https://github.com/SynBioDex/tyto/workflows/CI/badge.svg)
![readthedocs badge](https://readthedocs.org/projects/tyto/badge/)

![Tyto deroepstorffi](./tyto.png "Andaman masked owl")
<img src="tyto.png" height="300" />

# Tyto
**Take Your Terms from Ontologies (Tyto)** is a lightweight Python tool that makes the semantic web more user-friendly and accessible.
Expand Down Expand Up @@ -33,9 +33,13 @@ Since these ontology lookup services host hundreds of ontologies, Tyto does not
'http://www.biomodels.net/kisao/KISAO#KISAO_0000029'
```

### Documentation

[Documentation on Readthedocs](https://tyto.readthedocs.io/en/latest/index.html)

### Inference and reasoning

Additionally Tyto supports reasoning and inference over ontology terms. For example, the following evaluates to `True` because the Sequence Ontolgoy categorizes an `inducible_promoter` as a specialized type of `promoter`.
Additionally Tyto supports reasoning and inference over ontology terms. For example, the following evaluates to `True` because the Sequence Ontology categorizes an `inducible_promoter` as a specialized type of `promoter`.
```
>>> tyto.SO.inducible_promoter.is_a(tyto.SO.promoter)
True
Expand All @@ -51,7 +55,7 @@ term1.get_children()

## About our mascot

_Tyto_ is the genus of birds to which owls belong, alluding to the Web Ontology Language (OWL) in which most ontologies are encoded. Tyto's logo is derived from the ``Owl of Minerva''~\cite{owlofminerva} which is licensed under CC BY-SA 4.0.
_Tyto_ is the genus of birds to which owls belong, alluding to the Web Ontology Language (OWL) in which most ontologies are encoded. Tyto's logo is derived from the "Owl of Minerva" which is licensed under CC BY-SA 4.0.

## Acknowledgments

Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
packages=find_packages(),
package_data={'tyto': ['ontologies/*.owl',
'ontologies/*.rdf',
'ontologies/*.ttl']},
'ontologies/*.ttl',
'ontologies/sbol-owl3/sbolowl3.rdf',
'ontologies/sbol-owl/sbol.rdf']},
include_package_data=True,
install_requires=[
'rdflib>=5.0',
Expand Down
12 changes: 12 additions & 0 deletions test/test_ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,18 @@ def test_SBO(self):
uri = 'https://identifiers.org/SBO:0000241'
self.assertEqual(SBO.get_term_by_uri(uri), 'functional entity')

class TestSBOL(unittest.TestCase):

def test_sbol2(self):
self.assertEqual(SBOL2.inline, 'http://sbols.org/v2#inline')
self.assertEqual(SBOL2.reverseComplement, 'http://sbols.org/v2#reverseComplement')
self.assertEqual(SBOL2.ComponentDefinition, 'http://sbols.org/v2#ComponentDefinition')

def test_sbol3(self):
self.assertEqual(SBOL3.inline, 'http://sbols.org/v3#inline')
self.assertEqual(SBOL3.reverseComplement, 'http://sbols.org/v3#reverseComplement')
self.assertEqual(SBOL3.Component, 'http://sbols.org/v3#Component')


if __name__ == '__main__':
unittest.main()
Binary file added tyto.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions tyto/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
from .ncit import NCIT
from .om import OM
from .ncbi_taxon import NCBITaxon
from .sbol2 import SBOL2
from .sbol3 import SBOL3
from .edam import EDAM
7 changes: 7 additions & 0 deletions tyto/edam.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from .tyto import Ontology, Ontobee, installation_path, multi_replace


EDAM = Ontology(endpoints=[Ontobee],
uri='http://edamontology.org/EDAM.owl')
"""EDAM (EMBRACE Data and Methods) is an ontology of common bioinformatics operations, topics, types of data including identifiers, and formats. EDAM comprises common concepts (shared within the bioinformatics community) that apply to semantic annotation of resources."""

1 change: 1 addition & 0 deletions tyto/ontologies/sbol-owl
Submodule sbol-owl added at d25247
1 change: 1 addition & 0 deletions tyto/ontologies/sbol-owl3
Submodule sbol-owl3 added at 1f827f
7 changes: 7 additions & 0 deletions tyto/sbol2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from .tyto import Ontology, installation_path


SBOL2 = Ontology(path=installation_path('ontologies/sbol-owl/sbol.rdf'),
uri='http://sbols.org/v2')


6 changes: 6 additions & 0 deletions tyto/sbol3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from .tyto import Ontology, installation_path


SBOL3 = Ontology(path=installation_path('ontologies/sbol-owl3/sbolowl3.rdf'),
uri='http://sbols.org/v3')

0 comments on commit ebda60a

Please sign in to comment.