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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ jobs:
- uses: actions/checkout@v5
# RAVEN is GPL and this package is MIT, so its files are never vendored
# here -- the cross-language checks read them from a checkout instead.
# develop3 is the branch raven-docs documents and raven-toolbox tracks.
# develop is the RAVEN branch raven-docs documents and raven-toolbox tracks.
- name: Check out MATLAB RAVEN
uses: actions/checkout@v5
with:
repository: SysBioChalmers/RAVEN
ref: develop3
repository: CompMetEng/RAVEN
ref: develop
path: .raven
- uses: actions/setup-python@v6
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/parity-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
name: genome-scale parity
# Forks do not have the secrets, and a scheduled run there would fail every
# night for no reason.
if: github.repository == 'SysBioChalmers/raven-toolbox'
if: github.repository == 'CompMetEng/raven-toolbox'
runs-on: ubuntu-latest
# Measured against the classic INIT MILP this job used to check (now
# ftINIT's run_ftinit, bounded to time_limit=600s -- see
Expand All @@ -51,8 +51,8 @@ jobs:
- name: Check out MATLAB RAVEN
uses: actions/checkout@v5
with:
repository: SysBioChalmers/RAVEN
ref: develop3
repository: CompMetEng/RAVEN
ref: develop
path: .raven

- uses: actions/setup-python@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
# Trusted Publishing: PyPI verifies this workflow's OIDC identity, so no
# long-lived token is stored in the repo. Requires a one-time publisher on
# PyPI for raven-toolbox with:
# owner: SysBioChalmers repo: raven-toolbox
# owner: CompMetEng repo: raven-toolbox
# workflow: release.yml environment: pypi
environment: pypi
permissions:
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Changelog

