[](https://github.com/nf-core/microscopycellpose/actions/workflows/ci.yml)
[](https://github.com/nf-core/microscopycellpose/actions/workflows/linting.yml)[](https://nf-co.re/microscopycellpose/results)[](https://doi.org/10.5281/zenodo.XXXXXXX)
[](https://www.nf-test.com)
[](https://www.nextflow.io/)
[](https://docs.conda.io/en/latest/)
[](https://www.docker.com/)
[](https://sylabs.io/docs/)
[](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-core/microscopycellpose)
[](https://nfcore.slack.com/channels/microscopycellpose)[](https://twitter.com/nf_core)[](https://mstdn.science/@nf_core)[](https://www.youtube.com/c/nf-core)
## Introduction
**nf-core/microscopycellpose** is a bioinformatics pipeline for analyzing multi-channel microscopy videos in TIFF format. The pipeline processes time-lapse microscopy data with multiple fluorescent channels (Caspase 3, Actin/Tubulin, Calcium, Brightfield) and performs cell segmentation using Cellpose on the Actin/Tubulin channel.
The pipeline performs the following steps:
1. **Multi-channel TIFF preprocessing** - Extracts individual channels from multi-channel TIFF files and resizes images for optimal processing
2. **Cell segmentation** - Uses Cellpose with the cyto3 model to segment cells from the Actin/Tubulin channel
3. **Quality control reporting** - Generates comprehensive reports with MultiQC
## Usage
> [!NOTE]
> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.
First, prepare a samplesheet with your input data that looks as follows:
`samplesheet.csv`:
```csv
sample,tiff
sample1,/path/to/your/microscopy_video1.tif
sample2,/path/to/your/microscopy_video2.tif
```
Each row represents a multi-channel TIFF file containing microscopy time-lapse data. The TIFF files should have 4 channels in the following order:
- Channel 0: Caspase 3
- Channel 1: Actin/Tubulin (used for segmentation)
- Channel 2: Calcium
- Channel 3: Brightfield
Now, you can run the pipeline using:
```bash
nextflow run nf-core/microscopycellpose \
-profile \
--input samplesheet.csv \
--outdir results \
--diameter 45 \
--model_type cyto3
```
You can customize the Cellpose segmentation parameters:
- `--diameter 45`: Expected cell diameter in pixels (number, default: 45)
- `--model_type cyto3`: Cellpose model to use (string, options: cyto, cyto2, cyto3, nuclei)
- `--flow_threshold 0.8`: Flow error threshold (number, default: 0.8)
- `--cellprob_threshold -1.0`: Cell probability threshold (number, default: -1.0)
- `--gpu false`: Enable GPU acceleration (boolean, default: false)
> [!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](https://nf-co.re/docs/usage/getting_started/configuration#custom-configuration-files).
For more details and further functionality, please refer to the [usage documentation](https://nf-co.re/microscopycellpose/usage) and the [parameter documentation](https://nf-co.re/microscopycellpose/parameters).
## Pipeline output
To see the results of an example test run with a full size dataset refer to the [results](https://nf-co.re/microscopycellpose/results) tab on the nf-core website pipeline page.
For more details about the output files and reports, please refer to the
[output documentation](https://nf-co.re/microscopycellpose/output).
## Credits
nf-core/microscopycellpose was originally written by Seqera AI.
We thank the following people for their extensive assistance in the development of this pipeline:
## Contributions and Support
If you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).
For further information or help, don't hesitate to get in touch on the [Slack `#microscopycellpose` channel](https://nfcore.slack.com/channels/microscopycellpose) (you can join with [this invite](https://nf-co.re/join/slack)).
## Citations
An extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](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](https://dx.doi.org/10.1038/s41587-020-0439-x).