cytorete
Cell-type-resolved inference of gene regulatory networks and their dynamics.
The name
cytorete = cyto- + rete, "the cell's network" — Ancient Greek κύτος (kýtos), the combining form for cell, and Latin rēte, "net", the word anatomy already uses in rete mirabile and rete testis.
Pronounced sy-toh-REE-tee (/ˌsaɪtoʊˈriːtiː/) — rete keeps its two-syllable English anatomical sound, not a one-syllable "reet".
What this package does
cytorete infers cell-type-resolved gene regulatory networks (GRNs) from single-cell data, combining COSG-derived co-specificity, marker-gene dimensionality reduction (GDR), and motif-cistrome evidence into TF→gene regulons with per-cell-type activity.
It is built on the PIASO single-cell stack (a one-directional dependency,
cytorete → piaso-tools): it reuses PIASO's public API for scoring, GDR,
co-specificity, motif scanning (Rust-accelerated), and the cytome streaming
backend, so it scales from small AnnData objects to atlas-scale on-disk
cytomes.
This release ships the RNA regulon workflow, end to end:
promoter cistrome →
inferRegulon→regulonActivity/regulonSpecificity→ plots
The multiome (RNA+ATAC) GRN chain, the ATAC TF-activity chain and the peak
cistrome are not part of this distribution. Their names exist in the package
and raise an ImportError at call time saying so, rather than failing at
import — so import cytorete behaves the same either way.
Installation
pip install cytorete # pulls piaso-tools, cosg, cytome
pip install "cytorete[motif]" # + py2bit for .2bit genome sequence extraction
Documentation
Tutorials live with the rest of the stack on piaso.org:
- RNA regulon inference — the end-to-end workflow
- Motif analysis — scanning and motif databases
cytorete shares PIASO's scoring, GDR and co-specificity, so its tutorials sit beside theirs rather than on a site of their own.
Quickstart
import cytorete as cr
# 1. Promoter cistrome: which TF motifs occur in each gene's promoter
cistrome = cr.pp.build_cistrome(promoter_seqs, tf_motif_map)
# 2. Regulons: motif evidence x trans co-specificity across cell types
regulons = cr.tl.inferRegulon(adata, groupby="cell_type", copy=True)
# 3. Per-cell-type activity and specificity
cr.tl.regulonActivity(adata, regulons)
spec = cr.tl.regulonSpecificity(adata, groupby="cell_type", copy=True)
# 4. Plots
cr.pl.plotRegulon(adata, regulon="SOX2")
inferRegulon and regulonSpecificity follow the scanpy convention: they
write in place and return None unless copy=True. regulonSpecificity
returns long-form results — pivot before passing them to a heatmap.
Both snake_case (infer_regulon) and camelCase (inferRegulon) names are
provided; camelCase matches piaso.tl for continuity.
Calling a name from a withheld chain tells you so at the call site:
>>> cr.inferGRN(ds)
ImportError: cytorete.inferGRN is not part of this distribution: it requires
the multiome (RNA+ATAC) GRN chain, which is not yet released. The RNA regulon
workflow (build_promoter_cistrome -> inferRegulon -> regulonActivity) is
fully available.
Relationship to PIASO
The dependency runs one way — cytorete → piaso-tools — and never back.
cytorete is deliberately not a dependency of PIASO, which would be a
packaging cycle.
| Concern | Lives in |
|---|---|
| Regulons, promoter cistrome, regulon activity & specificity, regulon plots | cytorete (this package) |
Scoring, INFOG normalization, GDR, co-specificity, motif scanning (pp.scan_motifs), motif/genome loaders |
PIASO (piaso-tools) |
| Streaming on-disk backend | Cytome |
| Marker specificity scoring | COSG |
The GRN entry points that used to live in piaso.tl remain there as thin
forwarders: each resolves cytorete at call time and, if it is not installed,
raises an ImportError pointing at pip install cytorete. They exist for
existing notebooks — new code should import cytorete directly.
License
BSD 3-Clause. Copyright (c) 2025, Min Dai.
Metadata
Release files for cytorete 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cytorete-0.1.0.tar.gz | 48.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cytorete-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 92.8 kB
Release files / cytorete-0.1.0.tar.gz
| Download URL | cytorete-0.1.0.tar.gz |
|---|---|
| Size | 48.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48479cf8a2cb231f0b8d22e60c91cf188967c950643a9166e3ce4fa6df71bec8
|
|
BLAKE2b-256 checksum How to use checksums |
4441055311f1dd4b2144e558aef425ad21f653f7b358bcbe0de13adcf070c27f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.
Transparency logRelease files / cytorete-0.1.0-py3-none-any.whl
| Download URL | cytorete-0.1.0-py3-none-any.whl |
|---|---|
| Size | 44.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a41ffd2440130e1cd9d10ecf8e884e42c81c23a0de77d73869ba9ee460d288a3
|
|
BLAKE2b-256 checksum How to use checksums |
19bfa2a5f3fce9f440917205bec6d540463bbd968252c6e269aeb669dccb6b25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.
Transparency log