cellfish#
Personal single-cell helpers for scRNA-seq, scATAC-seq / multiome, and (later) spatial.
import cellfish as cf
cf.pl.setup_style()
cf.data.require_obs(adata, ["cell_type"])
cf.pl.embedding(adata, basis="X_umap", color="cell_type", palette=MY_PALETTE)
cf.pl.embedding(adata, basis="spatial", color="cell_type", palette=MY_PALETTE)
cf.io.write_h5_safe(adata, path)
What this package does#
Sanitize and write AnnData / MuData
Check
obs/obsm/var/ layersJoin paired modalities (RNA ↔ ATAC, later RNA ↔ spatial)
Publication plotting (
cf.pl.embedding, palettes, plot1cell, proportions, …)Thin wrappers around analysis tools under
ext/<tool>/
What it does not do#
QC, integration, peak calling, or spaceranger pipelines
Model training (leave that in notebooks / shell)
Project paths, paper palettes, or figure-specific panels
Those stay in the analysis repository.
Installation#
You need Python 3.11 or newer.
Editable install from a clone:
git clone https://github.com/xfchen0912/cellfish.git
cd cellfish
pip install -e ".[dev]"
Optional extras:
pip install -e ".[plot]" # marsilea dotplots, rich, fonttools
pip install -e ".[doc]" # Sphinx documentation
Latest development version:
pip install "git+https://github.com/xfchen0912/cellfish.git@main"
Release notes#
See the changelog.
Contact#
If you found a bug, please use the issue tracker.
Important resources#
Layout and design rules for cellfish.
Public functions under cf.io / cf.data / cf.pl.
Card catalog of cf.pl figures.
Install and a first cf.pl figure.
Gallery#
UMAP, t-SNE, PCA, or tissue — same function, change basis=.
Centroid indices with a matching right-hand legend.
Same UMAP, colored by Disease_Status.
KDE outlines for selected clusters on any embedding.
Stacked bars of cluster composition per sample.
Smooth ribbons of cell-type composition over a covariate.
Area chart of the same composition tables.
Half-violin, box, and strip for an obs metric or gene.
Mean bars with per-cell points on top.
Overlapping KDEs of a QC or expression metric.
Circular UMAP with metadata rings (no R / circlize).
Marsilea dotplot of mean expression × fraction detected.
Inspect a dict or named palette before passing palette=.