Skip to main content

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:

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) docs
Scoring, INFOG normalization, GDR, co-specificity, motif scanning (pp.scan_motifs), motif/genome loaders PIASO (piaso-tools) piaso.org · PyPI
Streaming on-disk backend cytome docs · PyPI
Marker specificity scoring COSG PyPI · R

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.1

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

Source distribution (sdist)

Source distribution for cytorete 0.1.1
File Size Uploaded
cytorete-0.1.1.tar.gz 50.1 kB Details

Built distribution (wheel)

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

Total release size: 96.3 kB

Release files / cytorete-0.1.1.tar.gz

Download URL cytorete-0.1.1.tar.gz
Size 50.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ca1d18e0b5be29e4fdb6c3e7fe7c0286b4e24f7986a7f50ce3385c7665516a82
BLAKE2b-256 checksum
How to use checksums
4b4bcd317be0a5b980c985bca2b7d7dcbcd284bae9ba5d4a32fa05e9f0147821
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

Release files / cytorete-0.1.1-py3-none-any.whl

Download URL cytorete-0.1.1-py3-none-any.whl
Size 46.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
edf153b8e3df86234a1481e05c87acd18ed9af655e5c493e6943408f97e8eebe
BLAKE2b-256 checksum
How to use checksums
cbe99b5b63e242e9bc7e51f77705dc809cc470152866eb8d7a22fca29d2991bb
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

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

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