cellpaintr: perturbation analysis of Cell Painting data
Source:R/cellpaintr-package.R
cellpaintr-package.Rdcellpaintr 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
Load a per-cell CellProfiler table with
loadData.Remove poor cells and features with
removeOutliers,removeNAs,removeLowVariance, andremoveZeroInflation.Transform and scale the features with
transformScale, and optionally remove plate row and column effects withremoveRowColEffect.Score every cell with a classifier that never saw its replicate, with
predictLOO.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.Summarize the results with
volcanoPlot,plotLOO,plotROC, andplotAUC.
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:
Phatthamon Laphanuwat phatthamon.laphanuwat@usz.ch [contributor]
Caroline Ospelt caroline.ospelt@usz.ch [contributor]
European League Against Rheumatism [funder]
Swiss National Science Foundation [funder]