synomicsbench 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. synomicsbench-1.0.0/.claude/settings.local.json +7 -0
  2. synomicsbench-1.0.0/.github/workflows/ci.yml +46 -0
  3. synomicsbench-1.0.0/.github/workflows/deploy-docs.yml +39 -0
  4. synomicsbench-1.0.0/.gitignore +47 -0
  5. synomicsbench-1.0.0/LICENSE +21 -0
  6. synomicsbench-1.0.0/PKG-INFO +162 -0
  7. synomicsbench-1.0.0/README.md +119 -0
  8. synomicsbench-1.0.0/mkdocs.yml +84 -0
  9. synomicsbench-1.0.0/pyproject.toml +66 -0
  10. synomicsbench-1.0.0/src/synomicsbench/__init__.py +1 -0
  11. synomicsbench-1.0.0/src/synomicsbench/metrics/__init__.py +13 -0
  12. synomicsbench-1.0.0/src/synomicsbench/metrics/fidelity/BayesianComparison.py +356 -0
  13. synomicsbench-1.0.0/src/synomicsbench/metrics/fidelity/MissingValueSimilarity.py +32 -0
  14. synomicsbench-1.0.0/src/synomicsbench/metrics/fidelity/PairwiseSimilarity.py +643 -0
  15. synomicsbench-1.0.0/src/synomicsbench/metrics/fidelity/UnivariateSimilarity.py +188 -0
  16. synomicsbench-1.0.0/src/synomicsbench/metrics/fidelity/__init__.py +1 -0
  17. synomicsbench-1.0.0/src/synomicsbench/metrics/fidelity/utils.py +196 -0
  18. synomicsbench-1.0.0/src/synomicsbench/metrics/fidelity/visualization.py +288 -0
  19. synomicsbench-1.0.0/src/synomicsbench/metrics/narrow_utility/BayesianComparison.py +547 -0
  20. synomicsbench-1.0.0/src/synomicsbench/metrics/narrow_utility/DGE.py +399 -0
  21. synomicsbench-1.0.0/src/synomicsbench/metrics/narrow_utility/GSEA.py +367 -0
  22. synomicsbench-1.0.0/src/synomicsbench/metrics/narrow_utility/__init__.py +1 -0
  23. synomicsbench-1.0.0/src/synomicsbench/metrics/narrow_utility/cell_deconvolution.py +86 -0
  24. synomicsbench-1.0.0/src/synomicsbench/metrics/narrow_utility/predictive_model_comp.py +92 -0
  25. synomicsbench-1.0.0/src/synomicsbench/metrics/narrow_utility/survival_analysis.py +418 -0
  26. synomicsbench-1.0.0/src/synomicsbench/metrics/privacy/__init__.py +1 -0
  27. synomicsbench-1.0.0/src/synomicsbench/metrics/privacy/inference.py +96 -0
  28. synomicsbench-1.0.0/src/synomicsbench/metrics/privacy/linkability.py +90 -0
  29. synomicsbench-1.0.0/src/synomicsbench/metrics/privacy/singling_out.py +107 -0
  30. synomicsbench-1.0.0/src/synomicsbench/metrics/privacy/visualization.py +606 -0
  31. synomicsbench-1.0.0/src/synomicsbench/processing/__init__.py +0 -0
  32. synomicsbench-1.0.0/src/synomicsbench/processing/gene_query.py +202 -0
  33. synomicsbench-1.0.0/src/synomicsbench/processing/metadata.py +264 -0
  34. synomicsbench-1.0.0/src/synomicsbench/processing/pipeline.py +683 -0
  35. synomicsbench-1.0.0/src/synomicsbench/processing/postprocessing.py +235 -0
  36. synomicsbench-1.0.0/src/synomicsbench/processing/preprocessing.py +1004 -0
  37. synomicsbench-1.0.0/src/synomicsbench/synthesizer/BaseSynthesizer.py +326 -0
  38. synomicsbench-1.0.0/src/synomicsbench/synthesizer/CTGANsynthesizer.py +133 -0
  39. synomicsbench-1.0.0/src/synomicsbench/synthesizer/GaussianCopulasynthesizer.py +351 -0
  40. synomicsbench-1.0.0/src/synomicsbench/synthesizer/GaussianMultivariate_Parallel.py +463 -0
  41. synomicsbench-1.0.0/src/synomicsbench/synthesizer/Synthpopsynthesizer.py +352 -0
  42. synomicsbench-1.0.0/src/synomicsbench/synthesizer/TVAEsynthesizer.py +141 -0
  43. synomicsbench-1.0.0/src/synomicsbench/synthesizer/__init__.py +0 -0
  44. synomicsbench-1.0.0/src/synomicsbench/utils/__init__.py +1 -0
  45. synomicsbench-1.0.0/src/synomicsbench/utils/correlations.py +799 -0
  46. synomicsbench-1.0.0/src/synomicsbench/utils/monitoring.py +135 -0
  47. synomicsbench-1.0.0/synomicsbench.def +105 -0
  48. synomicsbench-1.0.0/test/test_advanced_sanity.py +79 -0
  49. synomicsbench-1.0.0/test/test_metrics.py +598 -0
  50. synomicsbench-1.0.0/test/test_narrow_utility.py +80 -0
  51. synomicsbench-1.0.0/test/test_pipeline.py +187 -0
  52. synomicsbench-1.0.0/test/test_processing.py +384 -0
  53. synomicsbench-1.0.0/test/test_sanity.py +80 -0
  54. synomicsbench-1.0.0/test/test_synthesizers.py +80 -0
  55. synomicsbench-1.0.0/test/test_utils.py +203 -0
  56. synomicsbench-1.0.0/uv.lock +4139 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(ssh *)"
