Skip to contents

cellpaintr tests whether a perturbation, such as a drug, changes the morphology of cells reproducibly across a handful of replicates, such as patients or plates. It learns on single cells and tests on replicates: a random forest trained on the cells of all other replicates scores the cells of each held-out replicate (pre-validation), and a patient-level test compares the scores between the two conditions, for all features and for interpretable feature groups such as measurement types or imaging channels.

Workflow

  1. Load a per-cell CellProfiler table with loadData.

  2. Remove poor cells and features with removeOutliers, removeNAs, removeLowVariance, and removeZeroInflation.

  3. Transform and scale the features with transformScale, and optionally remove plate row and column effects with removeRowColEffect.

  4. Score every cell with a classifier that never saw its replicate, with predictLOO.

  5. Test each feature group with calculateStats: an exact permutation test that refits all models for every relabeling of the replicates, or a corrected paired t-test that needs no refits.

  6. Summarize the results with volcanoPlot, plotLOO, plotROC, and plotAUC.

generateData simulates a small CellProfiler table, and system.file("extdata", "jump_subset.csv.gz", package = "cellpaintr") holds a small subset of the JUMP Cell Painting data. The vignette walks through a complete analysis: vignette("cellpaintr-vignette", package = "cellpaintr").

Author

Maintainer: Christof Seiler christof.seiler@usz.ch (ORCID)

Other contributors: