supporth 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- supporth-0.4.0/LICENSE +21 -0
- supporth-0.4.0/MANIFEST.in +2 -0
- supporth-0.4.0/PKG-INFO +137 -0
- supporth-0.4.0/README.md +104 -0
- supporth-0.4.0/RELEASING.md +49 -0
- supporth-0.4.0/pyproject.toml +52 -0
- supporth-0.4.0/setup.cfg +4 -0
- supporth-0.4.0/src/supporth/__init__.py +5 -0
- supporth-0.4.0/src/supporth/adapters/__init__.py +57 -0
- supporth-0.4.0/src/supporth/adapters/base.py +332 -0
- supporth-0.4.0/src/supporth/adapters/broccoli.py +79 -0
- supporth-0.4.0/src/supporth/adapters/of_config.py +151 -0
- supporth-0.4.0/src/supporth/adapters/oma.py +95 -0
- supporth-0.4.0/src/supporth/adapters/orthofinder.py +305 -0
- supporth-0.4.0/src/supporth/adapters/sonicparanoid.py +334 -0
- supporth-0.4.0/src/supporth/adapters/tabular.py +68 -0
- supporth-0.4.0/src/supporth/canonical.py +137 -0
- supporth-0.4.0/src/supporth/cli.py +404 -0
- supporth-0.4.0/src/supporth/consensus.py +232 -0
- supporth-0.4.0/src/supporth/deps.py +604 -0
- supporth-0.4.0/src/supporth/disk.py +184 -0
- supporth-0.4.0/src/supporth/figures.py +282 -0
- supporth-0.4.0/src/supporth/interpreters.py +220 -0
- supporth-0.4.0/src/supporth/manifest.py +89 -0
- supporth-0.4.0/src/supporth/method_stack.py +49 -0
- supporth-0.4.0/src/supporth/paths.py +55 -0
- supporth-0.4.0/src/supporth/pipeline.py +408 -0
- supporth-0.4.0/src/supporth/proteomes.py +160 -0
- supporth-0.4.0/src/supporth/py.typed +0 -0
- supporth-0.4.0/src/supporth/shell.py +155 -0
- supporth-0.4.0/src/supporth/similarity.py +286 -0
- supporth-0.4.0/src/supporth.egg-info/PKG-INFO +137 -0
- supporth-0.4.0/src/supporth.egg-info/SOURCES.txt +38 -0
- supporth-0.4.0/src/supporth.egg-info/dependency_links.txt +1 -0
- supporth-0.4.0/src/supporth.egg-info/entry_points.txt +3 -0
- supporth-0.4.0/src/supporth.egg-info/requires.txt +15 -0
- supporth-0.4.0/src/supporth.egg-info/top_level.txt +1 -0
- supporth-0.4.0/supporth_manual.md +395 -0
- supporth-0.4.0/tests/test_core.py +1041 -0
- supporth-0.4.0/tests/test_regressions.py +169 -0
supporth-0.4.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Fabian Moreno-Avitia
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
supporth-0.4.0/PKG-INFO
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: supporth
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: Support-based orthologue integration: runs multiple orthology predictors and unifies their calls into a consensus table
|
|
5
|
+
Author: Fabian Moreno-Avitia
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/fma91/SuppOrth
|
|
8
|
+
Project-URL: Documentation, https://github.com/fma91/SuppOrth#readme
|
|
9
|
+
Project-URL: Issues, https://github.com/fma91/SuppOrth/issues
|
|
10
|
+
Keywords: orthology,comparative-genomics,orthofinder,sonicparanoid,broccoli
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Operating System :: MacOS
|
|
16
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: pandas>=1.3
|
|
21
|
+
Requires-Dist: biopython>=1.79
|
|
22
|
+
Requires-Dist: matplotlib>=3.4
|
|
23
|
+
Requires-Dist: venny4py>=1.0
|
|
24
|
+
Provides-Extra: viz
|
|
25
|
+
Requires-Dist: matplotlib>=3.4; extra == "viz"
|
|
26
|
+
Requires-Dist: venny4py>=1.0; extra == "viz"
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
29
|
+
Provides-Extra: release
|
|
30
|
+
Requires-Dist: build>=1.2; extra == "release"
|
|
31
|
+
Requires-Dist: twine>=6; extra == "release"
|
|
32
|
+
Dynamic: license-file
|
|
33
|
+
|
|
34
|
+

