cytodataframe 0.3.2__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.
@@ -0,0 +1,150 @@
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
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pdm
86
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
87
+ #pdm.lock
88
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
89
+ # in version control.
90
+ # https://pdm.fming.dev/#use-with-ide
91
+ .pdm.toml
92
+
93
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
94
+ __pypackages__/
95
+
96
+ # Celery stuff
97
+ celerybeat-schedule
98
+ celerybeat.pid
99
+
100
+ # SageMath parsed files
101
+ *.sage.py
102
+
103
+ # Environments
104
+ .env
105
+ .venv
106
+ env/
107
+ venv/
108
+ ENV/
109
+ env.bak/
110
+ venv.bak/
111
+
112
+ # Spyder project settings
113
+ .spyderproject
114
+ .spyproject
115
+
116
+ # Rope project settings
117
+ .ropeproject
118
+
119
+ # mkdocs documentation
120
+ /site
121
+
122
+ # mypy
123
+ .mypy_cache/
124
+ .dmypy.json
125
+ dmypy.json
126
+
127
+ # Pyre type checker
128
+ .pyre/
129
+
130
+ # pytype static type analyzer
131
+ .pytype/
132
+
133
+ # Cython debug symbols
134
+ cython_debug/
135
+
136
+ # test data ignores
137
+ *.tif
138
+ *.tiff
139
+ *.sqlite
140
+ *.parquet
141
+ *.zip
142
+ *.csv
143
+
144
+ .DS_Store
145
+
146
+ # jupyter notebook build files from myst-nb
147
+ docs/jupyter_execute
148
+
149
+ # version placeholder is updated during builds
150
+ _version.py
@@ -0,0 +1,82 @@
1
+ # See https://pre-commit.com for more information
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+ default_language_version:
4
+ python: python3.11
5
+ repos:
6
+ - repo: https://github.com/pre-commit/pre-commit-hooks
7
+ rev: v6.0.0
8
+ hooks:
9
+ - id: trailing-whitespace
10
+ - id: end-of-file-fixer
11
+ exclude: |
12
+ (?x)^(
13
+ .*\.svg
14
+ )$
15
+ - id: check-yaml
16
+ - id: detect-private-key
17
+ - repo: https://github.com/tox-dev/pyproject-fmt
18
+ rev: "v2.25.1"
19
+ hooks:
20
+ - id: pyproject-fmt
21
+ - repo: https://github.com/codespell-project/codespell
22
+ rev: v2.4.2
23
+ hooks:
24
+ - id: codespell
25
+ exclude: |
26
+ (?x)^(
27
+ .*\.lock |
28
+ .*\.json |
29
+ .*\.ipynb |
30
+ .*\.cppipe |
31
+ tests/data/CP_tutorial_3D_noise_nuclei_segmentation/output/MyExpt_Experiment\.csv
32
+ )$
33
+ - repo: https://github.com/executablebooks/mdformat
34
+ rev: 0.7.18
35
+ hooks:
36
+ - id: mdformat
37
+ additional_dependencies:
38
+ - mdformat-gfm
39
+ - repo: https://github.com/citation-file-format/cffconvert
40
+ rev: b6045d78aac9e02b039703b030588d54d53262ac
41
+ hooks:
42
+ - id: validate-cff
43
+ - repo: https://github.com/adrienverge/yamllint
44
+ rev: v1.38.0
45
+ hooks:
46
+ - id: yamllint
47
+ exclude: pre-commit-config.yaml
48
+ - repo: https://github.com/rhysd/actionlint
49
+ rev: v1.7.12
50
+ hooks:
51
+ - id: actionlint
52
+ - repo: https://github.com/astral-sh/ruff-pre-commit
53
+ rev: "v0.15.20"
54
+ hooks:
55
+ - id: ruff-format
56
+ - id: ruff-check
57
+ - repo: https://github.com/software-gardening/almanack
58
+ rev: v0.1.16
59
+ hooks:
60
+ - id: almanack-check
61
+ - repo: https://gitlab.com/vojko.pribudic.foss/pre-commit-update
62
+ rev: v0.6.0
63
+ hooks:
64
+ - id: pre-commit-update
65
+ args: ["--keep", "mdformat", "--keep", "pre-commit-update", "--keep", "cffconvert"]
66
+ - repo: local
67
+ hooks:
68
+ - id: code-cov-gen
69
+ name: Generate code coverage
70
+ language: system
71
+ entry: uv run --frozen coverage run -m pytest -o addopts=
72
+ pass_filenames: false
73
+ always_run: true
74
+ - repo: https://github.com/Weird-Sheep-Labs/coverage-pre-commit
75
+ rev: 0.1.1
76
+ hooks:
77
+ - id: coverage-xml
78
+ - id: coverage-badge
79
+ stages: [manual]
80
+ additional_dependencies:
81
+ - setuptools<81
82
+ args: ["-o", "media/coverage-badge.svg"]
@@ -0,0 +1,206 @@
1
+ # This CITATION.cff file was generated with cffinit.
2
+ # Visit https://bit.ly/cffinit to generate yours today!
3
+ ---
4
+ cff-version: 1.2.0
5
+ title: CytoDataFrame
6
+ message: >-
7
+ If you use this software, please cite it using the
8
+ metadata from this file.
9
+ type: software
10
+ authors:
11
+ - given-names: David
12
+ family-names: Bunten
13
+ orcid: 'https://orcid.org/0000-0001-6041-3665'
14
+ - given-names: Jenna
15
+ family-names: Tomkinson
16
+ orcid: 'https://orcid.org/0000-0003-2676-5813'
17
+ - given-names: Vincent
18
+ family-names: Rubinetti
19
+ orcid: 'https://orcid.org/0000-0002-4655-3773'
20
+ - given-names: Gregory
21
+ family-names: Way
22
+ orcid: 'https://orcid.org/0000-0002-0503-9348'
23
+ repository-code: 'https://github.com/cytomining/CytoDataFrame'
24
+ identifiers:
25
+ - description: Software DOI
26
+ type: doi
27
+ value: "10.5281/zenodo.14797074"
28
+ abstract: >-
29
+ An in-memory data analysis format for single-cell profiles alongside their corresponding images and segmentation masks.
30
+ keywords:
31
+ - python
32
+ - single-cell-analysis
33
+ - profiling
34
+ - dataframes
35
+ - data-analysis
36
+ - way-lab
37
+ license: BSD-3-Clause
38
+ references:
39
+ - authors:
40
+ - name: "Way Lab CFReT_data Team"
41
+ date-accessed: "2024-05-13"
42
+ title: Way Lab CFReT_data CytoTable Data
43
+ type: data
44
+ repository-code: "https://github.com/WayScience/CFReT_data"
45
+ url: "https://github.com/WayScience/CFReT_data/blob/main/3.process_cfret_features/data/converted_profiles/localhost231120090001_converted.parquet"
46
+ scope: "localhost231120090001_converted.parquet"
47
+ notes: >-
48
+ Data from CFReT_data project is used to help validate
49
+ expected results. Data is generated from CellProfiler
50
+ and CytoTable.
51
+ identifiers:
52
+ - description: "Github Link with Contributors"
53
+ type: url
54
+ value: "https://github.com/WayScience/CFReT_data/graphs/contributors"
55
+ - authors:
56
+ - name: "Way Lab NF1_cellpainting_data Team"
57
+ date-accessed: "2024-06-28"
58
+ title: Way Lab NF1_cellpainting_data CytoTable Data
59
+ type: data
60
+ repository-code: "https://github.com/WayScience/nf1_cellpainting_data"
61
+ notes: >-
62
+ Data from NF1_cellpainting_data project is used to help validate
63
+ expected results. Data is generated from CellProfiler
64
+ and CytoTable. We use the following files from the repository:
65
+ - "Plate_2_nf1_analysis.sqlite"
66
+ - "Plate_2.parquet"
67
+ identifiers:
68
+ - description: "Github Link with Contributors"
69
+ type: url
70
+ value: "https://github.com/WayScience/nf1_cellpainting_data/graphs/contributors"
71
+ - title: >-
72
+ Plate 2 (Cell Painting images from Plate 2 for NF1_cellpainting_data project)
73
+ type: data
74
+ url: https://figshare.com/articles/dataset/Plate_2/22233700
75
+ notes: >-
76
+ Image data for related NF1_cellpainting_data parquet sqlite.
77
+ authors:
78
+ - family-names: Tomkinson
79
+ given-names: Jenna
80
+ - family-names: Mattson-Hoss
81
+ given-names: Michelle
82
+ - family-names: Sarnoff
83
+ given-names: Herb
84
+ - family-names: Way
85
+ given-names: Gregory
86
+ date-published: "2023-04-12"
87
+ identifiers:
88
+ - type: doi
89
+ value: 10.6084/m9.figshare.22233700.v4
90
+ - authors:
91
+ - name: "Way Lab and Alexander Lab Nuclear Speckles Collaboration"
92
+ date-accessed: "2024-09-04"
93
+ title: Way Lab and Alexander Lab Nuclear Speckles Collaboration Data
94
+ type: data
95
+ repository-code: https://github.com/WayScience/nuclear_speckle_image_profiling
96
+ notes: >-
97
+ Data from a collaborative project focusing on nuclear speckles
98
+ with the Way Lab and Alexander Lab s used to help validate
99
+ expected results. Parquet data is generated from CellProfiler
100
+ and CytoTable. Images courtesy of Katherine Alexander
101
+ and the Alexander Lab.
102
+ identifiers:
103
+ - description: "Github Link with Contributors"
104
+ type: url
105
+ value: "https://github.com/WayScience/nuclear_speckle_image_profiling/graphs/contributors"
106
+ - authors:
107
+ - family-names: Chandrasekaran
108
+ given-names: Srinivas Niranj
109
+ - family-names: Cimini
110
+ given-names: Beth A.
111
+ - family-names: Goodale
112
+ given-names: Amy
113
+ - family-names: Miller
114
+ given-names: Lisa
115
+ - family-names: Kost-Alimova
116
+ given-names: Maria
117
+ - family-names: Jamali
118
+ given-names: Nasim
119
+ - family-names: Doench
120
+ given-names: John G.
121
+ - family-names: Fritchman
122
+ given-names: Briana
123
+ - family-names: Skepner
124
+ given-names: Adam
125
+ - family-names: Melanson
126
+ given-names: Michelle
127
+ - family-names: Kalinin
128
+ given-names: Alexandr A.
129
+ - family-names: Arevalo
130
+ given-names: John
131
+ - family-names: Haghighi
132
+ given-names: Marzieh
133
+ - family-names: Caicedo
134
+ given-names: Juan C.
135
+ - family-names: Kuhn
136
+ given-names: Daniel
137
+ - family-names: Hernandez
138
+ given-names: Desiree
139
+ - family-names: Berstler
140
+ given-names: James
141
+ - family-names: Shafqat-Abbasi
142
+ given-names: Hamdah
143
+ - family-names: Root
144
+ given-names: David E.
145
+ - family-names: Swalley
146
+ given-names: Susanne E.
147
+ - family-names: Garg
148
+ given-names: Sakshi
149
+ - family-names: Singh
150
+ given-names: Shantanu
151
+ - family-names: Carpenter
152
+ given-names: Anne E.
153
+ date-accessed: "2024-08-21"
154
+ title: >-
155
+ Three million images and morphological profiles of cells treated with matched chemical and genetic perturbations
156
+ type: article
157
+ issn: 1548-7105
158
+ issue: 6
159
+ journal: Nature Methods
160
+ pages: 1114-1121
161
+ volume: 21
162
+ url: https://doi.org/10.1038/s41592-024-02241-6
163
+ date-published: "2024-06-01"
164
+ identifiers:
165
+ - type: doi
166
+ value: 10.1038/s41592-024-02241-6
167
+ notes: >-
168
+ JUMP (cpg0000-jump-pilot) was used to help demonstrate CytoDataFrame performance
169
+ with large data. See here for more information:
170
+ https://github.com/broadinstitute/cellpainting-gallery
171
+ - type: article
172
+ authors:
173
+ - family-names: Blin
174
+ given-names: Guillaume
175
+ - family-names: Sadurska
176
+ given-names: Dominika
177
+ - family-names: Portero Migueles
178
+ given-names: Rafael
179
+ - family-names: Chen
180
+ given-names: Ni
181
+ - family-names: Watson
182
+ given-names: James A.
183
+ - family-names: Lowell
184
+ given-names: Sally
185
+ title: "Nessys: A new set of tools for the automated detection of nuclei within intact tissues and dense 3D cultures"
186
+ journal: PLoS Biology
187
+ volume: "17"
188
+ issue: "8"
189
+ pages: e3000388
190
+ year: 2019
191
+ doi: "10.1371/journal.pbio.3000388"
192
+ url: "https://doi.org/10.1371/journal.pbio.3000388"
193
+ notes: >
194
+ This work used the file "6001240_labels.zarr" from the DISCEPTS imaging
195
+ dataset, available through the Image Data Resource (IDR) under accession
196
+ number idr0062.
197
+ - type: data
198
+ title: "3D Noise Nuclei Segmentation Tutorial"
199
+ authors:
200
+ - name: "CellProfiler Tutorials Team"
201
+ url: "https://tutorials.cellprofiler.org/#3d-noise-nuclei-segmentation"
202
+ publisher:
203
+ name: "CellProfiler Organization"
204
+ notes: >
205
+ This work uses data that were slightly modified from the
206
+ CellProfiler 3D Noise Nuclei Segmentation tutorial.
@@ -0,0 +1,3 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ Please see our full code of conduct at https://cytomining.github.io/CytoDataFrame/main/code_of_conduct
@@ -0,0 +1,3 @@
1
+ # Contributing
2
+
3
+ Please see our [contributing](docs/src/contributing.md) documentation for more details on contributions, development, and testing.
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2024, Way Science
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,22 @@
1
+ # Controls which files are included in the source distribution (sdist).
2
+ #
3
+ # setuptools-scm seeds the sdist with every git-tracked file, which pulls in the
4
+ # large test fixtures (tests/data: ~130 MB of TIFF/parquet) and documentation
5
+ # assets (notebooks, poster PDFs, images). That pushes the sdist past PyPI's
6
+ # 100 MiB per-file upload limit and breaks the release workflow.
7
+ #
8
+ # Prune everything that is not needed to install and use the package. The wheel
9
+ # already contains only src/cytodataframe; here we keep the sdist lean too.
10
+ prune tests
11
+ prune docs
12
+ prune logo
13
+ prune media
14
+ prune reports
15
+ prune .github
16
+ prune .poetry
17
+
18
+ # Keep the essentials explicitly.
19
+ include README.md
20
+ include LICENSE
21
+ include CITATION.cff
22
+ include pyproject.toml
@@ -0,0 +1,103 @@
1
+ Metadata-Version: 2.4
2
+ Name: cytodataframe
3
+ Version: 0.3.2
4
+ Summary: An in-memory data analysis format for single-cell profiles alongside their corresponding images and segmentation masks.
5
+ Author: Way Science Community
6
+ License-Expression: BSD-3-Clause
7
+ Classifier: Programming Language :: Python :: 3 :: Only
8
+ Classifier: Programming Language :: Python :: 3.11
9
+ Classifier: Programming Language :: Python :: 3.12
10
+ Classifier: Programming Language :: Python :: 3.13
11
+ Requires-Python: <3.14,>=3.11
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: imagecodecs<2027,>=2024.9.22
15
+ Requires-Dist: imageio<3,>=2.37
16
+ Requires-Dist: ipython<10,>=8.12.3
17
+ Requires-Dist: ipyvolume<0.7,>=0.6.3
18
+ Requires-Dist: ipywidgets<9,>=8.1.7
19
+ Requires-Dist: matplotlib<4,>=3.9.3
20
+ Requires-Dist: nest-asyncio2<2,>=1.7
21
+ Requires-Dist: ome-arrow<0.0.12,>=0.0.3
22
+ Requires-Dist: opencv-python<5,>=4.10.0.84
23
+ Requires-Dist: pandas<4,>=2.2.2
24
+ Requires-Dist: pyarrow>=16
25
+ Requires-Dist: pyvista>=0.46.4
26
+ Requires-Dist: pywavelets>1.4.1
27
+ Requires-Dist: scikit-image>0.19.3
28
+ Requires-Dist: trame>=3.12
29
+ Requires-Dist: trame-vtk>=2.10
30
+ Requires-Dist: trame-vuetify>=3.1
31
+ Dynamic: license-file
32
+
33
+ <img height="200" src="https://raw.githubusercontent.com/cytomining/cytodataframe/main/logo/with-text-for-light-bg.png?raw=true">
34
+
35
+ # CytoDataFrame
36
+
37
+ [![PyPI - Version](https://img.shields.io/pypi/v/cytodataframe)](https://pypi.org/project/CytoDataFrame/)
38
+ [![Build Status](https://github.com/cytomining/CytoDataFrame/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/cytomining/CytoDataFrame/actions/workflows/run-tests.yml?query=branch%3Amain)
39
+ ![Coverage Status](https://raw.githubusercontent.com/cytomining/CytoDataFrame/main/media/coverage-badge.svg)
40
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
41
+ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
42
+ [![Software DOI badge](https://zenodo.org/badge/DOI/10.5281/zenodo.14797074.svg)](https://doi.org/10.5281/zenodo.14797074)
43
+
44
+ ![](https://raw.githubusercontent.com/cytomining/coSMicQC/refs/heads/main/docs/presentations/2024-09-18-SBI2-Conference/images/cosmicqc-example-cytodataframe.png)
45
+ _CytoDataFrame extends Pandas functionality to help display single-cell profile data alongside related images._
46
+
47
+ CytoDataFrame is an advanced in-memory data analysis format designed for single-cell profiling, integrating not only the data profiles but also their corresponding microscopy images and segmentation masks.
48
+ Traditional single-cell profiling often excludes the associated images from analysis, limiting the scope of research.
49
+ CytoDataFrame bridges this gap, offering a purpose-built solution for comprehensive analysis that incorporates both the data and images, empowering more detailed and visual insights in single-cell research.
50
+
51
+ CytoDataFrame is best suited for work within Jupyter notebooks.
52
+ With CytoDataFrame you can:
53
+
54
+ - View image objects alongside their feature data using a Pandas DataFrame-like interface.
55
+ - Highlight image objects using mask or outline files to understand their segmentation.
56
+ - Adjust image displays on-the-fly using interactive slider widgets.
57
+ - Display image objects even when bounding box columns are missing, by cropping from compartment-center offsets or rendering whole fields of view.
58
+ - Automatically detect 3D image volumes and render interactive [trame](https://github.com/Kitware/trame) views in notebooks when 3D dependencies are installed (with graceful fallback otherwise).
59
+
60
+ For 3D notebook display behavior:
61
+
62
+ - 3D-aware rendering is enabled by default (`display_options={"auto_trame_for_3d": True}`).
63
+ - Disable automatic trame switching with `display_options={"auto_trame_for_3d": False}`.
64
+ - Force trame layout regardless of auto-detection with `display_options={"view": "trame"}`.
65
+
66
+ For images without bounding box columns (e.g. older CellProfiler outputs or image-level data):
67
+
68
+ - Crop from compartment-center coordinates plus pixel offsets with `display_options={"offset_bounding_box": {"x_min": -20, "y_min": -20, "x_max": 20, "y_max": 20}}` (requires compartment center columns such as `Nuclei_Location_Center_X/Y`).
69
+ - Render the full field of view without cropping with `display_options={"render_whole_image": True}` (works even with no bounding box and no center columns).
70
+
71
+ For row display in notebook/widget tables:
72
+
73
+ - CytoDataFrame respects pandas display settings (`display.max_rows`, `display.min_rows`).
74
+ - When the table is larger than `display.max_rows`, the widget table inserts a midpoint ellipsis row (`…`) to indicate omitted rows.
75
+ - You can control truncation behavior by changing pandas display options before rendering.
76
+
77
+ 📓 ___Want to see CytoDataFrame in action?___ Check out our [example notebook](docs/src/examples/cytodataframe_at_a_glance.ipynb) for a quick tour of its key features.
78
+
79
+ > ✨ CytoDataFrame development began within **[coSMicQC](https://github.com/cytomining/coSMicQC)** - a single-cell profile quality control package.
80
+ > Please check out our work there as well!
81
+
82
+ ## Installation
83
+
84
+ Install CytoDataFrame from source using the following:
85
+
86
+ ```shell
87
+ # install from pypi
88
+ pip install cytodataframe
89
+
90
+ # or install directly from source
91
+ pip install git+https://github.com/cytomining/CytoDataFrame.git
92
+ ```
93
+
94
+ ## Contributing, Development, and Testing
95
+
96
+ Please see our [contributing](https://cytomining.github.io/CytoDataFrame/main/contributing) documentation for more details on contributions, development, and testing.
97
+
98
+ ## References
99
+
100
+ - [coSMicQC](https://github.com/cytomining/coSMicQC)
101
+ - [pycytominer](https://github.com/cytomining/pycytominer)
102
+ - [CellProfiler](https://github.com/CellProfiler/CellProfiler)
103
+ - [CytoTable](https://github.com/cytomining/CytoTable)
@@ -0,0 +1,71 @@
1
+ <img height="200" src="https://raw.githubusercontent.com/cytomining/cytodataframe/main/logo/with-text-for-light-bg.png?raw=true">
2
+
3
+ # CytoDataFrame
4
+
5
+ [![PyPI - Version](https://img.shields.io/pypi/v/cytodataframe)](https://pypi.org/project/CytoDataFrame/)
6
+ [![Build Status](https://github.com/cytomining/CytoDataFrame/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/cytomining/CytoDataFrame/actions/workflows/run-tests.yml?query=branch%3Amain)
7
+ ![Coverage Status](https://raw.githubusercontent.com/cytomining/CytoDataFrame/main/media/coverage-badge.svg)
8
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
9
+ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
10
+ [![Software DOI badge](https://zenodo.org/badge/DOI/10.5281/zenodo.14797074.svg)](https://doi.org/10.5281/zenodo.14797074)
11
+
12
+ ![](https://raw.githubusercontent.com/cytomining/coSMicQC/refs/heads/main/docs/presentations/2024-09-18-SBI2-Conference/images/cosmicqc-example-cytodataframe.png)
13
+ _CytoDataFrame extends Pandas functionality to help display single-cell profile data alongside related images._
14
+
15
+ CytoDataFrame is an advanced in-memory data analysis format designed for single-cell profiling, integrating not only the data profiles but also their corresponding microscopy images and segmentation masks.
16
+ Traditional single-cell profiling often excludes the associated images from analysis, limiting the scope of research.
17
+ CytoDataFrame bridges this gap, offering a purpose-built solution for comprehensive analysis that incorporates both the data and images, empowering more detailed and visual insights in single-cell research.
18
+
19
+ CytoDataFrame is best suited for work within Jupyter notebooks.
20
+ With CytoDataFrame you can:
21
+
22
+ - View image objects alongside their feature data using a Pandas DataFrame-like interface.
23
+ - Highlight image objects using mask or outline files to understand their segmentation.
24
+ - Adjust image displays on-the-fly using interactive slider widgets.
25
+ - Display image objects even when bounding box columns are missing, by cropping from compartment-center offsets or rendering whole fields of view.
26
+ - Automatically detect 3D image volumes and render interactive [trame](https://github.com/Kitware/trame) views in notebooks when 3D dependencies are installed (with graceful fallback otherwise).
27
+
28
+ For 3D notebook display behavior:
29
+
30
+ - 3D-aware rendering is enabled by default (`display_options={"auto_trame_for_3d": True}`).
31
+ - Disable automatic trame switching with `display_options={"auto_trame_for_3d": False}`.
32
+ - Force trame layout regardless of auto-detection with `display_options={"view": "trame"}`.
33
+
34
+ For images without bounding box columns (e.g. older CellProfiler outputs or image-level data):
35
+
36
+ - Crop from compartment-center coordinates plus pixel offsets with `display_options={"offset_bounding_box": {"x_min": -20, "y_min": -20, "x_max": 20, "y_max": 20}}` (requires compartment center columns such as `Nuclei_Location_Center_X/Y`).
37
+ - Render the full field of view without cropping with `display_options={"render_whole_image": True}` (works even with no bounding box and no center columns).
38
+
39
+ For row display in notebook/widget tables:
40
+
41
+ - CytoDataFrame respects pandas display settings (`display.max_rows`, `display.min_rows`).
42
+ - When the table is larger than `display.max_rows`, the widget table inserts a midpoint ellipsis row (`…`) to indicate omitted rows.
43
+ - You can control truncation behavior by changing pandas display options before rendering.
44
+
45
+ 📓 ___Want to see CytoDataFrame in action?___ Check out our [example notebook](docs/src/examples/cytodataframe_at_a_glance.ipynb) for a quick tour of its key features.
46
+
47
+ > ✨ CytoDataFrame development began within **[coSMicQC](https://github.com/cytomining/coSMicQC)** - a single-cell profile quality control package.
48
+ > Please check out our work there as well!
49
+
50
+ ## Installation
51
+
52
+ Install CytoDataFrame from source using the following:
53
+
54
+ ```shell
55
+ # install from pypi
56
+ pip install cytodataframe
57
+
58
+ # or install directly from source
59
+ pip install git+https://github.com/cytomining/CytoDataFrame.git
60
+ ```
61
+
62
+ ## Contributing, Development, and Testing
63
+
64
+ Please see our [contributing](https://cytomining.github.io/CytoDataFrame/main/contributing) documentation for more details on contributions, development, and testing.
65
+
66
+ ## References
67
+
68
+ - [coSMicQC](https://github.com/cytomining/coSMicQC)
69
+ - [pycytominer](https://github.com/cytomining/pycytominer)
70
+ - [CellProfiler](https://github.com/CellProfiler/CellProfiler)
71
+ - [CytoTable](https://github.com/cytomining/CytoTable)