Supplying parameters to MCMICRO
MCMICRO uses default values for any settings not specified in a parameter file. MCMICRO will resolve conflicting parameter values with a priority list.
Parameters can be supplied in two ways,
- by providing
params.yml
as a file (RECOMMENDED)- in the project directory
- or by pointing to a
params.yml
file in another directory
- by overwriting individual parameters on the command line.
On this page, you will find more information about how to supply parameters to the pipeline for each of these methods, how to change where intermediate files are stored.
Option 1: Parameter files (RECOMMENDED)
Parameters must be specified in standard YAML format using the following three namespaces:
workflow
- pipeline-level parameters controlling overall behavior of MCMICRO
options
- module-level parameters that will be forwarded to individual tools- the entries are matched against
name
fields inmodules
- the entries are matched against
modules
- module specifications, such as container name and version, whether the module uses 0-based or 1-based indexing, etc. (For advanced users!)
Please see the subpages for more information about the parameters for the workflow, options, and modules namespaces.
An example params.yml
may look as follows:
workflow:
start-at: registration
stop-at: quantification
viz: true
segmentation-channel: 1 5
options:
ashlar: --flip-y -c 5
s3seg: --maxima-footprint-size 5
modules:
watershed:
version: 1.4.0-large
Note: When supplying multiple option
parameters for the same module, only use the module name ONCE. See the line for ashlar
in the example above.
Specifying an external parameter file
By default, MCMICRO will look for params.yml
in the project directory. If you want to use the same parameter values for multiple projects, you can instead create a single myparams.yml
file (elsewhere) and supply the path to this file to the pipeline with --params
:
## External parameter files can be supplied with --params
nextflow run labsyspharm/mcmicro --in /path/to/project1 --params /path/to/externalparams.yml
## The same parameter file can then be used in multiple projects
nextflow run labsyspharm/mcmicro --in /path/to/project2 --params /path/to/externalparams.yml
Values specified in the external externalparams.yml
will overwrite any values found in params.yml
files of individual project directories. See parameter prioritization below.
Option 2: Overwriting individual parameters
Individual parameters can be overwritten directly on the command line. This provides an opportunity for “one-off” runs without the need to modify existing parameter files.
## Most workflow parameters can be specified as is
nextflow run labsyspharm/mcmicro --in /path/to/project --start-at segmentation
## There is no need to explicitly specify "true" for binary parameters
nextflow run labsyspharm/mcmicro --in /path/to/project --tma --viz
## Enclose multiple values inside single quotes
nextflow run labsyspharm/mcmicro --in /path/to/project --segmentation-channel '1 5'
## Add -opts suffix for module specific options
nextflow run labsyspharm/mcmicro --in /path/to/project --ashlar-opts '-m 50'
Parameter value prioritization
If the pipeline is supplied with conflicting parameters, the conflicting values will be resolved according to the following prioritization:
- (Lowest) Default parameter values in config/defaults.yml.
- Parameter values in
params.yml
of the project directory- (We recommend supplying parameters within your project directory)
- Parameter values in a YAML file provided via
--params
. - (Highest) Individual parameters provided as double-dashed command-line arguments (e.g.,
--start-at
)
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.
nextflow run labsyspharm/mcmicro --in /path/to/my-data -w /path/to/work/