Metadata-Version: 2.4
Name: biocomposer
Version: 0.1.4
Summary: LLM-wired bioinformatics pipeline orchestration over containerised tools
Project-URL: Documentation, https://mlberkeley.github.io/BioComposer-graph-based-orchestration-of-bioinformatics-tools-documentation/
Project-URL: Homepage, https://pypi.org/project/biocomposer/
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: python-dotenv
Requires-Dist: google-genai
Requires-Dist: google-generativeai
Requires-Dist: anthropic
Requires-Dist: openai
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: tomli; python_version < "3.11"
Requires-Dist: modal
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"

# biocomposer

Graph-based orchestration of bioinformatics tools.
Full documentation: https://mlberkeley.github.io/BioComposer-graph-based-orchestration-of-bioinformatics-tools-documentation/

# Setup (both local and Modal)

```
pip install biocomposer
mkdir inputs              # put your FASTA/PDB/etc. files here
mkdir run                 # holds your pipeline script
```

Create a `.env` file in your working directory with the API key(s) you use
(`GEMINI_API_KEY`, `GOOGLE_API_KEY`, `ANTHROPIC_API_KEY`, or `OPENAI_API_KEY`).

Create `run/run_pipeline.py` to define your pipeline.

# Running locally

Prerequisites: Docker installed and running, `bv` installed (`cargo install biov`).

```
biocomp run run/run_pipeline.py --env .env
```

Outputs go to `./results/`.

# Running on Modal

```
pip install modal
modal setup
biocomp run --modal run/run_pipeline.py --env .env
modal volume get biocomp results/fasttree_output_1/stdout/fasttree_stdout.txt ./fasttree_stdout.txt
```

# Flags

```
--env <path>      [both]  env file with API keys (default .env)
--clean           [both]  clear previous outputs first
--modal           [both]  run on Modal instead of locally
--gpu T4          [modal] GPU type (default A10G)
--memory 32768    [modal] sandbox memory in MB (default 8192)
--shell           [modal] drop into an interactive sandbox shell
```

# Overriding a tool's command

By default a node runs the tool's entrypoint binary with its registry args.
Override either when needed (slots like `{input}`/`{output}` map to the node's I/O):

```python
# run a different exposed binary instead of the entrypoint
g.add_node("trimal", entrypoint_override="readal")

# replace the argument template
g.add_node("colabfold", args_override="--num-recycle 0 {fasta} {output_dir}")

# both together (common for non-entrypoint binaries)
g.add_node("trimal", entrypoint_override="readal",
           args_override="-in {alignment} -out {trimmed} -fasta")
```
