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. Passnormalized=False(or the CLI--rawflag) 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 positions25..L-26(1-indexed) — lengthL-50forL >= 51. This matches the PhaSePred web archive residue arrays. On the distilled route the profile is translated so its mean equals the surrogatesingle(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 archivesingledirectly from 181 per-sequence features (pure sequence + numpy, no external tools). Gate on the archive holdout: Spearmanrho=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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| catgranule-1.0.1.tar.gz | 756.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| catgranule-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.5 MB
Release files / catgranule-1.0.1.tar.gz
| Download URL | catgranule-1.0.1.tar.gz |
|---|---|
| Size | 756.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
473f263ca7e9949482c23dcb563c83b64ca62c9a2001a35772ef03e6b2b1a21e
|
|
BLAKE2b-256 checksum How to use checksums |
2b0c21c485118cc0fb2afcb70ac1d4302b1895fed1f6438378c0e72038264a68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.12
|
Release files / catgranule-1.0.1-py3-none-any.whl
| Download URL | catgranule-1.0.1-py3-none-any.whl |
|---|---|
| Size | 772.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fa8d195941eb334d8180eba8decb4e01ce4c18ff877f2fe5863dcbd0632b2e0f
|
|
BLAKE2b-256 checksum How to use checksums |
b6993e640c6a7abb472b580aea3cee3655421a24334d9bcc95cb70dac27e30fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.12
|