Link Search Menu Expand Document

Running mcmicro

The basic pipeline execution consists of 1) ensuring you have the latest version of the pipeline, followed by 2) using --in to point the pipeline at the data.

# Get the latest version of the pipeline
nextflow pull labsyspharm/mcmicro

# Run the pipeline on exemplar data (starting from the registration step, by default)
nextflow run labsyspharm/mcmicro --in path/to/exemplar-001

# Use --tma to dearray a tissue microarray and process each core in parallel
nextflow run labsyspharm/mcmicro --in path/to/exemplar-002 --tma

After a successful run, the following text will be displayed:

screenshot after successful run

The pipeline will also generate the following directory, depending on the modules used:

├── markers.csv
├── raw/
├── illumination/
├── registration/
├── dearray/            # When working with TMA array(using --tma flag during execution)
├── probability-maps/
├── segmentation/
├── quantification/
└── qc/

Visual inspection of quality control (qc/) files is recommended after completing the run. Depending on the modules used, directories coreo/, unmicst/ and s3seg/ may contain .tif images for inspection. More details on output files and quality control can be found in Directory Structure.

Specifying start and stop modules

By default, the pipeline starts from the registration step and stops after executing the quantification step. Use --start-at and --stop-at flags to execute any contiguous section of the pipeline instead. Any subdirectory name listed in Directory Structure is a valid starting and stopping point. Note that starting at any step beyond registration requires pre-computed output of the previous steps placed at the correct location in the project directory.

# If you already have a pre-stitched TMA image, start at the dearray step
nextflow run labsyspharm/mcmicro --in path/to/exemplar-002 --tma --start-at dearray

# If you want to run the illumination profile computation and registration only
nextflow run labsyspharm/mcmicro --in path/to/exemplar-001 --start-at illumination --stop-at registration

Specifying path for intermediate files

By default Nextflow writes intermediate files to a work/ directory inside whatever location you initiate a pipeline run from. Use -w flag to provide a different location. (See below for more information about these files.)

nextflow run labsyspharm/mcmicro --in /path/to/exemplar-001 -w /path/to/work/

Specifying module-specific parameters

The pipeline provides a sensible set of default parameters for individual modules. To change these use
--ashlar-opts, --unmicst-opts, --s3seg-opts and --quant-opts. For example,

nextflow run labsyspharm/mcmicro --in /path/to/exemplar-001 --ashlar-opts '-m 35 --pyramid'

will provide -m 35 --pyramid as additional command line arguments to ASHLAR.

Using YAML parameter files

As the number of custom flags grows, providing them all on the command line can become unwieldy. Instead, parameter values can be stored in a YAML file, which is then provided to nextflow using
-params-file. The general rules of thumb for composing YAML files:

  1. Anything that would appear as --param value on the command line should be param: value in the YAML file.
  2. Anything that would appear as --flag on the command line should be flag: true in the YAML file.
  3. The above only applies to double-dashed arguments (which are passed to the pipeline). The single-dash arguments (like -profile) cannot be moved to YAML, because they are given to nextflow; the pipeline never sees them.

More information about the YAML syntax.

For example, consider the following command:

nextflow run labsyspharm/mcmicro --in /data/exemplar-002 --tma --start-at dearray --ashlar-opts '-m 35 --pyramid'

All double-dashed arguments can be moved to a YAML file (e.g., myexperiment.yml) using the rules above:

in: /data/exemplar-002
tma: true
start-at: dearray
ashlar-opts: -m 35 --pyramid

The YAML file can then be fed to the pipeline via

nextflow run labsyspharm/mcmicro -params-file myexperiment.yml