Skip to main content

Peeters

DOI

FlowSOM on a gated flow cytometry population over many FCS files, and differential abundance between conditions, drawn on the FlowSOM tree and as a node heatmap.

Named after Clara Peeters (1594 to after 1657), the Antwerp painter of still lifes.

pip install peeters

What it does

  1. Gate each file as an ALN gating file (*.gating.yaml, format aln-gating/1) says: the same compensation, scales and gates as ALN's own engine, so the counts are ALN's counts. Files that are already gated can be given without a gating.
  2. Cluster the population with FlowSOM: trained on the same number of cells from every file, then every cell of every file mapped onto the tree.
  3. Count each file's share of every node and metacluster, and the medians of every marker.
  4. Compare two groups of files per node or metacluster, as FlowSOM's GroupStats does: per-file shares, Mann-Whitney test, Benjamini-Hochberg; or two parts of the same samples, paired (Wilcoxon signed-rank on the per-sample log2 ratios). A node is tested only with enough cells behind its shares (min_events, 20 by default).
  5. Draw it: the tree with a coloured band around every node that differs, and a node heatmap with each node as high as its share and a strip per comparison.

Use

from peeters import run, differential, plot_differential, node_heatmap

res = run("gating/liver.gating.yaml", "CD45+",
          markers=["CD11b", "F4/80", "CD64", "Tim4", "Clec4f", "Vsig4", "Clec2", "Ly6C"],
          extra=["CD45.1", "CD45.2"],          # reported per metacluster, not clustered on
          samples="samples.csv", by="genotype", metaclusters=12, seed=42, out="flowsom")

nodes = differential(res, "genotype", ("WT", "KO"))                  # reference first
mcs = differential(res, "genotype", ("WT", "KO"), level="metaclusters")
plot_differential(res, nodes)                                        # the tree with bands

exp1 = differential(res, "genotype", ("WT", "KO"), where={"cohort": "Exp1"})
exp2 = differential(res, "genotype", ("WT", "KO"), where={"cohort": "Exp2"})
node_heatmap(res, [exp1, exp2], names={6: "KC-like"})                # a strip per cohort

Two populations in the same sample (a competitive chimera, a reporter, two guides): parts counts each on one tree, and paired compares them sample by sample, so each sample's own mixture cancels out:

res = run("gating/chimera.gating.yaml", "Donor", markers,
          parts={"WT": "WT donor", "EM3": "EM3 donor"}, samples="samples.csv")
d3 = differential(res, "part", ("WT", "EM3"), paired="source_file", where={"day": "D3"},
                  call="consistent")    # 5 mice: every mouse the same way (no q < 0.05 exists)
d14 = differential(res, "part", ("WT", "EM3"), paired="source_file", where={"day": "D14"},
                   call="consistent")
node_heatmap(res, [d3, d14])            # a strip per day; a dark bar where a node differs

run writes files.csv, metaclusters.csv, nodes.csv, metacluster_medians.csv, file_medians.csv, params.json, model.pkl and the tree, heatmap and composition figures; load(folder) reads a run back without training again.

Citing

Cite peeters with its DOI and the version you used, and FlowSOM:

Saelens W. peeters (version 0.1.2). Zenodo. doi:10.5281/zenodo.24524300

The DOI stays the same across versions and always leads to the latest; each version also has a DOI of its own on its Zenodo page, for pinning an exact archive.

  • Van Gassen S, et al. FlowSOM: Using self-organizing maps for visualization and interpretation of cytometry data. Cytometry A 87, 636-645 (2015). doi:10.1002/cyto.a.22625
  • Quintelier K, et al. Analyzing high-dimensional cytometry data using FlowSOM. Nat Protoc 16, 3775-3801 (2021). doi:10.1038/s41596-021-00550-0

GitHub's Cite this repository (from CITATION.cff) gives the same.

Release

./dist.sh <version> from a clean, pushed main: tags, builds, makes the GitHub release, publishes to PyPI (~/.secrets/pypi.env) and archives the version on Zenodo under the DOI of CITATION.cff (scripts/zenodo_release.py, ~/.secrets/zenodo.env).

Metadata

Release files for peeters 0.1.4

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

Source distribution (sdist)

Source distribution for peeters 0.1.4
File Size Uploaded Provenance Actions
peeters-0.1.4.tar.gz 44.5 kB Without provenance Details for peeters-0.1.4.tar.gz

Built distribution (wheel)

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

Total release size: 79.9 kB

Release files / peeters-0.1.4.tar.gz

Download URL peeters-0.1.4.tar.gz
Size 44.5 kB
Tags Source
SHA-256 checksum
How to use checksums
db435b771db48b2047e9ce4ebc27785aec79afcf05527fc22e7fd81bbd6c8104
BLAKE2b-256 checksum
How to use checksums
2027db74fd41ddebc4c061b0023abbb9b862c073944e8834db2a26f5e3a562dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"AlmaLinux","version":"9.9","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / peeters-0.1.4-py3-none-any.whl

Download URL peeters-0.1.4-py3-none-any.whl
Size 35.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a249967dbb2538bf88b4bc637b3a71852360cce66baaaa39eea5b2856e7e326
BLAKE2b-256 checksum
How to use checksums
5d7aac9228a6578cc8c9be3dfa7626c799380056b911eeb163be96ccf0b71bff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"AlmaLinux","version":"9.9","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for peeters 0.1.4

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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