5
+ ]
6
+ }
7
+ }
@@ -0,0 +1,46 @@
1
+ name: Python CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, master ]
6
+ pull_request:
7
+ branches: [ main, master ]
8
+
9
+ permissions:
10
+ contents: write
11
+
12
+ env:
13
+ RPY2_CFFI_MODE: ABI
14
+
15
+ jobs:
16
+ test:
17
+ runs-on: ubuntu-latest
18
+
19
+ steps:
20
+ - name: Checkout repository
21
+ uses: actions/checkout@v4
22
+
23
+ - name: Install uv
24
+ uses: astral-sh/setup-uv@v5
25
+ with:
26
+ enable-cache: true
27
+
28
+ - name: Set up Python
29
+ uses: actions/setup-python@v5
30
+ with:
31
+ python-version: "3.12"
32
+
33
+ - name: Install dependencies
34
+ run: |
35
+ uv sync --all-extras --dev
36
+
37
+ - name: Lint with ruff
38
+ run: |
39
+ uvx ruff check src/synomicsbench
40
+
41
+
42
+
43
+ - name: Run tests
44
+ run: |
45
+ # Chạy các test sanity trước cho nhanh, sau đó là integration tests
46
+ uv run pytest test/ -v
@@ -0,0 +1,39 @@
1
+ name: Deploy MkDocs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - master
8
+
9
+ permissions:
10
+ contents: write
11
+
12
+ env:
13
+ RPY2_CFFI_MODE: ABI
14
+
15
+ jobs:
16
+ deploy:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Checkout repository
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Install uv
23
+ uses: astral-sh/setup-uv@v5
24
+ with:
25
+ enable-cache: true
26
+
27
+ - name: Set up Python
28
+ uses: actions/setup-python@v5
29
+ with:
30
+ python-version: "3.12"
31
+
32
+ - name: Install documentation dependencies
33
+ run: |
34
+ uv pip install --system mkdocs-material mkdocstrings[python] pandas numpy scikit-learn
35
+ uv pip install --system -e . --no-deps
36
+
37
+ - name: Deploy to GitHub Pages
38
+ run: |
39
+ python -m mkdocs gh-deploy --force
@@ -0,0 +1,47 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ build/
11
+ dist/
12
+ *.egg-info/
13
+ *.egg
14
+ .eggs/
15
+
16
+ # Virtual environments
17
+ venv/
18
+ .venv/
19
+ env/
20
+
21
+ # IDE / editor
22
+ .vscode/
23
+ .idea/
24
+ *.swp
25
+ *.swo
26
+ *~
27
+
28
+ # Environment variables
29
+ .env
30
+ .env.*
31
+
32
+ # Pytest / coverage
33
+ .pytest_cache/
34
+ .coverage
35
+ htmlcov/
36
+
37
+ # Mypy
38
+ .mypy_cache/
39
+
40
+ # Jupyter
41
+ .ipynb_checkpoints/
42
+
43
+ # OS files
44
+ .DS_Store
45
+ Thumbs.db
46
+ synthetic_datasets.zip
47
+ CLAUDE.md
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 The-Chuong TRINH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,162 @@
1
+ Metadata-Version: 2.4
2
+ Name: synomicsbench
3
+ Version: 1.0.0
4
+ License-File: LICENSE
5
+ Requires-Python: >=3.12
6
+ Requires-Dist: anonymeter>=1.0.0
7
+ Requires-Dist: baycomp>=1.0.3
8
+ Requires-Dist: codecarbon>=3.2.5
9
+ Requires-Dist: copulas>=0.12.0
10
+ Requires-Dist: ctgan>=0.10.2
11
+ Requires-Dist: deptry>=0.25.1
12
+ Requires-Dist: gseapy>=1.1.12
13
+ Requires-Dist: ipykernel>=7.2.0
14
+ Requires-Dist: joblib>=1.5.3
15
+ Requires-Dist: jupyter>=1.1.1
16
+ Requires-Dist: lab>=8.9
17
+ Requires-Dist: lifelines>=0.30.3
18
+ Requires-Dist: lightgbm>=4.6.0
19
+ Requires-Dist: matplotlib>=3.10.8
20
+ Requires-Dist: memory-profiler>=0.61.0
21
+ Requires-Dist: miceforest>=6.0.5
22
+ Requires-Dist: missingno>=0.5.2
23
+ Requires-Dist: mpl-tools>=0.4.1
24
+ Requires-Dist: mygene>=3.2.2
25
+ Requires-Dist: numba>=0.64.0
26
+ Requires-Dist: numpy>=1.26.4
27
+ Requires-Dist: pandas>=2.3.3
28
+ Requires-Dist: polar>=0.0.127
29
+ Requires-Dist: polars>=1.39.2
30
+ Requires-Dist: pytest>=9.0.3
31
+ Requires-Dist: rpy2==3.6.5
32
+ Requires-Dist: scienceplots>=2.2.1
33
+ Requires-Dist: scikit-bio>=0.7.0
34
+ Requires-Dist: scikit-learn>=1.8.0
35
+ Requires-Dist: scipy>=1.17.1
36
+ Requires-Dist: sdmetrics>=0.18.0
37
+ Requires-Dist: sdv>=1.18.0
38
+ Requires-Dist: seaborn>=0.13.2
39
+ Requires-Dist: statsmodels>=0.14.6
40
+ Requires-Dist: torch>=2.10.0
41
+ Requires-Dist: tqdm>=4.67.3
42
+ Description-Content-Type: text/markdown
43
+
44
+ # SynOmicsBench
45
+
46
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.19660703.svg)](https://zenodo.org/records/19660703)
47
+ [![CI](https://github.com/trinhthechuong/SynOmicsBench/actions/workflows/ci.yml/badge.svg)](https://github.com/trinhthechuong/SynOmicsBench/actions/workflows/ci.yml)
48
+ [![Documentation](https://img.shields.io/badge/docs-GitHub%20Pages-blue.svg)](https://trinhthechuong.github.io/SynOmicsBench/)
49
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
50
+ [![Python 3.12+](https://img.shields.io/badge/python-3.12+-red.svg)](https://www.python.org/downloads/release/python-3120/)
51
+
52
+
53
+ **SynOmicsBench** is a unified benchmarking framework for synthetic data generation (SDG) for clinical transcriptomic cancer cohorts.
54
+
55
+ Achieving a trade-off between **biological utility** and **patient privacy** is critical for secure data sharing when applying transcriptomic clinical datasets to artificial intelligence in precision oncology. Here, we present the **SynOmicsBench** framework. SynOmicsBench combines standardized preprocessing with multidimensional evaluation, prioritizing downstream biological validation alongside statistical fidelity and attack-based privacy assessment. This work provides a reproducible decision-support tool for method selection and promotes biologically informed, privacy-aware adoption of synthetic data in precision oncology.
56
+
57
+ ---
58
+
59
+ ## 🔬 Framework Overview
60
+
61
+ ![Framework Overview](docs/assets/figures/Figure_1_Graphical_abstract.png)
62
+
63
+ SynOmicsBench compares synthetic data generation methods using a standardized pipeline that combines:
64
+
65
+ - **Standardized Preprocessing**: Automated data filtering, harmonization, and integration.
66
+ - **Multidimensional Evaluation**: Assessing Statistical Fidelity, Downstream Biological Utility, and Privacy Risk.
67
+ - **State-of-the-Art SDG Methods**: Native support for **CTGAN, TVAE, Gaussian Copula, Synthpop, and Avatars (K5/K10)**.
68
+
69
+ ---
70
+
71
+ ## 🛠 Installation
72
+
73
+ SynOmicsBench can be installed in three different ways depending on your environment. **Python 3.12+** is required.
74
+
75
+ ### Option 1: From PyPI (Recommended)
76
+
77
+ ```bash
78
+ pip install synomicsbench
79
+ ```
80
+
81
+ ### Option 2: From Source (GitHub)
82
+ We recommend using [`uv`](https://docs.astral.sh/uv/) for fast, reliable dependency management. This method uses the provided uv.lock file to ensure reproducible installations.
83
+ ```bash
84
+ git clone https://github.com/trinhthechuong/SynOmicsBench.git
85
+ cd SynOmicsBench
86
+
87
+ # With uv (Fastest)
88
+ uv sync
89
+ source .venv/bin/activate
90
+
91
+ # Or with traditional pip
92
+ pip install -e .
93
+ ```
94
+
95
+ ### Option 3: Pre-built Container (Apptainer/Singularity)
96
+ For HPC environments or reproducible workflows, you can pull our fully prepared Apptainer container which contains all dependencies (including heavy ML frameworks and R):
97
+
98
+ ```bash
99
+ # Pull the latest SynOmicsBench container
100
+ apptainer pull synomicsbench.sif oras://ghcr.io/trinhthechuong/synomicsbench:latest
101
+
102
+ # Verify the container is working and the package is ready
103
+ apptainer exec synomicsbench.sif python -c "import synomicsbench; print('OK: SynOmicsBench is ready!')"
104
+ ```
105
+ *(To use the container for your scripts, simply mount your directories via `--bind` and run your Python scripts using `apptainer exec`)*
106
+
107
+ ---
108
+
109
+ ## 🚀 Quick Start
110
+
111
+ Here is a brief example of how to generate synthetic data with Gaussian Copula and evaluate its statistical fidelity:
112
+
113
+ ```python
114
+ import pandas as pd
115
+ from synomicsbench.synthesizer.GaussianCopulasynthesizer import GaussianCopulasynthesizer
116
+ from synomicsbench.processing.metadata import MetaData
117
+ from synomicsbench.metrics.fidelity.UnivariateSimilarity import UnivariateSimilarity
118
+
119
+ # 1. Load Data & Prepare Metadata
120
+ original_data = pd.read_csv("your_clinical_transcriptomic_data.csv")
121
+ ordinal_features = ["Mstage", "Tx_Start_ECOG", "numPriorTherapies"]
122
+ metadata = MetaData.get_metadata(data=original_data, ordinal_features=ordinal_features)
123
+
124
+ # 2. Generate Synthetic Data
125
+ synth = GaussianCopulasynthesizer(output_path="./results", metadata=metadata)
126
+ synthetic_data = synth.generate(
127
+ data=original_data,
128
+ n_samples=original_data.shape[0]
129
+ )
130
+
131
+ # 3. Evaluate Fidelity
132
+ evaluator = UnivariateSimilarity(output_dir="./evaluation_results")
133
+ score = evaluator.get_univariate_score(
134
+ original_data=original_data,
135
+ synthetic_data=synthetic_data,
136
+ metadata=metadata,
137
+ save=True
138
+ )
139
+ print(f"Overall Fidelity Score: {score:.4f}")
140
+ ```
141
+
142
+ ---
143
+
144
+ ## 📚 Documentation
145
+
146
+ For complete API references, tutorials, and full benchmarking results, check out the **[SynOmicsBench Official Documentation](https://trinhthechuong.github.io/SynOmicsBench/)**:
147
+
148
+ - [**Getting Started**](https://trinhthechuong.github.io/SynOmicsBench/getting-started/): Step-by-step setup guides.
149
+ - [**Preprocessing Pipeline**](https://trinhthechuong.github.io/SynOmicsBench/preprocessing/): Harmonizing multimodal data.
150
+ - [**SDG Methods**](https://trinhthechuong.github.io/SynOmicsBench/synthetic-data/): Deep dive into generation models.
151
+ - [**Evaluation Framework**](https://trinhthechuong.github.io/SynOmicsBench/evaluation/): Understand our metrics for Privacy and Biological signal preservation.
152
+
153
+ ---
154
+
155
+ ## 📝 Citation
156
+
157
+ If you use SynOmicsBench in your research, please cite:
158
+
159
+ > Trinh, T. C., Woillard, J. B., Uguzzoni, G., & Battail, C. (2024). **A unified benchmark of synthetic data generation for clinical and transcriptomic cancer data.** *(Manuscript in preparation)*
160
+
161
+ ## 📄 License
162
+ This project is open-sourced under the MIT License.
@@ -0,0 +1,119 @@
1
+ # SynOmicsBench
2
+
3
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.19660703.svg)](https://zenodo.org/records/19660703)
4
+ [![CI](https://github.com/trinhthechuong/SynOmicsBench/actions/workflows/ci.yml/badge.svg)](https://github.com/trinhthechuong/SynOmicsBench/actions/workflows/ci.yml)
5
+ [![Documentation](https://img.shields.io/badge/docs-GitHub%20Pages-blue.svg)](https://trinhthechuong.github.io/SynOmicsBench/)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+ [![Python 3.12+](https://img.shields.io/badge/python-3.12+-red.svg)](https://www.python.org/downloads/release/python-3120/)
8
+
9
+
10
+ **SynOmicsBench** is a unified benchmarking framework for synthetic data generation (SDG) for clinical transcriptomic cancer cohorts.
11
+
12
+ Achieving a trade-off between **biological utility** and **patient privacy** is critical for secure data sharing when applying transcriptomic clinical datasets to artificial intelligence in precision oncology. Here, we present the **SynOmicsBench** framework. SynOmicsBench combines standardized preprocessing with multidimensional evaluation, prioritizing downstream biological validation alongside statistical fidelity and attack-based privacy assessment. This work provides a reproducible decision-support tool for method selection and promotes biologically informed, privacy-aware adoption of synthetic data in precision oncology.
13
+
14
+ ---
15
+
16
+ ## 🔬 Framework Overview
17
+
18
+ ![Framework Overview](docs/assets/figures/Figure_1_Graphical_abstract.png)
19
+
20
+ SynOmicsBench compares synthetic data generation methods using a standardized pipeline that combines:
21
+
22
+ - **Standardized Preprocessing**: Automated data filtering, harmonization, and integration.
23
+ - **Multidimensional Evaluation**: Assessing Statistical Fidelity, Downstream Biological Utility, and Privacy Risk.
24
+ - **State-of-the-Art SDG Methods**: Native support for **CTGAN, TVAE, Gaussian Copula, Synthpop, and Avatars (K5/K10)**.
25
+
26
+ ---
27
+
28
+ ## 🛠 Installation
29
+
30
+ SynOmicsBench can be installed in three different ways depending on your environment. **Python 3.12+** is required.
31
+
32
+ ### Option 1: From PyPI (Recommended)
33
+
34
+ ```bash
35
+ pip install synomicsbench
36
+ ```
37
+
38
+ ### Option 2: From Source (GitHub)
39
+ We recommend using [`uv`](https://docs.astral.sh/uv/) for fast, reliable dependency management. This method uses the provided uv.lock file to ensure reproducible installations.
40
+ ```bash
41
+ git clone https://github.com/trinhthechuong/SynOmicsBench.git
42
+ cd SynOmicsBench
43
+
44
+ # With uv (Fastest)
45
+ uv sync
46
+ source .venv/bin/activate
47
+
48
+ # Or with traditional pip
49
+ pip install -e .
50
+ ```
51
+
52
+ ### Option 3: Pre-built Container (Apptainer/Singularity)
53
+ For HPC environments or reproducible workflows, you can pull our fully prepared Apptainer container which contains all dependencies (including heavy ML frameworks and R):
54
+
55
+ ```bash
56
+ # Pull the latest SynOmicsBench container
57
+ apptainer pull synomicsbench.sif oras://ghcr.io/trinhthechuong/synomicsbench:latest
58
+
59
+ # Verify the container is working and the package is ready
60
+ apptainer exec synomicsbench.sif python -c "import synomicsbench; print('OK: SynOmicsBench is ready!')"
61
+ ```
62
+ *(To use the container for your scripts, simply mount your directories via `--bind` and run your Python scripts using `apptainer exec`)*
63
+
64
+ ---
65
+
66
+ ## 🚀 Quick Start
67
+
68
+ Here is a brief example of how to generate synthetic data with Gaussian Copula and evaluate its statistical fidelity:
69
+
70
+ ```python
71
+ import pandas as pd
72
+ from synomicsbench.synthesizer.GaussianCopulasynthesizer import GaussianCopulasynthesizer
73
+ from synomicsbench.processing.metadata import MetaData
74
+ from synomicsbench.metrics.fidelity.UnivariateSimilarity import UnivariateSimilarity
75
+
76
+ # 1. Load Data & Prepare Metadata
77
+ original_data = pd.read_csv("your_clinical_transcriptomic_data.csv")
78
+ ordinal_features = ["Mstage", "Tx_Start_ECOG", "numPriorTherapies"]
79
+ metadata = MetaData.get_metadata(data=original_data, ordinal_features=ordinal_features)
80
+
81
+ # 2. Generate Synthetic Data
82
+ synth = GaussianCopulasynthesizer(output_path="./results", metadata=metadata)
83
+ synthetic_data = synth.generate(
84
+ data=original_data,
85
+ n_samples=original_data.shape[0]
86
+ )
87
+
88
+ # 3. Evaluate Fidelity
89
+ evaluator = UnivariateSimilarity(output_dir="./evaluation_results")
90
+ score = evaluator.get_univariate_score(
91
+ original_data=original_data,
92
+ synthetic_data=synthetic_data,
93
+ metadata=metadata,
94
+ save=True
95
+ )
96
+ print(f"Overall Fidelity Score: {score:.4f}")
97
+ ```
98
+
99
+ ---
100
+
101
+ ## 📚 Documentation
102
+
103
+ For complete API references, tutorials, and full benchmarking results, check out the **[SynOmicsBench Official Documentation](https://trinhthechuong.github.io/SynOmicsBench/)**:
104
+
105
+ - [**Getting Started**](https://trinhthechuong.github.io/SynOmicsBench/getting-started/): Step-by-step setup guides.
106
+ - [**Preprocessing Pipeline**](https://trinhthechuong.github.io/SynOmicsBench/preprocessing/): Harmonizing multimodal data.
107
+ - [**SDG Methods**](https://trinhthechuong.github.io/SynOmicsBench/synthetic-data/): Deep dive into generation models.
108
+ - [**Evaluation Framework**](https://trinhthechuong.github.io/SynOmicsBench/evaluation/): Understand our metrics for Privacy and Biological signal preservation.
109
+
110
+ ---
111
+
112
+ ## 📝 Citation
113
+
114
+ If you use SynOmicsBench in your research, please cite:
115
+
116
+ > Trinh, T. C., Woillard, J. B., Uguzzoni, G., & Battail, C. (2024). **A unified benchmark of synthetic data generation for clinical and transcriptomic cancer data.** *(Manuscript in preparation)*
117
+
118
+ ## 📄 License
119
+ This project is open-sourced under the MIT License.
@@ -0,0 +1,84 @@
1
+ site_name: SynOmicsBench Documentation
2
+ site_description: Synthetic data benchmarking for omics data
3
+ site_author: SynOmicsBench Team
4
+ site_url: https://trinhthechuong.github.io/SynOmicsBench/
5
+ repo_url: https://github.com/trinhthechuong/SynOmicsBench
6
+ repo_name: SynOmicsBench
7
+
8
+ # Theme configuration
9
+ theme:
10
+ name: material
11
+ logo: assets/logo.png
12
+ favicon: assets/logo.png
13
+ palette:
14
+ primary: custom
15
+ features:
16
+ - navigation.tabs
17
+ - navigation.tabs.sticky
18
+ - navigation.indexes
19
+ - navigation.top
20
+ - search.highlight
21
+ - search.suggest
22
+ - content.code.copy
23
+
24
+ # Markdown extensions
25
+ markdown_extensions:
26
+ - admonition
27
+ - attr_list
28
+ - md_in_html
29
+ - pymdownx.highlight:
30
+ use_pygments: true
31
+ pygments_style: default
32
+ - pymdownx.inlinehilite
33
+ - pymdownx.superfences
34
+ - pymdownx.tabbed:
35
+ alternate_style: true
36
+ - pymdownx.details
37
+ - pymdownx.arithmatex:
38
+ generic: true
39
+ - toc:
40
+ permalink: true
41
+
42
+ # Navigation Structure (EXACTLY 6 top-level tabs)
43
+ nav:
44
+ - Home: index.md
45
+ - Getting Started: getting-started/index.md
46
+ - Preprocessing Data: preprocessing/index.md
47
+ - Generate Synthetic Data: synthetic-data/index.md
48
+ - Evaluation:
49
+ - evaluation/index.md
50
+ - Statistical Fidelity: evaluation/statistical-fidelity.md
51
+ - Biological Utility:
52
+ - DGE: evaluation/biological-utility/dge.md
53
+ - GSEA: evaluation/biological-utility/gsea.md
54
+ - ssGSEA: evaluation/biological-utility/ssgsea.md
55
+ - Cell Type Deconvolution: evaluation/biological-utility/cell-deconvolution.md
56
+ - Survival Analysis: evaluation/biological-utility/survival-analysis.md
57
+ - Biological Results: evaluation/biological-results.md
58
+ - Privacy: evaluation/privacy.md
59
+ - API: api/index.md
60
+
61
+ # Documentation Directory
62
+ docs_dir: docs
63
+
64
+ # Plugins
65
+ plugins:
66
+ - search
67
+ - mkdocstrings:
68
+ handlers:
69
+ python:
70
+ paths: [src]
71
+ options:
72
+ docstring_style: google
73
+ show_source: true
74
+ show_root_heading: true
75
+ show_root_full_path: false
76
+ heading_level: 2
77
+
78
+ # Custom CSS and JavaScript
79
+ extra_css:
80
+ - stylesheets/extra.css
81
+
82
+ extra_javascript:
83
+ - javascripts/mathjax.js
84
+ - https://unpkg.com/mathjax@3/es5/tex-mml-chtml.js
@@ -0,0 +1,66 @@
1
+ [project]
2
+ name = "synomicsbench"
3
+ version = "1.0.0"
4
+ # description = "Add your description here"
5
+ readme = "README.md"
6
+ requires-python = ">=3.12"
7
+ dependencies = [
8
+ "anonymeter>=1.0.0",
9
+ "baycomp>=1.0.3",
10
+ "codecarbon>=3.2.5",
11
+ "copulas>=0.12.0",
12
+ "ctgan>=0.10.2",
13
+ "deptry>=0.25.1",
14
+ "gseapy>=1.1.12",
15
+ "ipykernel>=7.2.0",
16
+ "joblib>=1.5.3",
17
+ "jupyter>=1.1.1",
18
+ "lab>=8.9",
19
+ "lifelines>=0.30.3",
20
+ "lightgbm>=4.6.0",
21
+ "matplotlib>=3.10.8",
22
+ "memory-profiler>=0.61.0",
23
+ "miceforest>=6.0.5",
24
+ "missingno>=0.5.2",
25
+ "mpl-tools>=0.4.1",
26
+ "mygene>=3.2.2",
27
+ "numba>=0.64.0",
28
+ "numpy>=1.26.4",
29
+ "pandas>=2.3.3",
30
+ "polar>=0.0.127",
31
+ "polars>=1.39.2",
32
+ "pytest>=9.0.3",
33
+ "rpy2==3.6.5",
34
+ "scienceplots>=2.2.1",
35
+ "scikit-bio>=0.7.0",
36
+ "scikit-learn>=1.8.0",
37
+ "scipy>=1.17.1",
38
+ "sdmetrics>=0.18.0",
39
+ "sdv>=1.18.0",
40
+ "seaborn>=0.13.2",
41
+ "statsmodels>=0.14.6",
42
+ "torch>=2.10.0",
43
+ "tqdm>=4.67.3",
44
+ ]
45
+
46
+ [build-system]
47
+ requires = ["hatchling"]
48
+ build-backend = "hatchling.build"
49
+
50
+ [tool.hatch.build.targets.wheel]
51
+ packages = ["src/synomicsbench"]
52
+
53
+ [tool.hatch.build]
54
+ exclude = [
55
+ "test/test_data/*",
56
+ "Manuscripts/",
57
+ "docs/",
58
+ "site/",
59
+ "*.sif",
60
+ "*.ipynb",
61
+ "*.png",
62
+ "*.pdf",
63
+ "*.csv"
64
+ ]
65
+
66
+
@@ -0,0 +1 @@
1
+ __version__ = "1.0.0"
@@ -0,0 +1,13 @@
1
+ """
2
+ Metrics module for evaluating synthetic data quality.
3
+
4
+ This module provides comprehensive evaluation metrics across three dimensions:
5
+ - Statistical Fidelity: Univariate and bivariate similarity measures
6
+ - Biological Utility: Downstream bioinformatics task performance
7
+ - Privacy Risk: Attack-based privacy assessment
8
+
9
+ Submodules:
10
+ - fidelity: Statistical similarity metrics
11
+ - narrow_utility: Biological signal preservation metrics
12
+ - privacy: Privacy attack risk assessment
13
+ """