Skip to content

partis 1.0.0: annotation, paired partitioning, selection metrics, and full per-base simulation - #49

Merged
briney merged 4 commits into
mainfrom
partis
Nov 20, 2026
Merged

briney merged 4 commits into
mainfrom
partis

Conversation

@briney

@briney briney commented Nov 20, 2026

Copy link
Copy Markdown
Member

Adds tools/partis: partis v1.0.30 (commit 40ff8e3), run from its source tree the way upstream's own image runs it, with the simulation stack the pip package leaves out: bpp-newlik's bppseqgen for the default per-base mutation model, and R 4.5.3 with TreeSim, TreeSimGM, geiger and MASS from a pinned CRAN snapshot (2026-04-23) for trees. CPU only, no network. It is one of the two simulation engines (with igor) for a planned comparison, so simulation is the part that matters most.

What the test checks (results/partis/1.0.0.txt, podman, --network none, about 70 s on two processes), every command in the skill, scored against the simulation's own truth:

  • simulates 20 IGH families from scratch; every family logs using bpp per-base mutation with path …/bpp-newlik/_build, and the trees come from TreeSim (with R removed, simulation fails rather than falling back)
  • parses that simulation to FASTA, then annotates it with AIRR output: 82 of 86 sequences get the true V gene, and 82 are mutated in V
  • partitions the same sequences single-chain: purity 1.000, completeness 0.965
  • simulates 10 more families from the parameters inferred in that run
  • simulates 80 paired families, then partitions the mixed FASTA using its pairing. Per chain, at least 85% of sequences must be kept (97% or more in every run), purity must be at least 0.95, completeness at least 0.75, and no chain may be less pure paired than alone; in the record IGK goes from 0.787 alone to 0.987 paired.
  • computes selection metrics (17 families), then parses to FASTA and AIRR (one row per sequence)

Changes to upstream, all in the Containerfile:

  • colored_traceback, which every partis program imports only to colour tracebacks, crashes the program under any TERM without a terminfo entry in the image, and pyxis passes the caller's TERM in. An empty module stands in for it.
  • A .pth file puts /opt/partis on the venv's path, so parse-output.py (a stub that imports partis) works.
  • bin/partis and parse-output.py run under python3 -I.

For the reviewer:

  • Upstream's CI never tests per-base or TreeSim simulation; this test is what covers that path.
  • partis infers parameters from the sample itself, and on small samples that inference is unstable. With 40 paired families (56 IGL sequences) it sometimes pruned a J gene, and 20% of IGH and IGL were lost; at 80 families (about 100 IGL) the losses stopped. The skill describes this, and the fixture is sized past it.
  • With --is-simu, partis's own comparison against the truth raises an exception when more than 5% of a light chain fails annotation. The test scores partitions itself instead.
  • The image is 8.3 GB, mostly the C++ toolchain, Boost and R.
  • Licences: partis GPLv3, Bio++ CeCILL, TreeSim GPL-2. The full source is in the image at /opt/partis.

🤖 Generated with Claude Code

briney and others added 4 commits November 20, 2026 11:36
…etrics, and simulates with per-base mutation along TreeSim trees, offline

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sequences for stable parameter inference

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-metric family count

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…no network

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@briney
briney merged commit ac004e3 into main Nov 20, 2026
2 checks passed
@briney
briney deleted the partis branch November 20, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant