bio_tools_app 0.1.1__py3-none-win_amd64.whl
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.
- bio_tools_app-0.1.1.data/scripts/bio_tools.exe +0 -0
- bio_tools_app-0.1.1.dist-info/METADATA +305 -0
- bio_tools_app-0.1.1.dist-info/RECORD +6 -0
- bio_tools_app-0.1.1.dist-info/WHEEL +4 -0
- bio_tools_app-0.1.1.dist-info/licenses/PYPI_LICENSE +25 -0
- bio_tools_app-0.1.1.dist-info/sboms/bio_tools.cyclonedx.json +2796 -0
|
Binary file
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: bio_tools_app
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Classifier: Development Status :: 3 - Alpha
|
|
5
|
+
Classifier: Environment :: Console
|
|
6
|
+
Classifier: Intended Audience :: Science/Research
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
9
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
10
|
+
Classifier: Programming Language :: Rust
|
|
11
|
+
License-File: PYPI_LICENSE
|
|
12
|
+
Summary: The bio_tools command-line application, as a prebuilt binary. Install, run, and inspect computational biology and chemistry tools, e.g. AlphaFold, Boltz, RFdiffusion, and ProteinMPNN
|
|
13
|
+
Keywords: biology,bioinformatics,alphafold,proteins,installer
|
|
14
|
+
Author-email: David O'Connor <the_alchemist@fastmail.com>
|
|
15
|
+
Requires-Python: >=3.10
|
|
16
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
17
|
+
Project-URL: documentation, https://docs.rs/bio_tools
|
|
18
|
+
Project-URL: homepage, https://github.com/David-OConnor/bio_tools
|
|
19
|
+
Project-URL: repository, https://github.com/David-OConnor/bio_tools
|
|
20
|
+
|
|
21
|
+
# Bio tools
|
|
22
|
+
|
|
23
|
+
[](https://crates.io/crates/bio_tools)
|
|
24
|
+
[](https://docs.rs/bio_tools)
|
|
25
|
+
[](https://pypi.org/project/athanor-bio-tools)
|
|
26
|
+
|
|
27
|
+
[Home page](https://www.athanorlab.com/rust-tools)
|
|
28
|
+
|
|
29
|
+
An interface for running arbitrary CLI applications for biology and chemistry. It focuses on tools with permissive
|
|
30
|
+
licencing, and ones which are most popular. Available as a rust library, a python library, and a standalone
|
|
31
|
+
CLI application.
|
|
32
|
+
|
|
33
|
+
Includes the most popular tools for structure prediction, sequence prediction, and drug design broadly. For example:
|
|
34
|
+
|
|
35
|
+
- [AlphaFold 3](https://deepmind.google/science/alphafold/)
|
|
36
|
+
- [ProteinMPNN](https://github.com/dauparas/ProteinMPNN) and [LigandMPNN](https://github.com/dauparas/LigandMPNN)
|
|
37
|
+
- [Boltz-2](https://boltz.bio/) / [BoltzGen](https://boltz.bio/boltzgen)
|
|
38
|
+
- [RFdiffusion](https://sites.google.com/omsf.io/rfdiffusion) and [RFantibody](https://github.com/RosettaCommons/RFantibody)
|
|
39
|
+
- [Chai-1](https://www.chaidiscovery.com/)
|
|
40
|
+
- [Protenix](https://protenix-server.com/)
|
|
41
|
+
- [BindCraft](https://github.com/martinpacesa/BindCraft)
|
|
42
|
+
- [OpenDDE](https://aurekaresearch.github.io/OpenDDE-Website/)
|
|
43
|
+
- [ImmuneBuilder](https://opig.stats.ox.ac.uk/webapps/sabdab-sabpred/sabpred/abodybuilder2/)
|
|
44
|
+
- [ThermoMPNN](https://github.com/Kuhlman-Lab/ThermoMPNN)
|
|
45
|
+
|
|
46
|
+
Around 35 more are covered; see `Tool::ALL` and `tool_definitions::catalog` for the full set, each with its
|
|
47
|
+
own summary, license, and official links.
|
|
48
|
+
|
|
49
|
+
Handles the following tasks:
|
|
50
|
+
- Install
|
|
51
|
+
- Uninstall
|
|
52
|
+
- Run (Including abstractions over what inputs are accepted per tool)
|
|
53
|
+
- Check status/health
|
|
54
|
+
- View metadata
|
|
55
|
+
|
|
56
|
+
**Note**: Many of these tools only work on Linux. If you attempt to install one of these on Windows,
|
|
57
|
+
you will get an error explicitly stating this. The `list` commands also will state which tools
|
|
58
|
+
are Linux only, if you are on a different OS.
|
|
59
|
+
|
|
60
|
+
## Quickstart
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pip install bio_tools_app
|
|
64
|
+
bio_tools install open_dde
|
|
65
|
+
bio_tools run open_dde --version
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### As a CLI application
|
|
69
|
+
|
|
70
|
+
`pip install bio_tools_app`
|
|
71
|
+
|
|
72
|
+
This installs the prebuilt `bio_tools` executable onto your PATH. (`uv tool install bio_tools_app` works too.)
|
|
73
|
+
|
|
74
|
+
Alternatively, download a prebuilt binary for Linux or Windows from the
|
|
75
|
+
[Releases page](https://github.com/David-OConnor/bio_tools/releases), or build it with Cargo:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
|
79
|
+
cargo install bio_tools
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Any of these leaves you with `bio_tools` on your path.
|
|
83
|
+
|
|
84
|
+
### As a Python library
|
|
85
|
+
`uv add athanor_bio_tools`
|
|
86
|
+
Or
|
|
87
|
+
`pip install athanor_bio_tools`
|
|
88
|
+
|
|
89
|
+
The PyPI distribution is named `athanor_bio_tools`. The module you import is `bio_tools`.
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
### As a Rust library
|
|
93
|
+
`cargo add bio_tools`
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
### Usage
|
|
97
|
+
Run the program with no parameters to see its functionality:
|
|
98
|
+
`bio_tools`
|
|
99
|
+
```bash
|
|
100
|
+
Usage:
|
|
101
|
+
bio_tools [--root <directory>] install <tool>
|
|
102
|
+
bio_tools [--root <directory>] uninstall <tool>
|
|
103
|
+
bio_tools [--root <directory>] status-quick <tool>
|
|
104
|
+
bio_tools [--root <directory>] status-full <tool>
|
|
105
|
+
bio_tools [--root <directory>] run <tool> [-- <tool arguments...>]
|
|
106
|
+
bio_tools [--root <directory>] list-quick
|
|
107
|
+
bio_tools [--root <directory>] list-full
|
|
108
|
+
bio_tools metadata <tool>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Examples:
|
|
112
|
+
- `bio_tools install boltz`
|
|
113
|
+
- `bio_tools uninstall proteinmpnn`
|
|
114
|
+
- `bio_tools list-quick`
|
|
115
|
+
|
|
116
|
+
## Generic interfaces and code consolidation
|
|
117
|
+
|
|
118
|
+
This library provides an interface for input and output. This abstracts over the differences between tools, so applications
|
|
119
|
+
can add many of them without repeating code. This library was built as the backbone of the
|
|
120
|
+
[Athanor Bio Tools](https://athanortools.com/) web UI, and the external tool integrations in [Molchanica](https://www.athanorlab.com/molchanica). These use the Python and Rust libraries respectively. *Bio Tools* is designed
|
|
121
|
+
to reduce repetition between these projects.
|
|
122
|
+
|
|
123
|
+
The CLI application is intended for cases where you're not writing software, but want to easily
|
|
124
|
+
install these tools directly, without handling the system dependencies and python environments
|
|
125
|
+
for each tool.
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
## Installing tools
|
|
129
|
+
|
|
130
|
+
Handles installing applications. Details depend on the tool; some work by placing application executables in the
|
|
131
|
+
appropriate places. Since many of these use Python, it uses [uv](https://docs.astral.sh/uv/) to set up isolated environments.
|
|
132
|
+
|
|
133
|
+
The Rust installer replaces application-owned shell and PowerShell orchestration. The caller owns
|
|
134
|
+
the outer directory; `bio_tools` owns the stable per-tool layout, downloads, environments, GPU
|
|
135
|
+
selection, and verification.
|
|
136
|
+
|
|
137
|
+
`InstallLayout::process_executables` standardizes both consumers on assets under
|
|
138
|
+
`process_executables/` and environments under `process_executables/python_envs/`.
|
|
139
|
+
`InstallLayout::split` remains available for custom roots. A progress callback can be attached with
|
|
140
|
+
`Installer::with_reporter` for a GUI or structured setup log.
|
|
141
|
+
|
|
142
|
+
**Rust:**
|
|
143
|
+
|
|
144
|
+
```rust
|
|
145
|
+
use bio_tools::{install::Installer, tool_definitions::Tool};
|
|
146
|
+
|
|
147
|
+
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
148
|
+
let mut installer = Installer::for_process_executables("process_executables")?;
|
|
149
|
+
installer.install(Tool::OpenDde)?;
|
|
150
|
+
|
|
151
|
+
// Independent recipes continue after an upstream failure.
|
|
152
|
+
let report = installer.install_many([Tool::Boltz2, Tool::ProteinMpnn]);
|
|
153
|
+
for failure in &report.failed {
|
|
154
|
+
eprintln!("{}: {}", failure.tool.name(), failure.error);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Status: `status_quick` inspects markers, executables, and required assets
|
|
158
|
+
// without launching the tool; `status_full` also runs its help/version probe.
|
|
159
|
+
let status = installer.status_quick(Tool::OpenDde);
|
|
160
|
+
println!("{:?}: {}", status.result, status.detail);
|
|
161
|
+
|
|
162
|
+
let report = installer.uninstall(Tool::OpenDde)?;
|
|
163
|
+
println!("Removed {} paths", report.removed.len());
|
|
164
|
+
Ok(())
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Python** (equivalent):
|
|
169
|
+
|
|
170
|
+
```python
|
|
171
|
+
from pathlib import Path
|
|
172
|
+
import bio_tools
|
|
173
|
+
|
|
174
|
+
root = Path("process_executables")
|
|
175
|
+
installer = bio_tools.Installer(root)
|
|
176
|
+
installer.install(bio_tools.Tool("opendde"))
|
|
177
|
+
|
|
178
|
+
# Independent recipes continue after an upstream failure.
|
|
179
|
+
for slug in ("boltz2", "proteinmpnn"):
|
|
180
|
+
try:
|
|
181
|
+
installer.install(bio_tools.Tool(slug))
|
|
182
|
+
except RuntimeError as error:
|
|
183
|
+
print(f"{slug}: {error}")
|
|
184
|
+
|
|
185
|
+
status = installer.status_quick(bio_tools.Tool("opendde"))
|
|
186
|
+
print(status.result, status.detail)
|
|
187
|
+
|
|
188
|
+
report = installer.uninstall(bio_tools.Tool("opendde"))
|
|
189
|
+
print(f"Removed {len(report.removed)} paths")
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
## Running tools
|
|
194
|
+
|
|
195
|
+
`run::CommandSpec` describes a shell-free invocation independently of any one
|
|
196
|
+
tool. `CommandRunner` builds a `std::process::Command`, overlays environment
|
|
197
|
+
variables, writes optional stdin (or closes it when absent), drains bounded
|
|
198
|
+
stdout and stderr concurrently, enforces a timeout, and either returns or
|
|
199
|
+
rejects non-zero exits according to `ExitPolicy`.
|
|
200
|
+
|
|
201
|
+
**Rust:**
|
|
202
|
+
|
|
203
|
+
```rust
|
|
204
|
+
use std::time::Duration;
|
|
205
|
+
|
|
206
|
+
use bio_tools::run::{CommandSpec, RunLogSpec, run};
|
|
207
|
+
|
|
208
|
+
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
209
|
+
let command = CommandSpec::new("opendde")
|
|
210
|
+
.args(["predict", "input.yaml"])
|
|
211
|
+
.current_dir("work")
|
|
212
|
+
.timeout(Duration::from_secs(600))
|
|
213
|
+
.run_log(RunLogSpec::new("process_executables/run_logs", "opendde").artifact("."));
|
|
214
|
+
|
|
215
|
+
let output = run(&command)?;
|
|
216
|
+
println!("{}", output.stdout_lossy());
|
|
217
|
+
Ok(())
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Python** (equivalent):
|
|
222
|
+
|
|
223
|
+
```python
|
|
224
|
+
from pathlib import Path
|
|
225
|
+
import bio_tools
|
|
226
|
+
|
|
227
|
+
result = bio_tools.Command(
|
|
228
|
+
["opendde", "predict", "input.yaml"],
|
|
229
|
+
cwd=Path("work"),
|
|
230
|
+
timeout=600,
|
|
231
|
+
run_log_dir=Path("process_executables/run_logs"),
|
|
232
|
+
run_name="opendde",
|
|
233
|
+
).run()
|
|
234
|
+
|
|
235
|
+
print(result.stdout)
|
|
236
|
+
print(result.run_log_dir)
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
`Installer::tool_command` (Python: `Installer.run`) is the variant to reach for when the tool lives in a
|
|
240
|
+
managed environment rather than on `PATH`; it resolves the installed console entry point for you.
|
|
241
|
+
|
|
242
|
+
### Run logs
|
|
243
|
+
|
|
244
|
+
When a run log is configured, each invocation gets a unique directory below the given root and run
|
|
245
|
+
name. `run.log` combines the exact argument vector, optional stdin, result, and complete
|
|
246
|
+
stdout/stderr. The same streams are also available as `stdout.txt` and `stderr.txt`; `inputs/`
|
|
247
|
+
contains the pre-run artifact snapshot and `outputs/` contains only files created or changed by the
|
|
248
|
+
command. The in-memory output limit does not truncate these on-disk stream files.
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
## Standalone CLI
|
|
252
|
+
|
|
253
|
+
The `bio_tools` executable wraps the same installer, status, and command-runner APIs for shell use:
|
|
254
|
+
|
|
255
|
+
```sh
|
|
256
|
+
bio_tools install opendde
|
|
257
|
+
bio_tools status-quick opendde
|
|
258
|
+
bio_tools status-full opendde
|
|
259
|
+
bio_tools metadata opendde
|
|
260
|
+
bio_tools run opendde -- --help
|
|
261
|
+
|
|
262
|
+
bio_tools list-quick
|
|
263
|
+
bio_tools list-full
|
|
264
|
+
|
|
265
|
+
bio_tools uninstall opendde
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
It uses `$BIO_TOOLS_ROOT`, or `./.bio_tools` when unset; `--root <directory>` overrides both.
|
|
269
|
+
|
|
270
|
+
`status-quick` inspects installation markers, executables, and required assets without launching the
|
|
271
|
+
tool. `status-full` also runs the tool's help/version probe and imports Torch or JAX where applicable
|
|
272
|
+
to report its compute device. The corresponding list commands are `list-quick` and `list-full`; the
|
|
273
|
+
older `status` and `list` commands remain aliases for the full variants. `run` resolves an installed
|
|
274
|
+
console entry point inside that managed environment, so it does not require the tool on `PATH`. Tools
|
|
275
|
+
that only expose a Python module or checkout script still need a tool-specific library invocation.
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
## Example uses
|
|
279
|
+
- Building a GUI (Web or native application) to these tools
|
|
280
|
+
- Setting up an API to programmatically interface.
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
## Python bindings
|
|
284
|
+
|
|
285
|
+
The `python/` package builds an ABI3 wheel with PyO3 and maturin, published to PyPI as
|
|
286
|
+
`athanor_bio_tools`. It exposes the same process metadata, command runner, installer, and status
|
|
287
|
+
probes; see the examples above, and [the Rust docs](https://docs.rs/bio_tools) for details on the
|
|
288
|
+
underlying types.
|
|
289
|
+
|
|
290
|
+
The `python_cli/` package is unrelated to those bindings: it wraps the compiled `bio_tools`
|
|
291
|
+
executable in a wheel, published to PyPI as `bio_tools_app`, so the CLI can be installed with
|
|
292
|
+
`pip`.
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
## Compiling from source
|
|
296
|
+
Run this from the project root. You only need the first step if you don't have the Rust
|
|
297
|
+
toolchain installed. (And that specific command is for Linux; MacOS and Windows have similarly
|
|
298
|
+
straightforward ways to install it)
|
|
299
|
+
|
|
300
|
+
```bash
|
|
301
|
+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
|
302
|
+
cargo b --release
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
The binary will be placed in `bio_tools/target/release`
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
bio_tools_app-0.1.1.data/scripts/bio_tools.exe,sha256=yj-jfpCdpTPIVYOdFxfb0sF2Le-BwTO7xcfSS8lAtHk,3027456
|
|
2
|
+
bio_tools_app-0.1.1.dist-info/METADATA,sha256=4bqNFzffSFQxNGEJn1zpz_IUduBOif0W1VrUTWAQtJ8,11480
|
|
3
|
+
bio_tools_app-0.1.1.dist-info/WHEEL,sha256=2zDlIYIdD4m4N3p5DVEG3iJhGLdhsBQgdH-FqVkAur8,94
|
|
4
|
+
bio_tools_app-0.1.1.dist-info/licenses/PYPI_LICENSE,sha256=4QSMobLW1lWUACcRaeO3z9DgPnaxgNnBgNTS_GtAYc4,1081
|
|
5
|
+
bio_tools_app-0.1.1.dist-info/sboms/bio_tools.cyclonedx.json,sha256=ScpyMNFCyoybKMWnScdXLKU5HBmpAorVwNLai6T_fFQ,87870
|
|
6
|
+
bio_tools_app-0.1.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Copyright (c) 2025 David O'Connor
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any
|
|
4
|
+
person obtaining a copy of this software and associated
|
|
5
|
+
documentation files (the "Software"), to deal in the
|
|
6
|
+
Software without restriction, including without
|
|
7
|
+
limitation the rights to use, copy, modify, merge,
|
|
8
|
+
publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software
|
|
10
|
+
is furnished to do so, subject to the following
|
|
11
|
+
conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice
|
|
14
|
+
shall be included in all copies or substantial portions
|
|
15
|
+
of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
|
18
|
+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
|
19
|
+
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
20
|
+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
|
21
|
+
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
22
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
23
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
|
24
|
+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
25
|
+
DEALINGS IN THE SOFTWARE.
|