|
|
35
|
+
|
|
36
|
+
# SuppOrth
|
|
37
|
+
|
|
38
|
+
SuppOrth runs **OrthoFinder, SonicParanoid2 and Broccoli** on your protein FASTA
|
|
39
|
+
files and combines their orthologue predictions. You can also include results
|
|
40
|
+
from an existing **OMA** run.
|
|
41
|
+
|
|
42
|
+
The output contains unique protein pairs between species, the tools supporting
|
|
43
|
+
each pair, and alignment statistics when available. It accepts two or more
|
|
44
|
+
proteomes and keeps one-to-many and many-to-many relationships.
|
|
45
|
+
|
|
46
|
+
## Install
|
|
47
|
+
|
|
48
|
+
Use Python 3.10–3.12 on macOS or Linux. Install SuppOrth, then its predictors:
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
python -m pip install supporth # Install the SuppOrth command-line application
|
|
52
|
+
suppOrth install # Install the three predictors and prepare their dependencies
|
|
53
|
+
suppOrth check # Check whether predictors and required binaries are ready
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
SuppOrth is distributed through [PyPI](https://pypi.org/project/supporth/).
|
|
57
|
+
|
|
58
|
+
The predictors are installed from their source repositories under `~/.supporth`.
|
|
59
|
+
You need Git and a compiler toolchain. MAFFT and FastME must already be available
|
|
60
|
+
or supplied during installation. SonicParanoid needs an indexed Pfam database;
|
|
61
|
+
preparing it can take several hours. To reuse an existing database:
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
suppOrth install --pfam-db /path/to/profile_db
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
See the [installation details](https://github.com/fma91/SuppOrth/blob/stand_alone/supporth_manual.md#installation)
|
|
68
|
+
for interpreter selection, shared binaries and custom installation locations.
|
|
69
|
+
|
|
70
|
+
## Run
|
|
71
|
+
|
|
72
|
+
Put one protein FASTA per species in a directory:
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
suppOrth run -f proteomes/ -o results/ -t 8
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Or pass the files directly:
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
suppOrth run speciesA.faa speciesB.faa speciesC.faa -o results/ -t 8
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Use unique protein identifiers across the FASTAs. SuppOrth reads the first
|
|
85
|
+
whitespace-separated field of each header. The predictors run sequentially,
|
|
86
|
+
using the requested thread budget.
|
|
87
|
+
|
|
88
|
+
By default, a pair is kept if **at least three tools support it**, or its
|
|
89
|
+
alignment identity is **greater than 80%**. Change the thresholds with:
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
suppOrth run -f proteomes/ -o results/ --supportLv 2 --identity_filter 90
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Use `--supportLv 1` to keep every predicted cross-species pair. Support counts
|
|
96
|
+
measure agreement between methods; they are not probabilities.
|
|
97
|
+
|
|
98
|
+
## Include OMA
|
|
99
|
+
|
|
100
|
+
Run OMA separately with the same protein identifiers, then supply its output:
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
suppOrth run -f proteomes/ -o results/ --oma /path/to/oma_run/Output/
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
SuppOrth imports OMA's `PairwiseOrthologs` tables as a fourth source of support.
|
|
107
|
+
It does not install or run OMA. See the [OMA guide](https://github.com/fma91/SuppOrth/blob/stand_alone/supporth_manual.md#include-oma-predictions)
|
|
108
|
+
for accepted folders and identifier matching.
|
|
109
|
+
|
|
110
|
+
## Results
|
|
111
|
+
|
|
112
|
+
Open these files in `results/`:
|
|
113
|
+
|
|
114
|
+
- **`suppOrth.tsv`**: protein pairs, support counts, 0/1 tool columns and alignment statistics.
|
|
115
|
+
- **`suppOrth.png` and `suppOrth.svg`**: overlap figures from all predictor calls before filtering.
|
|
116
|
+
- **`provenance.json`**: inputs, options, software versions and run status.
|
|
117
|
+
|
|
118
|
+
Tool labels are **F** (OrthoFinder), **S** (SonicParanoid), **B** (Broccoli) and
|
|
119
|
+
**O** (OMA). For example, `SupportedBy=F,S,O` means three tools support the pair.
|
|
120
|
+
|
|
121
|
+

|
|
122
|
+
|
|
123
|
+
The [SuppOrth manual](https://github.com/fma91/SuppOrth/blob/stand_alone/supporth_manual.md#output)
|
|
124
|
+
includes the first ten rows of an example output, all output files, native
|
|
125
|
+
predictor options, BLAST/DIAMOND selection and maintenance commands.
|
|
126
|
+
|
|
127
|
+
## More options
|
|
128
|
+
|
|
129
|
+
OrthoFinder uses DIAMOND, MAFFT and IQ-TREE by default. Select BLAST with
|
|
130
|
+
`--alignment blast`. Pass native predictor arguments in a quoted string:
|
|
131
|
+
|
|
132
|
+
```sh
|
|
133
|
+
suppOrth run -f proteomes/ -o results/ --opt orthofinder="-I 2.0"
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
See the [SuppOrth manual](https://github.com/fma91/SuppOrth/blob/stand_alone/supporth_manual.md)
|
|
137
|
+
and [release instructions](https://github.com/fma91/SuppOrth/blob/stand_alone/RELEASING.md).
|
supporth-0.4.0/README.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
# SuppOrth
|
|
4
|
+
|
|
5
|
+
SuppOrth runs **OrthoFinder, SonicParanoid2 and Broccoli** on your protein FASTA
|
|
6
|
+
files and combines their orthologue predictions. You can also include results
|
|
7
|
+
from an existing **OMA** run.
|
|
8
|
+
|
|
9
|
+
The output contains unique protein pairs between species, the tools supporting
|
|
10
|
+
each pair, and alignment statistics when available. It accepts two or more
|
|
11
|
+
proteomes and keeps one-to-many and many-to-many relationships.
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
Use Python 3.10–3.12 on macOS or Linux. Install SuppOrth, then its predictors:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
python -m pip install supporth # Install the SuppOrth command-line application
|
|
19
|
+
suppOrth install # Install the three predictors and prepare their dependencies
|
|
20
|
+
suppOrth check # Check whether predictors and required binaries are ready
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
SuppOrth is distributed through [PyPI](https://pypi.org/project/supporth/).
|
|
24
|
+
|
|
25
|
+
The predictors are installed from their source repositories under `~/.supporth`.
|
|
26
|
+
You need Git and a compiler toolchain. MAFFT and FastME must already be available
|
|
27
|
+
or supplied during installation. SonicParanoid needs an indexed Pfam database;
|
|
28
|
+
preparing it can take several hours. To reuse an existing database:
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
suppOrth install --pfam-db /path/to/profile_db
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
See the [installation details](https://github.com/fma91/SuppOrth/blob/stand_alone/supporth_manual.md#installation)
|
|
35
|
+
for interpreter selection, shared binaries and custom installation locations.
|
|
36
|
+
|
|
37
|
+
## Run
|
|
38
|
+
|
|
39
|
+
Put one protein FASTA per species in a directory:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
suppOrth run -f proteomes/ -o results/ -t 8
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Or pass the files directly:
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
suppOrth run speciesA.faa speciesB.faa speciesC.faa -o results/ -t 8
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Use unique protein identifiers across the FASTAs. SuppOrth reads the first
|
|
52
|
+
whitespace-separated field of each header. The predictors run sequentially,
|
|
53
|
+
using the requested thread budget.
|
|
54
|
+
|
|
55
|
+
By default, a pair is kept if **at least three tools support it**, or its
|
|
56
|
+
alignment identity is **greater than 80%**. Change the thresholds with:
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
suppOrth run -f proteomes/ -o results/ --supportLv 2 --identity_filter 90
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Use `--supportLv 1` to keep every predicted cross-species pair. Support counts
|
|
63
|
+
measure agreement between methods; they are not probabilities.
|
|
64
|
+
|
|
65
|
+
## Include OMA
|
|
66
|
+
|
|
67
|
+
Run OMA separately with the same protein identifiers, then supply its output:
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
suppOrth run -f proteomes/ -o results/ --oma /path/to/oma_run/Output/
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
SuppOrth imports OMA's `PairwiseOrthologs` tables as a fourth source of support.
|
|
74
|
+
It does not install or run OMA. See the [OMA guide](https://github.com/fma91/SuppOrth/blob/stand_alone/supporth_manual.md#include-oma-predictions)
|
|
75
|
+
for accepted folders and identifier matching.
|
|
76
|
+
|
|
77
|
+
## Results
|
|
78
|
+
|
|
79
|
+
Open these files in `results/`:
|
|
80
|
+
|
|
81
|
+
- **`suppOrth.tsv`**: protein pairs, support counts, 0/1 tool columns and alignment statistics.
|
|
82
|
+
- **`suppOrth.png` and `suppOrth.svg`**: overlap figures from all predictor calls before filtering.
|
|
83
|
+
- **`provenance.json`**: inputs, options, software versions and run status.
|
|
84
|
+
|
|
85
|
+
Tool labels are **F** (OrthoFinder), **S** (SonicParanoid), **B** (Broccoli) and
|
|
86
|
+
**O** (OMA). For example, `SupportedBy=F,S,O` means three tools support the pair.
|
|
87
|
+
|
|
88
|
+

|
|
89
|
+
|
|
90
|
+
The [SuppOrth manual](https://github.com/fma91/SuppOrth/blob/stand_alone/supporth_manual.md#output)
|
|
91
|
+
includes the first ten rows of an example output, all output files, native
|
|
92
|
+
predictor options, BLAST/DIAMOND selection and maintenance commands.
|
|
93
|
+
|
|
94
|
+
## More options
|
|
95
|
+
|
|
96
|
+
OrthoFinder uses DIAMOND, MAFFT and IQ-TREE by default. Select BLAST with
|
|
97
|
+
`--alignment blast`. Pass native predictor arguments in a quoted string:
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
suppOrth run -f proteomes/ -o results/ --opt orthofinder="-I 2.0"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
See the [SuppOrth manual](https://github.com/fma91/SuppOrth/blob/stand_alone/supporth_manual.md)
|
|
104
|
+
and [release instructions](https://github.com/fma91/SuppOrth/blob/stand_alone/RELEASING.md).
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Publishing SuppOrth
|
|
2
|
+
|
|
3
|
+
The version is defined in `src/supporth/__init__.py`. Use a new version for every
|
|
4
|
+
upload; PyPI does not allow a published distribution to be replaced.
|
|
5
|
+
|
|
6
|
+
## Build and check
|
|
7
|
+
|
|
8
|
+
Use an existing Python interpreter in a virtual environment:
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
python3.10 -m venv /tmp/supporth-release
|
|
12
|
+
source /tmp/supporth-release/bin/activate
|
|
13
|
+
python -m pip install '.[dev,release]'
|
|
14
|
+
python -m pytest tests
|
|
15
|
+
python -m build
|
|
16
|
+
python -m twine check --strict dist/*
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Build from a clean checkout so `dist/` contains only the intended release.
|
|
20
|
+
`python -m build` creates both the source archive and a wheel built from that
|
|
21
|
+
archive. Check installation in another environment, outside the checkout:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
python3.10 -m venv /tmp/supporth-wheel-check
|
|
25
|
+
/tmp/supporth-wheel-check/bin/python -m pip install dist/supporth-0.4.0-py3-none-any.whl
|
|
26
|
+
/tmp/supporth-wheel-check/bin/python -m pip check
|
|
27
|
+
/tmp/supporth-wheel-check/bin/suppOrth --version
|
|
28
|
+
/tmp/supporth-wheel-check/bin/supporth run --help
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
These checks validate the Python distribution. Predictor installation and live
|
|
32
|
+
orthology runs require separate checks with the upstream software and Pfam data.
|
|
33
|
+
|
|
34
|
+
## Upload
|
|
35
|
+
|
|
36
|
+
Create PyPI and TestPyPI accounts and use their API tokens when Twine asks for
|
|
37
|
+
credentials. Tokens must not be stored in the repository.
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
python -m twine upload --repository testpypi dist/*
|
|
41
|
+
python -m twine upload dist/*
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
TestPyPI and PyPI are separate services. Confirm the TestPyPI metadata and files
|
|
45
|
+
before uploading to PyPI. Stable releases are installed with
|
|
46
|
+
`python -m pip install supporth`.
|
|
47
|
+
|
|
48
|
+
The package name must be available or owned by your PyPI account. An apparent
|
|
49
|
+
absence from the public index does not guarantee that PyPI will allow the name.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77.0.3"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "supporth"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Support-based orthologue integration: runs multiple orthology predictors and unifies their calls into a consensus table"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
12
|
+
requires-python = ">=3.10"
|
|
13
|
+
authors = [{ name = "Fabian Moreno-Avitia" }]
|
|
14
|
+
keywords = ["orthology", "comparative-genomics", "orthofinder", "sonicparanoid", "broccoli"]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 4 - Beta",
|
|
17
|
+
"Intended Audience :: Science/Research",
|
|
18
|
+
"Topic :: Scientific/Engineering :: Bio-Informatics",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Operating System :: MacOS",
|
|
21
|
+
"Operating System :: POSIX :: Linux",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
dependencies = [
|
|
25
|
+
"pandas>=1.3",
|
|
26
|
+
"biopython>=1.79",
|
|
27
|
+
"matplotlib>=3.4",
|
|
28
|
+
"venny4py>=1.0",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
[project.urls]
|
|
32
|
+
Homepage = "https://github.com/fma91/SuppOrth"
|
|
33
|
+
Documentation = "https://github.com/fma91/SuppOrth#readme"
|
|
34
|
+
Issues = "https://github.com/fma91/SuppOrth/issues"
|
|
35
|
+
|
|
36
|
+
[project.optional-dependencies]
|
|
37
|
+
viz = ["matplotlib>=3.4", "venny4py>=1.0"]
|
|
38
|
+
dev = ["pytest>=7.0"]
|
|
39
|
+
release = ["build>=1.2", "twine>=6"]
|
|
40
|
+
|
|
41
|
+
[project.scripts]
|
|
42
|
+
suppOrth = "supporth.cli:main"
|
|
43
|
+
supporth = "supporth.cli:main"
|
|
44
|
+
|
|
45
|
+
[tool.setuptools.packages.find]
|
|
46
|
+
where = ["src"]
|
|
47
|
+
|
|
48
|
+
[tool.setuptools.dynamic]
|
|
49
|
+
version = {attr = "supporth.__version__"}
|
|
50
|
+
|
|
51
|
+
[tool.setuptools.package-data]
|
|
52
|
+
supporth = ["py.typed"]
|
supporth-0.4.0/setup.cfg
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"""Predictor adapters: one module per orthology tool."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .base import Adapter, MethodProfile, StageContext
|
|
6
|
+
from .broccoli import Broccoli
|
|
7
|
+
from .oma import OMA
|
|
8
|
+
from .orthofinder import OrthoFinder
|
|
9
|
+
from .sonicparanoid import SonicParanoid
|
|
10
|
+
|
|
11
|
+
REGISTRY: dict[str, type[Adapter]] = {
|
|
12
|
+
OrthoFinder.name: OrthoFinder,
|
|
13
|
+
SonicParanoid.name: SonicParanoid,
|
|
14
|
+
Broccoli.name: Broccoli,
|
|
15
|
+
OMA.name: OMA,
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
# Predictors SuppOrth installs and launches. OMA is not among them: the user
|
|
19
|
+
# supplies an existing standalone run with --oma.
|
|
20
|
+
DEFAULT_ORDER = (OrthoFinder.name, SonicParanoid.name, Broccoli.name)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def get(name: str) -> Adapter:
|
|
24
|
+
key = name.strip().lower()
|
|
25
|
+
if key not in REGISTRY:
|
|
26
|
+
known = ", ".join(sorted(REGISTRY))
|
|
27
|
+
raise KeyError(f"unknown predictor {name!r}; available: {known}")
|
|
28
|
+
return REGISTRY[key]()
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def resolve(names: str | None) -> list[Adapter]:
|
|
32
|
+
"""Adapters for a comma-separated selection, kept in run order."""
|
|
33
|
+
if not names or names.strip().lower() == "all":
|
|
34
|
+
return [get(n) for n in DEFAULT_ORDER]
|
|
35
|
+
requested = {n.strip().lower() for n in names.split(",") if n.strip()}
|
|
36
|
+
if "oma" in requested:
|
|
37
|
+
raise KeyError(
|
|
38
|
+
"OMA is not run by suppOrth; pass an existing standalone run with --oma PATH"
|
|
39
|
+
)
|
|
40
|
+
unknown = requested - set(REGISTRY)
|
|
41
|
+
if unknown:
|
|
42
|
+
raise KeyError(
|
|
43
|
+
f"unknown predictor(s): {', '.join(sorted(unknown))}; "
|
|
44
|
+
f"available: {', '.join(sorted(REGISTRY))}"
|
|
45
|
+
)
|
|
46
|
+
return [get(n) for n in DEFAULT_ORDER if n in requested]
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
__all__ = [
|
|
50
|
+
"Adapter",
|
|
51
|
+
"MethodProfile",
|
|
52
|
+
"StageContext",
|
|
53
|
+
"REGISTRY",
|
|
54
|
+
"DEFAULT_ORDER",
|
|
55
|
+
"get",
|
|
56
|
+
"resolve",
|
|
57
|
+
]
|