Skip to content

Commit

Permalink
Merge pull request #8 from NatalieThurlby/dev
Browse files Browse the repository at this point in the history
Major refactoring for release as ontolopy
  • Loading branch information
NatalieZelenka authored Mar 29, 2021
2 parents 35bfca3 + 1e3c45f commit 7792d3f
Show file tree
Hide file tree
Showing 52 changed files with 233,380 additions and 15,090 deletions.
2 changes: 1 addition & 1 deletion .gitignore
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/
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Contributing

[//]: # (TODO: Link to contributing in docs)
21 changes: 21 additions & 0 deletions LICENSE.md
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.
20 changes: 9 additions & 11 deletions README.md
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
```
9 changes: 9 additions & 0 deletions conftest.py
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 removed docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file removed docs/_build/doctrees/index.doctree
Binary file not shown.
4 changes: 0 additions & 4 deletions docs/_build/html/.buildinfo

This file was deleted.

20 changes: 0 additions & 20 deletions docs/_build/html/_sources/index.rst.txt

This file was deleted.

Loading

0 comments on commit 7792d3f

Please sign in to comment.