scieee AI-readable full text Open interactive document viewer

Exploring single‑cell images and profiles together with CytoDataFrame

Bunten, David; Tomkinson, Jenna; Way, Gregory

Abstract

Image‑based profiling involves the analysis of vast tables of profiles alongside many related cellular images. Context-switching between tables of feature data and image viewers makes it challenging to build an intuition of profiles and their corresponding cellular objects. CytoDataFrame solves this by bringing each cell or compartment object picture and feature data into one interactive table for Jupyter notebook environments. With CytoDataFrame, you can: Keep context at a glance. Every row shows both the features (for example, size, shape, or intensity) and an image of the same cell, so you immediately know what the data represent. Adjust on the fly. Brightness sliders and mask toggles let you explore the images directly in jupyter. For example, highlight segmentation errors or unusual cells without writing extra code. Filter and explore. Select subpopulations such as outliers, specific phenotypes, or quality‑control failures so you can make decisions alongside the visual representation of biological objects. Stay in your workflow. Extending Pandas DataFrames, it works with your favorite analysis and plotting commands, and exports results for downstream sharing or publication. Integration with coSMicQC. CytoDataFrame integrates directly with coSMicQC, which is quality control software for single-cell segmentations. coSMicQC functions return CytoDataFrames so you can make quality control decisions alongside images of cells. By unifying images and profiles in a single view, CytoDataFrame accelerates troubleshooting, improves data quality checks, and helps teams spot biological patterns faster. It makes your next discovery just a click away, perfect for anyone doing high‑content imaging.

Full text

Exploring single-cell images and profiles together with CytoDataFrame Dave Bunten¹, Jenna Tomkinson¹, Gregory P. Way¹ ¹Department of Biomedical Informatics, University of Colorado Anschutz Medical Campus I. Why separate profiles and images? Figure1: Feature tables and images often live in separate tools, making it hard to build intuition about single cells. CytoDataFrame keeps them together in one interactive table inside your notebook. High-content screens produce millions of rows of features and many images. Jumping between a DataFrame and an image viewer slows exploration and hides issues like segmentation or image errors. CytoDataFrame puts an image thumbnail right next to the row’s features so you can see how features relate to images. II. CytoDataFrame for integrated analysis Figure2: Images and profile data may be mixed using Pandas idioms through Jupyter interfaces to create a unified experience for bioimage analysts and data scientists. CytoDataFrame is a small package built on top of pandas.DataFrame that embeds inline images (cells, nuclei, or other compartments) alongside per-object features within Jupyter notebook interfaces. Using CytoDataFrame enables you to: •Keep context at a glance - Each row shows the features and the object. •Filter and explore - Subset outliers, phenotypes, or QC flags and see what they look like immediately. •Stay in your workflow - It behaves like a DataFrame; your plotting, modeling, and exports still work. •Fantastic for integrations - Tight integration with packages such as coSMicQC returns CytoDataFrames so you can act on QC signals with visuals. III. Using CytoDataFrame in Python ⧈ a) Install # install CytoDataFrame from PyPI pip install cytodataframe ⧈ b) View images with your profiles from cytodataframe import CytoDataFrame # Load features and images together. CytoDataFrame( data="BR00117006.parquet", data_context_dir="images/orig", )[[ "Metadata_ImageNumber", "Cells_Number_Object_Number", "Image_FileName_OrigAGP", "Image_FileName_OrigDNA", "Image_FileName_OrigRNA", ]] ⧈ c) Show segmented objects with profiles # load outlines to show segmented images CytoDataFrame( data="BR00117006.parquet", data_context_dir="images/orig", data_outline_context_dir=f"images/outlines", )[[ "Metadata_ImageNumber", "Cells_Number_Object_Number", "Image_FileName_OrigAGP", "Image_FileName_OrigDNA", "Image_FileName_OrigRNA", ]] ⧈ d) Change display configuration for images # change the color of your outlines (and more!) CytoDataFrame( data="BR00117006.parquet", data_context_dir="images/orig", data_outline_context_dir=f"images/outlines", display_options={ "outline_color": (200, 100, 255) }, )[[ "Metadata_ImageNumber", "Cells_Number_Object_Number", "Image_FileName_OrigAGP", "Image_FileName_OrigDNA", "Image_FileName_OrigRNA", ]] ⧈ e) Add scale bars for objects # add scale bars using reproducible configuration CytoDataFrame( data="BR00117006.parquet", data_context_dir="images/orig", data_outline_context_dir=f"images/outlines", display_options={ "pixel_per_um": 0.1550, "scale_bar": {"length_um": 100, "location": "lower right", "color": (255, 255, 255), "thickness_px": 2, "margin_px": 5,}, }, )[[ "Metadata_ImageNumber", "Cells_Number_Object_Number", "Image_FileName_OrigAGP", "Image_FileName_OrigDNA", "Image_FileName_OrigRNA", ]] IV. coSMicQC leverages CytoDataFrames import cosmicqc # find and label outliers for single-cell data find_outliers( df=CytoDataFrame( data="single-cell-profiles.parquet, data_context_dir="images/orig", data_outline_context_dir=f"images/outlines", display_options={"center_dot": False, "outline_color": (180, 30, 180), "brightness": 20, }, ), metadata_columns=metadata_columns, feature_thresholds={ "Nuclei_Intensity_MassDisplacement_CorrDNA": 0.05, "Nuclei_Intensity_IntegratedIntensity_CorrDNA": 1.5, }, )[[ "Nuclei_Intensity_MassDisplacement_CorrDNA", "Nuclei_Intensity_IntegratedIntensity_CorrDNA", "Image_FileName_OrigDNA", ]] coSMicQC functions can return CytoDataFrames, letting you pair quality control flags with images to make immediate, visual decisions and improve your profiling outcomes. V. Acknowledgements We thank those who have inspired, contributed, or helped support CytoDataFrame and the Cytomining Ecosystem: •Open source science from the teams behind CellProfiler •Members of the Way Lab at the University of Colorado Anschutz Medical Campus •Department of Biomedical Informatics within the School of Medicine at the University of Colorado Anschutz Medical Campus CytoDataFrame A Cytomining Ecosystem project (https://github.com/cytomining) https://github.com/cytomining/CytoDataFrame