Skip to main content

Project generated with PyScaffold

:warning: cytodatagen takes a very naive approach to generate cytometry data. You might want to checkout FlowCyPy instead! FlowCyPy attempts to generate realistic SSC and FSC signals by regarding the fluiddynamics, optics and electronics of a flow cytometer. However, at the time of writing, FlowCyPy didn't yet support generating flourescence signals.

cytodatagen

Generate synthetic cytometry data for classification tasks

This package provides tools to generate synthetic flow cytometry/CyTOF data for classification tasks. Supported formats are fcs and h5ad.

The synthetic data generated with cytodatagen assumes that subjects differ either in:

  1. distribution shifts of populations
    • example: T-cells have a higher marker value in postive subjects
  2. cell type composition
    • example: positive subjects have a higher T-cell count

pairplot

t-SNE

Installation

# install via pip
pip install cytodatagen

# or install from source
pip install -e .

# install with extras for jupyter notebooks
pip install -e .[notebook]

Usage

The package provides a CLI:

# display help message
python -m cytodatagen.cli.subjects --help

# generate subjects.json configuration file and adjust it later
python -m cytodatagen.cli.subjects config/cli/subjects/config.json -o artifacts/subjects.json --seed 19

# display help message
python -m cytodatagen.cli.data --help

# generate data from command line
python -m cytodatagen.cli.data -o artifacts/cytodata --format fcs

python -m cytodatagen.cli.data -o artifacts/demo --format h5ad --subjects config/cli/data/subjects.json --transforms config/cli/data/transforms.json --seed 19

Look at the scripts scripts/make_subjects.sh and scripts/make_data.sh for more examples.

Related

Acknowledgements

Thanks to the FlowKit and anndata team.

Note

This project has been set up using PyScaffold 4.6. For details and usage information on PyScaffold see https://pyscaffold.org/.

Metadata

Release files for cytodatagen 1.0.5

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

Source distribution (sdist)

Source distribution for cytodatagen 1.0.5
File Size Uploaded
cytodatagen-1.0.5.tar.gz 2.0 MB Details

Built distribution (wheel)

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

Total release size: 2.0 MB

Release files / cytodatagen-1.0.5.tar.gz

Download URL cytodatagen-1.0.5.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
f897279654afac714a6a4a1e4570d19b49ffa6c44dcaf034454c193c719a25ce
BLAKE2b-256 checksum
How to use checksums
c1f4e08863338eeba6ca44b540ec0dbf9c4f91ef7206ce1f9d92b609a6414fa8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Nov 18, 2025.

Transparency log

Release files / cytodatagen-1.0.5-py3-none-any.whl

Download URL cytodatagen-1.0.5-py3-none-any.whl
Size 18.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f873586a24664cd9515d2bdbd816ab71cfb690f90e7780358a9cca8f61aeb4d
BLAKE2b-256 checksum
How to use checksums
7d1475b05ed76b820eb0dcf297dd8439187b165f28600d66b3277063a463ff97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Nov 18, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

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