Milestones in the raven-toolbox port. For function-level status see
[docs/raven_migration.md](https://github.com/SysBioChalmers/raven-toolbox/blob/develop/docs/reference/migration.md); for open work see
[docs/todo.md](https://github.com/SysBioChalmers/raven-toolbox/blob/develop/docs/reference/todo.md).
[docs/raven_migration.md](https://github.com/CompMetEng/raven-toolbox/blob/develop/docs/reference/migration.md); for open work see
[docs/todo.md](https://github.com/CompMetEng/raven-toolbox/blob/develop/docs/reference/todo.md).

## 3.0.0b1 — 2026-09-07

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ automatically; that side is documented in

Publishing the results, and the versioning model behind the releases, is a shared
convention rather than a raven-toolbox concern, and is documented in
[raven-gecko-parity](https://github.com/SysBioChalmers/raven-gecko-parity/blob/develop/docs/publishing_artefacts.md).
[raven-gecko-parity](https://github.com/CompMetEng/raven-gecko-parity/blob/develop/docs/publishing_artefacts.md).

## Rebuilding the KEGG artefacts

Expand Down
6 changes: 3 additions & 3 deletions IMPROVEMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ made smarter/faster, or where a logical gap in RAVEN's feature set is worth fill
change — with enough detail that it can **also be back-ported to MATLAB RAVEN** later.

> **Implemented improvements** — and the ones worth carrying upstream into MATLAB RAVEN — now live
> in [matlab_raven_backports.md](https://github.com/SysBioChalmers/raven-toolbox/blob/develop/docs/reference/matlab_raven_backports.md),
> in [matlab_raven_backports.md](https://github.com/CompMetEng/raven-toolbox/blob/develop/docs/reference/matlab_raven_backports.md),
> the MATLAB ↔ raven-toolbox **differences** record (both directions: improvements to back-port, and
> functionality MATLAB has that raven-toolbox deliberately doesn't). **This file** keeps only the
> design decisions behind what was ported *differently* or *not at all*, and the improvements still
Expand Down Expand Up @@ -92,7 +92,7 @@ several places — and ask before re-adding (see process note: argue pros/cons f
### removeReactions — not ported (orphan cleanup kept coupled)

`remove_metabolites` / `remove_genes` are ported
([manipulation/remove.py](https://github.com/SysBioChalmers/raven-toolbox/blob/develop/src/raven_toolbox/manipulation/remove.py)).
([manipulation/remove.py](https://github.com/CompMetEng/raven-toolbox/blob/develop/src/raven_toolbox/manipulation/remove.py)).
`removeReactions` was **not** ported: with orphan cleanup kept coupled (decision: don't separate
metabolites from genes), it is identical to `cobra.Model.remove_reactions(remove_orphans=...)`.
Separable orphan-met vs orphan-gene cleanup (**R1**, ❌ rejected) was considered then dropped — keep
Expand Down Expand Up @@ -127,7 +127,7 @@ OR-of-AND-complex (DNF) form (`findPotentialErrors`). **Decision (raven-toolbox)
only.** cobra auto-normalizes a GPR on assignment (`"(G1 AND G2) OR G3"` is stored as
`"(G1 and G2) or G3"`), so the normalization half is redundant. The non-DNF lint has no cobra
equivalent and was ported as `find_non_dnf_grrules`/`is_dnf`
([utils/gpr.py](https://github.com/SysBioChalmers/raven-toolbox/blob/develop/src/raven_toolbox/utils/gpr.py)).
([utils/gpr.py](https://github.com/CompMetEng/raven-toolbox/blob/develop/src/raven_toolbox/utils/gpr.py)).

### readYAMLmodel — no separate legacy parser needed

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# raven-toolbox

[![CI](https://github.com/SysBioChalmers/raven-toolbox/actions/workflows/ci.yml/badge.svg)](https://github.com/SysBioChalmers/raven-toolbox/actions/workflows/ci.yml)
[![CI](https://github.com/CompMetEng/raven-toolbox/actions/workflows/ci.yml/badge.svg)](https://github.com/CompMetEng/raven-toolbox/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/raven-toolbox.svg)](https://pypi.org/project/raven-toolbox/)

**Reconstruction, Analysis and Visualisation of Metabolic Networks — in Python.**

`raven-toolbox` is the Python counterpart of the
[RAVEN Toolbox](https://github.com/SysBioChalmers/RAVEN) (MATLAB). It builds on
[RAVEN Toolbox](https://github.com/CompMetEng/RAVEN) (MATLAB). It builds on
[**cobrapy**](https://github.com/opencobra/cobrapy) for everything cobrapy already does
well — simulation, standard analyses, SBML I/O, model manipulation — and adds the
functionality that is unique to RAVEN:
Expand Down Expand Up @@ -41,7 +41,7 @@ COBRA ecosystem.
## Status

**raven-toolbox 3.0.0b1** is out — the first beta toward 3.0, tracking the upcoming MATLAB
RAVEN 3.0 beta ([release notes](https://github.com/SysBioChalmers/raven-toolbox/releases/tag/v3.0.0b1),
RAVEN 3.0 beta ([release notes](https://github.com/CompMetEng/raven-toolbox/releases/tag/v3.0.0b1),
[changelog](CHANGELOG.md)). It has been validated against MATLAB RAVEN on **Human-GEM** (5 Hart2015
cell-line models, Jaccard 0.975–0.980 — see
[the Human-GEM validation study](https://github.com/edkerk/raven-docs/blob/main/docs/parameter-tuning/studies/humangem-validation.md)
Expand Down Expand Up @@ -75,7 +75,7 @@ pip install --pre raven-toolbox
To work against the unreleased code on `develop` instead, install from git:

```bash
git clone https://github.com/SysBioChalmers/raven-toolbox
git clone https://github.com/CompMetEng/raven-toolbox
cd raven-toolbox
pip install -e ".[dev]"
```
Expand Down Expand Up @@ -123,12 +123,12 @@ site is generated from the docstrings here at build time, so a docstring edit
reaches the site without anything being copied across. Contributor and maintainer
notes are in [CONTRIBUTING.md](CONTRIBUTING.md); the roadmap, the backlog and the
MATLAB parity record are in
[raven-gecko-parity](https://github.com/SysBioChalmers/raven-gecko-parity).
[raven-gecko-parity](https://github.com/CompMetEng/raven-gecko-parity).

## Relationship to MATLAB RAVEN

`raven-toolbox` is an independent Python reimplementation of the
[RAVEN Toolbox](https://github.com/SysBioChalmers/RAVEN), released under the permissive
[RAVEN Toolbox](https://github.com/CompMetEng/RAVEN), released under the permissive
**MIT** license. If you use it in scientific work, please cite the RAVEN 2 paper:

> Wang H, Marcišauskas S, Sánchez BJ, Domenzain I, Hermansson D, Agren R, Nielsen J,
Expand Down
2 changes: 1 addition & 1 deletion data/manifest.schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/SysBioChalmers/raven-toolbox/manifest.schema.json",
"$id": "https://github.com/CompMetEng/raven-toolbox/manifest.schema.json",
"title": "RAVEN data/binary manifest",
"description": "Language-agnostic registry of downloadable raven-toolbox / RAVEN data artefacts and external binary bundles. Consumed by the Python resolvers (raven_toolbox.data / raven_toolbox.binaries) and by MATLAB RAVEN. Every file carries a SHA256 so consumers verify integrity after download.",
"type": "object",
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ excel = [
raven-toolbox-binaries = "raven_toolbox.binaries_cli:main"

[project.urls]
Homepage = "https://github.com/SysBioChalmers/raven-toolbox"
Source = "https://github.com/SysBioChalmers/raven-toolbox"
Issues = "https://github.com/SysBioChalmers/raven-toolbox/issues"
"RAVEN MATLAB" = "https://github.com/SysBioChalmers/RAVEN"
Homepage = "https://github.com/CompMetEng/raven-toolbox"
Source = "https://github.com/CompMetEng/raven-toolbox"
Issues = "https://github.com/CompMetEng/raven-toolbox/issues"
"RAVEN MATLAB" = "https://github.com/CompMetEng/RAVEN"

[tool.hatch.build.targets.wheel]
packages = ["src/raven_toolbox"]
Expand Down
10 changes: 5 additions & 5 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ Release-time tooling. Not part of the installed package — run them from a chec
with raven-toolbox installed (`pip install -e .`). End users never need these.

The full publish workflow (build → upload → manifest → sync) is documented in
[artefact_hosting.md](https://github.com/SysBioChalmers/raven-gecko-parity/blob/main/docs/artefact_hosting.md)
[artefact_hosting.md](https://github.com/CompMetEng/raven-gecko-parity/blob/develop/docs/artefact_hosting.md)
(raven-gecko-parity).

The localisation/DeepLoc benchmark scripts (`benchmark_deeploc*.py`,
`compare_predictlocalization.py`, `benchmark_certified_*.py`, `benchmark_vs_carvefungi.py`,
`build_carvefungi_yeast_model.py`, `compare_localization_sources.py`,
`extract_compartment_structure.py`, `finetune_localization_yeast.py`,
`benchmark_replicate_yeast_gem.py`) expect their input/output data under `data/deeploc/`,
which lives in [raven-gecko-parity](https://github.com/SysBioChalmers/raven-gecko-parity/tree/develop/data/deeploc) —
which lives in [raven-gecko-parity](https://github.com/CompMetEng/raven-gecko-parity/tree/develop/data/deeploc) —
fetch it there first. The write-ups that use these scripts are in
[raven-gecko-parity/docs/localization/](https://github.com/SysBioChalmers/raven-gecko-parity/tree/develop/docs/localization).
[raven-gecko-parity/docs/localization/](https://github.com/CompMetEng/raven-gecko-parity/tree/develop/docs/localization).

## `build_binary_bundles.py`

Build the per-platform binary ZIPs (BLAST+/DIAMOND/HMMER) from RAVEN's vetted
`software/` binaries (pinned commits) into `dist/binaries/`, with checksums and
provenance. See [maintaining_binaries.md](https://github.com/SysBioChalmers/raven-gecko-parity/blob/main/docs/maintaining_binaries.md)
provenance. See [maintaining_binaries.md](https://github.com/CompMetEng/raven-gecko-parity/blob/develop/docs/maintaining_binaries.md)
(raven-gecko-parity).

```bash
Expand All @@ -43,7 +43,7 @@ python scripts/publish_to_raven_data.py --dry-run release --tag manifest-v1 data
Build the publishable KEGG artefact set from an arranged KEGG dump (see
`download_kegg_dump`): the gzipped-YAML reference model, the gzipped-TSV tables,
and (with `--hmms`) the per-domain pressed HMM libraries. Output is laid out ready
to upload as release assets. See [maintaining_kegg_data.md](https://github.com/SysBioChalmers/raven-gecko-parity/blob/main/docs/maintaining_kegg_data.md)
to upload as release assets. See [maintaining_kegg_data.md](https://github.com/CompMetEng/raven-gecko-parity/blob/develop/docs/maintaining_kegg_data.md)
(raven-gecko-parity).

```bash
Expand Down
2 changes: 1 addition & 1 deletion src/raven_toolbox/analysis/differential_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
changed, or they moved in opposite directions.

``analyzeSampling.m`` calls ``getFluxZ.m`` directly and cannot be usefully
ported without it (SysBioChalmers/raven-gecko-parity#41), so both are ported
ported without it (CompMetEng/raven-gecko-parity#41), so both are ported
together here.

Sample orientation is *samples × reactions* (rows are samples, columns are
Expand Down
4 changes: 2 additions & 2 deletions src/raven_toolbox/binaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
→ FileNotFoundError with install guidance

So a pre-installed/conda binary always wins; the bundled ZIP is the zero-setup
fallback. See https://github.com/SysBioChalmers/raven-gecko-parity/blob/main/docs/maintaining_binaries.md
fallback. See https://github.com/CompMetEng/raven-gecko-parity/blob/develop/docs/maintaining_binaries.md
for how the release ZIPs and the registry are produced and updated.
"""
from __future__ import annotations
Expand All @@ -26,7 +26,7 @@
# Keyed by *bundle*; one bundle can provide several executables (e.g. "blast" ->
# blastp + makeblastdb). Baked snapshot of data/manifest.json's `binaries` block —
# regenerate from the manifest with `python scripts/make_registry_snippet.py sync`
# (never hand-edit). See https://github.com/SysBioChalmers/raven-gecko-parity/blob/main/docs/maintaining_binaries.md.
# (never hand-edit). See https://github.com/CompMetEng/raven-gecko-parity/blob/develop/docs/maintaining_binaries.md.
# bundle -> {version, provides:[exe...], platforms:{"<os>-<arch>": {url, sha256}}}
_REGISTRY: dict = {
"blast": {
Expand Down
4 changes: 2 additions & 2 deletions src/raven_toolbox/binaries_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
unless ``--force-download`` is given. Tools with no bundle for this OS/arch
(e.g. MAFFT/CD-HIT on native Windows) are reported as unavailable with a
conda/WSL2 hint — see
https://github.com/SysBioChalmers/raven-gecko-parity/blob/main/docs/maintaining_binaries.md.
https://github.com/CompMetEng/raven-gecko-parity/blob/develop/docs/maintaining_binaries.md.
"""
from __future__ import annotations

Expand Down Expand Up @@ -82,7 +82,7 @@ def main(argv: list[str] | None = None) -> int:
f"{', '.join(r.executable for r in unavailable)}.\n"
"Install them via conda (`conda install -c bioconda <tool>`) or, on "
"native Windows for HMMER/MAFFT/CD-HIT, run inside WSL2 (see "
"https://github.com/SysBioChalmers/raven-gecko-parity/blob/main/docs/maintaining_binaries.md)."
"https://github.com/CompMetEng/raven-gecko-parity/blob/develop/docs/maintaining_binaries.md)."
)
if errors:
print(f"\n{len(errors)} download(s) failed:")
Expand Down
2 changes: 1 addition & 1 deletion src/raven_toolbox/confidence.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"non-growth associated maintenance reaction", and a name regex must never silence a chemistry check.

The design and the measured yeast-GEM distributions are in the `confidence tracking study
<https://github.com/SysBioChalmers/raven-gecko-parity/blob/develop/docs/localization/confidence_tracking.md>`_ on raven-gecko-parity; the
<https://github.com/CompMetEng/raven-gecko-parity/blob/develop/docs/localization/confidence_tracking.md>`_ on raven-gecko-parity; the
facet set above is closed. Wire it in by calling :func:`score_localization_confidence` on an
:class:`~raven_toolbox.localization.AssignmentProposal`, :func:`score_equation_confidence` and
:func:`score_gene_association_confidence` on any model, and :func:`mark_curated` when a curator firmly
Expand Down
6 changes: 3 additions & 3 deletions src/raven_toolbox/localization/certify.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
that cannot grow is never reported as if it could.

See the `compartment-assignment redesign
<https://github.com/SysBioChalmers/raven-gecko-parity/blob/develop/docs/localization/localization_redesign.md>`_ on raven-gecko-parity for the design rationale.
<https://github.com/CompMetEng/raven-gecko-parity/blob/develop/docs/localization/localization_redesign.md>`_ on raven-gecko-parity for the design rationale.
"""
from __future__ import annotations

Expand Down Expand Up @@ -473,7 +473,7 @@ def _enrich_multilocalization(model, proposal, scores, sc, conditions, default_c

The scalable, ghost-free replacement for the in-MILP ``aF``/``aR`` machinery (see
`multi-localisation design
<https://github.com/SysBioChalmers/raven-gecko-parity/blob/develop/docs/localization/multi_localization_design.md>`_): propose, for each placed reaction, a second
<https://github.com/CompMetEng/raven-gecko-parity/blob/develop/docs/localization/multi_localization_design.md>`_): propose, for each placed reaction, a second
compartment its gene has DeepLoc evidence for (score ``>= threshold``); materialise every candidate
as a duplicate; then keep only those a **loopless FVA** shows can carry flux ``>= eps`` in a
biomass-supporting solution. A dead duplicate (which would harvest a compartment's score for free)
Expand Down Expand Up @@ -581,7 +581,7 @@ def assign_compartments(
Placement is decided by a flux-free score MILP, and functionality is a separate,
materialised-FBA-verified repair (see the module docstring and
the `compartment-assignment redesign
<https://github.com/SysBioChalmers/raven-gecko-parity/blob/develop/docs/localization/localization_redesign.md>`_ on raven-gecko-parity). Notable parameters:
<https://github.com/CompMetEng/raven-gecko-parity/blob/develop/docs/localization/localization_redesign.md>`_ on raven-gecko-parity). Notable parameters:

``transport_cost``
Accepted for signature compatibility but **not used**: the placement master is flux-free and
Expand Down
2 changes: 1 addition & 1 deletion src/raven_toolbox/localization/curation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
thousands of calls and review only the highest-value few percent. It is a post-processor — no new solve
except an optional gated essentiality FBA — combining several cheap signals that each flag a *distinct*
way a placement can be wrong. See the `curation-priority signals study
<https://github.com/SysBioChalmers/raven-gecko-parity/blob/develop/docs/localization/curation_priority_signals.md>`_ on raven-gecko-parity for the full catalogue;
<https://github.com/CompMetEng/raven-gecko-parity/blob/develop/docs/localization/curation_priority_signals.md>`_ on raven-gecko-parity for the full catalogue;
this ships the recommended first composite:

* **override** — the reaction was placed *against* its gene's top DeepLoc compartment, and that top
Expand Down
4 changes: 2 additions & 2 deletions src/raven_toolbox/localization/scores.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def load_deeploc(path: str | Path, *,
compartment ids (post-``compartment_map``). **Only the mitochondrial split (`m`/`mm`) is supported
by the evidence** (matrix-vs-membrane AUC ~0.92); DeepLoc does *not* separate ER lumen from
membrane, so do not add `er`/`erm`. See the `DeepLoc yeast-GEM benchmark
<https://github.com/SysBioChalmers/raven-gecko-parity/blob/develop/docs/localization/deeploc_yeast_benchmark.md>`_ on raven-gecko-parity.
<https://github.com/CompMetEng/raven-gecko-parity/blob/develop/docs/localization/deeploc_yeast_benchmark.md>`_ on raven-gecko-parity.

``keep_raw_confidence=True`` attaches the per-gene *pre-normalisation* top probability to
:attr:`LocalizationScores.raw_confidence` (normalisation otherwise forces every top to 1.0). It
Expand All @@ -195,7 +195,7 @@ def load_deeploc(path: str | Path, *,
a 0.40 one), so leaving them un-normalised lets a downstream assignment weight confident genes
more heavily; the default ``True`` preserves the RAVEN ``parseScores`` convention and keeps
multi-source scales comparable. See the `DeepLoc normalisation benchmark
<https://github.com/SysBioChalmers/raven-gecko-parity/blob/develop/docs/localization/deeploc_normalisation_benchmark.md>`_ on raven-gecko-parity.
<https://github.com/CompMetEng/raven-gecko-parity/blob/develop/docs/localization/deeploc_normalisation_benchmark.md>`_ on raven-gecko-parity.
"""
raw = pd.read_csv(path)
wide = _wide_mapped(raw, id_column=None, compartment_map=compartment_map, source=str(path))
Expand Down
2 changes: 1 addition & 1 deletion src/raven_toolbox/localization/transport_evidence.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
:func:`annotate_transporters` takes a pre-computed table instead. Substrate matching is *coarse-first*
(family → coarse class), with a finer per-substrate ChEBI layer available via ``ontology``. See
the `evidence-aware transport scoring design
<https://github.com/SysBioChalmers/raven-gecko-parity/blob/develop/docs/localization/transport_evidence_scoring.md>`_ on raven-gecko-parity for the full design.
<https://github.com/CompMetEng/raven-gecko-parity/blob/develop/docs/localization/transport_evidence_scoring.md>`_ on raven-gecko-parity for the full design.
"""
from __future__ import annotations

Expand Down
Loading
Loading