Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get install -qq phyml
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade pip setuptools>=77.0.3 wheel
pip install --only-binary=numpy,scipy numpy scipy
pip install matplotlib ipython jupyter sympy pytest codecov pytest-cov
pip install -r requirements.txt
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Datasnakes

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.
13 changes: 6 additions & 7 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#exclude OrthoEvol/Manager/TODO.py

# Include the README file
include README.rst
include README.md

# Include the requirements file
include requirements.txt
Expand All @@ -18,11 +18,10 @@ recursive-include OrthoEvol/Cookies *
recursive-include OrthoEvol/Manager/config *

# Include docs
include Docs/docs/source/*.rst
include Docs/docs/source/Makefile
include Docs/docs/source/conf.py
include Docs/createdocs.py
include Docs/README.md
include docs/docs/source/*.rst
include docs/docs/source/Makefile
include docs/docs/source/conf.py
include docs/README.md

# Include tests
include Tests/*
include tests/*
52 changes: 18 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,28 @@
[![CI](https://github.com/datasnakes/OrthoEvolution/actions/workflows/ci.yml/badge.svg)](https://github.com/datasnakes/OrthoEvolution/actions/workflows/ci.yml)

[![PyPI](https://badge.fury.io/py/OrthoEvol.svg)](https://badge.fury.io/py/OrthoEvol)

[![Documentation](https://readthedocs.org/projects/orthoevolution/badge/?version=latest)](http://orthoevolution.readthedocs.io/en/latest/?badge=latest)

[![Coverage](https://codecov.io/gh/datasnakes/OrthoEvolution/branch/main/graph/badge.svg)](https://codecov.io/gh/datasnakes/OrthoEvolution)

[![Last Commit](https://badgen.net/github/last-commit/datasnakes/OrthoEvolution)](https://github.com/datasnakes/OrthoEvolution/commits/main)
[![CI](https://github.com/datasnakes/OrthoEvolution/actions/workflows/ci.yml/badge.svg)](https://github.com/datasnakes/OrthoEvolution/actions/workflows/ci.yml) [![PyPI](https://badge.fury.io/py/OrthoEvol.svg)](https://badge.fury.io/py/OrthoEvol) [![Documentation](https://readthedocs.org/projects/orthoevolution/badge/?version=latest)](http://orthoevolution.readthedocs.io/en/latest/?badge=latest) [![Coverage](https://codecov.io/gh/datasnakes/OrthoEvolution/branch/main/graph/badge.svg)](https://codecov.io/gh/datasnakes/OrthoEvolution) [![Last Commit](https://badgen.net/github/last-commit/datasnakes/OrthoEvolution)](https://github.com/datasnakes/OrthoEvolution/commits/main)

# OrthoEvolution

OrthoEvolution is an **easy to use** and comprehensive Python package
which aids in the **analysis and visualization of comparative
evolutionary genetics** related projects such as the **inference of
orthologs**.
which aids in the **analysis and visualization of comparative evolutionary genetics** related
projects such as the **inference of orthologs**.

**Current Version:** 1.0.0b2

## Overview

This package focuses on **inferring orthologs** using NCBI\'s blast,
This package focuses on **inferring orthologs** using NCBI's blast,
various sequence alignment strategies, and phylogenetics analyses
including PAML, PhyML, ete3, and more tools.

Ultimately, the goal of this project is to create a **reusable
pipeline** for the inference of orthologs in order to ensure
reproducibility of data as well as improve the management and analysis
Ultimately, the goal of this project is to create a **reusable pipeline** for the
inference of orthologs in order to ensure reproducibility of data as well as improve the management and analysis
of (what can be) large datasets. The Cookies, Manager, Pipeline, and
Tools modules act as a framework for our workflow, while the Orthologs
module provides access to specific functions for our various ortholog
inference projects.

View our [read the
docs](http://orthoevolution.readthedocs.io/en/latest/) and feel free to
also read [this related
paper](https://www.frontiersin.org/articles/10.3389/fnhum.2014.00283/full)
View our [read the docs](http://orthoevolution.readthedocs.io/en/latest/) and feel free to
also read [this related paper](https://www.frontiersin.org/articles/10.3389/fnhum.2014.00283/full)
to gain more insight into this project/python package.

## Installation
Expand Down Expand Up @@ -79,9 +67,11 @@ directory](https://github.com/datasnakes/OrthoEvolution/tree/main/examples)
for working examples and scripts demonstrating how to utilize this
package.

The examples include: - Standalone scripts for common workflows -
Example data files - GUI implementations (Tkinter and PyWebView) -
Pipeline demonstrations
The examples include:
- Standalone scripts for common workflows
- Example data files
- GUI implementations (Tkinter and PyWebView)
- Pipeline demonstrations

### Running a pre-configured local blast

Expand Down Expand Up @@ -199,11 +189,8 @@ pytest tests

This package was created by the Datasnakes.

- Rob Gilmore \| Github: [\@grabear](https://github.com/grabear) \|
[✉](mailto:robgilmore127@gmail.com)
- Shaurita Hutchins \| Github:
[\@sdhutchins](https://github.com/sdhutchins) \|
[✉](mailto:sdhutchins@outlook.com)
- Rob Gilmore | Github: [@grabear](https://github.com/grabear) | [✉](mailto:robgilmore127@gmail.com)
- Shaurita D. Hutchins | Github: [@sdhutchins](https://github.com/sdhutchins) | [✉](mailto:sdhutchins@outlook.com)

If you would like to contribute to this package, install the package in
development mode:
Expand All @@ -212,20 +199,17 @@ development mode:
pip install -e .
```

Check out our [contributing
guidelines](https://github.com/datasnakes/OrthoEvolution/blob/main/CONTRIBUTING.rst)
Check out our [contributing guidelines](https://github.com/datasnakes/OrthoEvolution/blob/main/CONTRIBUTING.rst)
for more information.

## License

This project is licensed under the MIT License. See the
[LICENSE](https://github.com/datasnakes/OrthoEvolution/blob/main/LICENSE)
This project is licensed under the MIT License. See the [LICENSE](https://github.com/datasnakes/OrthoEvolution/blob/main/LICENSE)
file for details.

## Citations

We\'re thankful to have a resource such as
[Biopython](http://biopython.org/wiki/Biopython), which inspired this
We're thankful to have a resource such as [Biopython](http://biopython.org/wiki/Biopython), which inspired this
package.

*Cock, P.J.A. et al. Biopython: freely available Python tools for
Expand Down
39 changes: 30 additions & 9 deletions docs/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,36 @@
# Add project root to path
sys.path.insert(0, os.path.abspath('../../../'))

# Read version from setup.py automatically
# Read version from pyproject.toml automatically
def get_version():
"""Extract version from setup.py."""
setup_path = os.path.join(os.path.dirname(__file__), '../../../setup.py')
with open(setup_path, 'r') as f:
content = f.read()
match = re.search(r"version\s*=\s*['\"]([^'\"]+)['\"]", content)
if match:
return match.group(1)
"""Extract version from pyproject.toml."""
pyproject_path = os.path.join(os.path.dirname(__file__), '../../../pyproject.toml')

# Try using tomli (Python 3.11+) or tomllib (Python 3.11+)
try:
import tomllib
with open(pyproject_path, 'rb') as f:
data = tomllib.load(f)
version = data.get('project', {}).get('version')
if version:
return version
except ImportError:
# Fall back to tomli for older Python versions
try:
import tomli
with open(pyproject_path, 'rb') as f:
data = tomli.load(f)
version = data.get('project', {}).get('version')
if version:
return version
except ImportError:
# Last resort: regex parsing
with open(pyproject_path, 'r') as f:
content = f.read()
match = re.search(r'version\s*=\s*["\']([^"\']+)["\']', content)
if match:
return match.group(1)

return '1.0.0b2' # fallback

# -- General configuration ------------------------------------------------
Expand Down Expand Up @@ -70,7 +91,7 @@ def get_version():
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# Automatically read version from setup.py
# Automatically read version from pyproject.toml
_version = get_version()
# The short X.Y version.
version = _version
Expand Down
1 change: 1 addition & 0 deletions docs/requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Documentation build dependencies for Read the Docs
sphinx
pypandoc
tomli; python_version < "3.11"
45 changes: 33 additions & 12 deletions docs/update_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,44 @@
from typing import List, Dict


def get_version_from_setup():
"""Extract version from setup.py.
def get_version_from_pyproject():
"""Extract version from pyproject.toml.

:return: Version string from setup.py
:return: Version string from pyproject.toml
"""
setup_path = Path(__file__).parent.parent / 'setup.py'
with open(setup_path, 'r') as f:
content = f.read()
match = re.search(r"version\s*=\s*['\"]([^'\"]+)['\"]", content)
if match:
return match.group(1)
raise ValueError("Could not find version in setup.py")
pyproject_path = Path(__file__).parent.parent / 'pyproject.toml'

# Try using tomli (Python 3.11+) or tomllib (Python 3.11+)
try:
import tomllib
with open(pyproject_path, 'rb') as f:
data = tomllib.load(f)
version = data.get('project', {}).get('version')
if version:
return version
except ImportError:
# Fall back to tomli for older Python versions
try:
import tomli
with open(pyproject_path, 'rb') as f:
data = tomli.load(f)
version = data.get('project', {}).get('version')
if version:
return version
except ImportError:
# Last resort: regex parsing
with open(pyproject_path, 'r') as f:
content = f.read()
match = re.search(r'version\s*=\s*["\']([^"\']+)["\']', content)
if match:
return match.group(1)

raise ValueError("Could not find version in pyproject.toml")


def update_conf_py():
"""Update conf.py with current version (already automated in conf.py)."""
print("✓ conf.py automatically reads version from setup.py")
print("✓ conf.py automatically reads version from pyproject.toml")


def convert_readmes():
Expand Down Expand Up @@ -251,7 +272,7 @@ def main():

# Get current version
try:
version = get_version_from_setup()
version = get_version_from_pyproject()
print(f"\nCurrent version: {version}")
except ValueError as e:
print(f"✗ {e}")
Expand Down
95 changes: 95 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
[build-system]
requires = ["setuptools >= 77.0.3", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "OrthoEvol"
version = "1.0.0b2"
description = "This package aids in the analysis of orthologous genes."
readme = "README.md"
requires-python = ">=3.9"
license = "MIT"
license-files = ["LICENSE"]
keywords = [
"bioinformatics",
"science",
"evolution",
"orthology",
"psychiatry",
"genetics"
]
authors = [
{name = "Rob Gilmore", email = "robgilmore127@gmail.com"},
{name = "Shaurita D. Hutchins", email = "sdhutchins@outlook.com"}
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Scientific/Engineering :: Medical Science Apps.",
"Programming Language :: Python :: 3",
"Operating System :: POSIX :: Linux",
"Operating System :: Unix",
"Natural Language :: English",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Framework :: Flask",
"Framework :: Cookiecutter"
]

dependencies = [
"numpy",
"scipy",
"matplotlib",
"tqdm==4.66.3",
"ete3==3.0.0b35",
"pandas>=0.25.3",
"openpyxl>=2.5.0",
"pexpect==4.4.0",
"slacker==0.9.42",
"biopython>=1.79,<1.84",
"tablib>=0.11.5",
"mygene>=3.0.0",
"cookiecutter",
"Flask",
"Flask-Login",
"Flask-Mail",
"Flask-SQLAlchemy",
"Flask-WTF",
"treelib==1.3.5",
"psutil>=5.6.7",
"luigi",
"logzero>=1.5.0",
"xmltodict>=0.11.0",
"plotly>=3.10.0",
"pyyaml>=3.12",
"werkzeug>=3.1.4"
]

[project.optional-dependencies]
test = [
"pytest",
"pytest-cov",
"pytest-runner"
]

[project.scripts]
orthoevol = "OrthoEvol.Orthologs.command_line:main"

[project.urls]
Homepage = "https://github.com/datasnakes/OrthoEvolution"
Documentation = "https://orthoevolution.readthedocs.io/"
Repository = "https://github.com/datasnakes/OrthoEvolution"
"Bug Reports" = "https://github.com/datasnakes/OrthoEvolution/issues"
Releases = "https://github.com/datasnakes/OrthoEvolution/releases"

[tool.setuptools]
packages = {find = {exclude = ["docs", "examples", "tests"]}}
include-package-data = true
zip-safe = false

[tool.setuptools.package-data]
"*" = ["*.md", "*.txt", "*.yml", "*.yaml", "*.json", "*.cfg"]
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[metadata]
description-file = README.rst

[flake8]
max-line-length = 100

Expand Down
Loading