-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from NatalieThurlby/dev
Major refactoring for release as ontolopy
- Loading branch information
Showing
52 changed files
with
233,380 additions
and
15,090 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
*.DS_Store | ||
_build/ | ||
build/ | ||
_build/ | ||
dist/ | ||
tests/data/ | ||
__pycache__/ | ||
data/ | ||
*.egg-info/ | ||
.idea/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Contributing | ||
|
||
[//]: # (TODO: Link to contributing in docs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Natalie Thurlby | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
# `uberon_py`: a python package for the Uberon ontology | ||
:construction: :construction: This package is under development :construction: :construction: | ||
|
||
## Summary | ||
I created this package to be able to easily interrogate relationships between Uberon terms in Python. | ||
# Ontolo**py** a python package for working with .obo files | ||
:construction: This package is in development :construction: | ||
|
||
## Installation | ||
`uberon_py` is available on pip, and can be installed using: | ||
Ontolopy is available on pip, and can be installed using: | ||
|
||
```bash | ||
pip3 install uberon_py | ||
pip install ontolopy | ||
``` | ||
|
||
## Usage | ||
Example usage: | ||
|
||
```python | ||
import uberon_py | ||
import ontolopy | ||
|
||
# read an ontology in obo format | ||
obo = uberon_py.Obo('path_to_file/uberon_ext.obo') | ||
obo = ontolopy.Obo('path_to_file/uberon_ext.obo') | ||
|
||
# find relationships between terms of interest: | ||
# (in this case, are any of the source_terms, is_a or part_of the brain?) | ||
source_terms = ['UBERON:0003290','UBERON:0003369','UBERON:0003703'] | ||
target_terms = ['UBERON:0000955'] # brain term | ||
relations_of_interest = 'is_a','part_of'] | ||
relations = uberon_py.Relations(source_terms,target_terms,relations_of_interest[,obo.ont).relations | ||
relations_of_interest = ['is_a','part_of'] | ||
relations = ontolopy.Relations(source_terms,target_terms,relations_of_interest,obo.ont).relations | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Adds tests marked with download won't run without pytest --download | ||
def pytest_addoption(parser): | ||
parser.addoption('--download', action='store_true', dest="download", | ||
default=False, help="enable download-decorated tests") | ||
|
||
|
||
def pytest_configure(config): | ||
if not config.option.download: | ||
setattr(config.option, 'markexpr', 'not download') |
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.