Introduction

nf-core/cellpainting is a bioinformatics pipeline for scalable, reproducible image-based profiling of Cell Painting assays. It takes high-content microscopy images, applies illumination correction, extracts morphological features with CellProfiler, and converts the results to analysis-ready Parquet files with CytoTable.

The pipeline supports two modes controlled by --cellprofiler_mode:

  • assay_development — illumination correction and single-site QC only
  • analysis (default) — full pipeline including feature extraction and format conversion

Loading graph

The pipeline performs the following steps:

  1. Compute illumination correction functions per channel and plate (CellProfiler)
  2. Segment a single site per well for visual QC (CellProfiler)
  3. Extract morphological features per site (CellProfiler) — analysis mode only
  4. Convert CellProfiler CSV outputs to Parquet (CytoTable) — analysis mode only
  5. Aggregate QC metrics into a report (MultiQC)

Usage

Note

If you are new to Nextflow and nf-core, please refer to this page on how to set-up Nextflow. Make sure to test your setup with -profile test before running the workflow on actual data.

First, prepare a samplesheet with your input data. The samplesheet is in tall format with one row per image:

samplesheet.csv
channel,path,source,batch,plate,well,site,row,col
Mito,/data/images/r01c01f01p01-ch1sk1fk1fl1.tiff,source_4,Batch1,BR00117035,A01,1,1,1
DNA,/data/images/r01c01f01p01-ch5sk1fk1fl1.tiff,source_4,Batch1,BR00117035,A01,1,1,1
ER,/data/images/r01c01f01p01-ch4sk1fk1fl1.tiff,source_4,Batch1,BR00117035,A01,1,1,1
RNA,/data/images/r01c01f01p01-ch3sk1fk1fl1.tiff,source_4,Batch1,BR00117035,A01,1,1,1
AGP,/data/images/r01c01f01p01-ch2sk1fk1fl1.tiff,source_4,Batch1,BR00117035,A01,1,1,1

Each row maps a single .tif/.tiff image to its channel and plate/well/site metadata. See usage docs for the full column reference.

Now, you can run the pipeline using:

nextflow run nf-core/cellpainting \
   -profile <docker/singularity/.../institute> \
   --input samplesheet.csv \
   --outdir <OUTDIR>

To run in assay development mode (QC only, no full analysis):

nextflow run nf-core/cellpainting \
   -profile <docker/singularity/.../institute> \
   --input samplesheet.csv \
   --cellprofiler_mode assay_development \
   --outdir <OUTDIR>
Warning

Please provide pipeline parameters via the CLI or Nextflow -params-file option. Custom config files including those provided by the -c Nextflow option can be used to provide any configuration except for parameters; see docs.

For more details and further functionality, please refer to the usage documentation and the parameter documentation.

Pipeline output

For more details about the output files and reports, please refer to the output documentation.

Credits

nf-core/cellpainting was originally written by Kenneth Brewer.

Contributions and Support

If you would like to contribute to this pipeline, please see the contributing guidelines.

For further information or help, don’t hesitate to get in touch on the Slack #cellpainting channel (you can join with this invite).

Citations

An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md file.

You can cite the nf-core publication as follows:

The nf-core framework for community-curated bioinformatics pipelines.

Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.

Nat Biotechnol. 2020 Feb 13. doi: 10.1038/s41587-020-0439-x.