Generate synthetic flow cytometry data
Project description
: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:
- distribution shifts of populations
- example: T-cells have a higher marker value in postive subjects
- cell type composition
- example: positive subjects have a higher T-cell count
Installation
pip install -e .
# or 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
- FlowCyPy
- Cheung et al.: Systematic Design, Generation, and Application of Synthetic Datasets for Flow Cytometry (2022)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cytodatagen-1.0.2.tar.gz.
File metadata
- Download URL: cytodatagen-1.0.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd03f6f2a536b3c98a78024f67ecf366621c9cfc31414e415dba834938d658a0
|
|
| MD5 |
32faf178d33e73733b7c4c0d75e3af1c
|
|
| BLAKE2b-256 |
9c245ac206238de5ecdfca2c696fa32d0fac119fa1a951a1027b4601e7bafb78
|
Provenance
The following attestation bundles were made for cytodatagen-1.0.2.tar.gz:
Publisher:
pypi.yml on bckrlab/cytodatagen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cytodatagen-1.0.2.tar.gz -
Subject digest:
cd03f6f2a536b3c98a78024f67ecf366621c9cfc31414e415dba834938d658a0 - Sigstore transparency entry: 707620318
- Sigstore integration time:
-
Permalink:
bckrlab/cytodatagen@f96ac8f676ddd0d4730007d817d0a5a603345431 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/bckrlab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@f96ac8f676ddd0d4730007d817d0a5a603345431 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cytodatagen-1.0.2-py3-none-any.whl.
File metadata
- Download URL: cytodatagen-1.0.2-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14cc79a4ec7de49421e1111a2477a7c5e3160ee95517d8ac6cdce39dc231ce8c
|
|
| MD5 |
e9651d9c5ea095f5abd523d660563b47
|
|
| BLAKE2b-256 |
6ae6be041907843c15334bc860bcc45ab27920de3f3792f1b6b6dc3769485291
|
Provenance
The following attestation bundles were made for cytodatagen-1.0.2-py3-none-any.whl:
Publisher:
pypi.yml on bckrlab/cytodatagen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cytodatagen-1.0.2-py3-none-any.whl -
Subject digest:
14cc79a4ec7de49421e1111a2477a7c5e3160ee95517d8ac6cdce39dc231ce8c - Sigstore transparency entry: 707620322
- Sigstore integration time:
-
Permalink:
bckrlab/cytodatagen@f96ac8f676ddd0d4730007d817d0a5a603345431 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/bckrlab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@f96ac8f676ddd0d4730007d817d0a5a603345431 -
Trigger Event:
push
-
Statement type: