This repository contains the image analysis and image-based profiling pipeline for a cardiac fibroblast drug screen. It turns raw Cell Painting images into single-cell and bulk (well-level) morphology profiles for the 44 screen plates and the validation plate. This repository does not train models or call hits. The cardiac_fibrosis_rescue_screen_hit_calling repository uses the profiles for those analyses.
- 11 plate map layouts with 4 replicate plates each (44 plates in three batches), plus one validation plate
- 550 small molecule treatments and two controls: DMSO-treated failing and non-failing (healthy) cells
- A modified Cell Painting stain that swaps the RNA/nucleoli stain for F-actin, giving five channels: nuclei (d4), endoplasmic reticulum (d3), Golgi/plasma membrane (d2), mitochondria (d1), and F-actin (d0)
This plate map layout is the same for plates 1 through 10.
This plate map layout is specific to plate 11, which is a partial plate.
Each numbered module has a README with details and a bash script that runs it.
| Module | What it does |
|---|---|
0.download_data |
Instructions for downloading the images |
1.whole_image_qc |
Flag over-saturated and blurry images with CellProfiler |
2.illumination_correction |
Correct uneven illumination and skip images that fail QC |
3.cellprofiler_processing |
Segment cells and extract morphology features with CellProfiler |
4.image_based_profiling |
Convert features to parquet, filter poor-quality cells, normalize, correct plate-position effects, and aggregate to single-cell and bulk profiles |
5.validation_plate_profiling |
Runs the same steps (illumination correction through bulk profiles) on the validation plate |
Supporting folders:
metadata: plate maps and barcodes, including treatment and pathway annotationsutils: shared helper functionsenvironments: the conda environment for CellProfiler (the uv Python environment is defined bypyproject.tomlanduv.lockin the repository root)
- CellProfiler environment (
fibrosis_cp_env): CellProfiler, for image QC, illumination correction, and feature extraction (modules 1, 2, 3, and the validation plate equivalents) - Python environment (a uv project:
pyproject.tomlanduv.lock): pycytominer, CytoTable, and coSMicQC, for image-based profiling (module 4 and the validation plate profiling)
The profiles depend on the pycytominer version, so the lockfile pins pycytominer 1.7.1 and the packages that the existing profiles were checked with. Create the environments from the root of this repository:
mamba env create -f environments/cellprofiler_env.yml
uv sync --lockedenvironments/hpc_create_envs.sh creates the CellProfiler environment on a Slurm cluster. Run uv sync --locked there for the Python environment.
The pipeline produces single-cell and bulk profiles, which module 4 documents in detail. Large intermediate files, such as images and parquet files, are not tracked by git.

