Skip to main content

catgranule

catGRANULE phase-separation propensity scoring, following Bolognesi et al. 2016, Cell Reports 16:222-231 ("A concentration-dependent liquid phase separation can cause toxicity upon increased protein expression").

This package re-implements the paper's scoring equations (Equation 1-2: six normalized physico-chemical propensities averaged over a centered heptapeptide window, plus a log-length term; Equation 3: granule strength). It is the scoring engine used by the PhaSePred re-build (phasepred package).

Scoring

from catgranule import score_sequence, score_batch

result = score_sequence("MGGYNNNNSS...")          # default: distilled surrogate
# {"single": ..., "residue": [...], "granule_strength": ...}
for row in score_batch(
    [{"accession": "P1", "sequence": "MGGY..."}, {"accession": "P2", "sequence": "MASS..."}]
):
    print(row["accession"], row["single"])
  • single — protein-level score. Default (distilled) route: the XGBoost surrogate's prediction of the PhaSePred web-archive catGRANULE value (absolute caliber). Formula routes (route="paper" / "legacy-unaudited"): the Z-normalized Equation-2 value. Pass normalized=False (or the CLI --raw flag) for the underlying raw Equation-2 / un-aligned values.
  • residue — residue-level profile: an interior sliding-window mean of the per-residue Equation-1 scores. The default window is 51 residues (radius 25), covering positions 25..L-26 (1-indexed) — length L-50 for L >= 51. This matches the PhaSePred web archive residue arrays. On the distilled route the profile is translated so its mean equals the surrogate single (per-protein affine alignment preserving the geometry).
  • granule_strength — mean of the positive profile values (Equation 3).

Command line

$ catgranule predict --fasta proteins.fasta --out json
$ catgranule predict --fasta proteins.fasta --out csv --raw --route paper
$ catgranule check

Weight selection precedence: --weights <path> > $CATGRANULE_WEIGHTS > --route (distilled default, paper, legacy-unaudited) > packaged default.

Weights and provenance

All scoring parameters live in replaceable JSON artifacts under src/catgranule/weights/ with a provenance block (route: distilled | paper | legacy-unaudited, source, date, optional gate):

  • distilled (default, mode="distilled"): an XGBoost surrogate trained on the PhaSePred web-archive human eval-pool (2022-02-11 snapshot) that predicts the archive single directly from 181 per-sequence features (pure sequence + numpy, no external tools). Gate on the archive holdout: Spearman rho=0.998961, median |delta|=0.0177 — accepted with gap by user decision D21 (2026-09-07). The serialized model ships inside the package (distilled_xgb_model.ubj).
  • paper (formula): the Bolognesi 2016 closed-form recipe — published coefficients + mmc1 Table S4 scales + yeast-proteome Z-normalization (recomputed n=5742, 2026-09-06). Alternate artifact (rho 0.9747 / delta 0.186, below gate); deterministic and tool-free.
  • legacy-unaudited (formula): the pre-S4 reconstruction (same formula, older yeast normalization); kept for continuity and comparisons.

The redistribution terms of the upstream catGRANULE sources do not apply: both artifacts are independent re-implementations of the published equations / a distillation of the lab's own web archive.

License

MIT.

Metadata

Release files for catgranule 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for catgranule 1.0.0
File Size Uploaded
catgranule-1.0.0.tar.gz 755.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for catgranule 1.0.0
File Interpreter ABI Platform
catgranule-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.5 MB

Release files / catgranule-1.0.0.tar.gz

Download URL catgranule-1.0.0.tar.gz
Size 755.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3470ef5c700f2691119a1f343ca0b2ee42017cc254883a3693c67db632c96806
BLAKE2b-256 checksum
How to use checksums
49e9d614e655f482111b711ed0028572afbd38c4d9661c92a6b1bbea5ab38af1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / catgranule-1.0.0-py3-none-any.whl

Download URL catgranule-1.0.0-py3-none-any.whl
Size 772.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec955248e48e12ed6431aa6afe039f4638b8550011535757bc98ff51931e9d5c
BLAKE2b-256 checksum
How to use checksums
16271d89e661f8722ae15adfd978ac2e4b5cf922bcb67d5fec392c18d06de2b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

1.0.1

2 release files

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page