Skip to main content

Generate synthetic flow cytometry data

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cytodatagen-1.0.4.tar.gz (2.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cytodatagen-1.0.4-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file cytodatagen-1.0.4.tar.gz.

File metadata

  • Download URL: cytodatagen-1.0.4.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cytodatagen-1.0.4.tar.gz
Algorithm Hash digest
SHA256 a18b3ea9d67ef10659b9e82766fdb8cec6914edbbb54ae4fd6bbd4fe24c7dfa5
MD5 4c077711b33cc680665b5b4c41f39949
BLAKE2b-256 72c12e26b3c80b60f5924e72a3237d96c5786f8cad1f8d36ef549fdea3c34bca

See more details on using hashes here.

Provenance

The following attestation bundles were made for cytodatagen-1.0.4.tar.gz:

Publisher: pypi.yml on bckrlab/cytodatagen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cytodatagen-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: cytodatagen-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cytodatagen-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 98a87dedca0693ec88c5cb3d631e08111a9f0ded26c4af1db6efad7cdb865215
MD5 c9dee6a7f0fcdc868b1e49746b65c7f0
BLAKE2b-256 776664e7319f6ad34131a344272d8d2521ccdc66723e6b52cef415c5dd3e861e

See more details on using hashes here.

Provenance

The following attestation bundles were made for cytodatagen-1.0.4-py3-none-any.whl:

Publisher: pypi.yml on bckrlab/cytodatagen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page