Table of contents
- Frequently Asked Questions
- Pipeline execution
- Q: How do I resume a pipeline run that halted partway?
- Q: My computer has an Apple M1 chip and the pipeline is failing at the Segmentation step. What can I do?
- Q: MCMICRO doesn’t seem to recognize my file format. How do I tell it what files to look for?
- Q: My execution environment doesn’t support Docker. Can I run MCMICRO using Singularity instead?
- Pipeline execution
The intermediate files in the
work/ directory allow you to restart a pipeline partway, without re-running everything from scratch. For example, consider the following scenario:
# This run will fail because --some-invalid-arg is not a valid argument for UnMicst nextflow run labsyspharm/mcmicro --in ~/data/exemplar-001 --unmicst-opts '--some-invalid-arg' # N E X T F L O W ~ version 21.10.6 # Launching `labsyspharm/mcmicro` [wise_pasteur] - revision: bdfd39da0e [master] # executor > local (2) # [- ] process > illumination - # [64/0cb43c] process > registration:ashlar [100%] 1 of 1 ✔ # [- ] process > dearray:coreograph - # [fe/f60c41] process > segmentation:worker (unmicst-1) [100%] 1 of 1, failed: 1 ✘ # [- ] process > segmentation:s3seg - # [- ] process > quantification:mcquant - # [- ] process > cellstates:worker - # Address the issue by removing the invalid argument and restart the pipeline with -resume nextflow run labsyspharm/mcmicro --in ~/data/exemplar-001 -resume N E X T F L O W ~ version 21.10.6 Launching `labsyspharm/mcmicro` [reverent_cori] - revision: bdfd39da0e [master] executor > local (3) [- ] process > illumination - [64/0cb43c] process > registration:ashlar [100%] 1 of 1, cached: 1 ✔ # <-- NOTE: Cached [- ] process > dearray:coreograph - [61/d7614c] process > segmentation:worker (unmicst-1) [100%] 1 of 1 ✔ [6b/06cd6b] process > segmentation:s3seg (1) [100%] 1 of 1 ✔ [5a/d17d36] process > quantification:mcquant (1) [100%] 1 of 1 ✔ [- ] process > cellstates:worker -
As you run the pipeline on your datasets, the size of the
work/ directory can grow substantially. Use nextflow clean to selectively remove portions of the work directory. Use
-n flag to list which files will be removed, inspect the list to ensure that you don’t lose anything important, and repeat the command with
-f to actually remove the files:
# Remove work files associated with most-recent run nextflow clean -n last # Show what will be removed nextflow clean -f last # Proceed with the removal # Remove all work files except those associated with the most-recent run nextflow clean -n -but last nextflow clean -f -but last
A: You can use ilastik for probability map generation instead. To do so, specify
--probability-maps ilastik in your command to run MCMICRO
nextflow run labsyspharm/mcmicro --in /my/path/exemplar-001 --probability-maps ilastik
nextflow run labsyspharm/mcmicro --in /my/path/exemplar-002 --tma --probability-maps ilastik
This is because UnMICST (
segmentation:worker (unmicst-1)) currently does not work on the M1 architecture. Fortunately, ilastik is supported by M1. See GitHub Issue #353 for more details.
If you came here from Step 3 in Tutorials, head back to Tutorials to finish the rest of the steps!
A: By default, MCMICRO looks for a small number of image formats that we have verified to work. In principle, MCMICRO can be applied to any Bio-Formats compatible images. We make a distinction between images stored as single files (e.g.,
.png) and those stored as an index file that points to other files (e.g.,
.ndpis, etc.). Place all image files into the
raw/ subdirectory and specify the file extension(s) to look for with
nextflow run labsyspharm/mcmicro --in /my/project --single-formats png
for single-file image formats and
nextflow run labsyspharm/mcmicro --in /my/project --multi-formats ndpis
for multi-file formats. Note that in the latter case, you need to specify the extension of the index file (
.ndpis in this case) and not the individual files being indexed (
.ndpi in this case).
Yes, MCMICRO can be configured to use Singularity in place of Docker. Use the
-profile flag to switch configurations:
nextflow run labsyspharm/mcmicro --in /my/project -profile singularity
A: Use the
--ilastik-model parameter. Note that the parameter must be specified outside
--ilastik-opts. For example,
nextflow run labsyspharm/mcmicro --in /my/data --probability-maps ilastik --ilastik-model mymodel.ilp
A: After a successful MCMICRO run, two-channel tif files containing DAPI and nuclei/cell/cytoplasm outlines will reside in
qc/s3seg. Segmentation quality can be assessed through visual inspection of these files in, e.g., napari.
A: There are two adjustments to make:
--scalingFactorfor UnMicst, which controls the ratio of the current pixel width (W2) to exemplar pixel width (W1) and is not related to area (See schematic).
- In S3Segmenter,
--cytoDilationcontrols the number of pixels from the edge of the nucleus to expand in creating the cytoplasm mask. Take the value optimized for 2x binned images and multiply it by 2 (i.e., if
--cytoDilation 3is optimal for 2x binning, then the new value will
--s3seg-opts to pass the new values to UnMicst and S3Segmenter, respectively:
nextflow run labsyspharm/mcmicro --in /path/to/unbinned/data --unmicst-opts '--scalingFactor 0.5' --s3seg-opts '--cytoDilation 6'
--quant-opts to specify the
--masks parameter for quantification. Any file found in the corresponding
segmentation/ folder can be provided here. For example,
nextflow run labsyspharm/mcmicro --in /path/to/exemplar-001 --quant-opts '--masks cell.ome.tif nuclei.ome.tif'
will quantify cell and nuclei masks. The corresponding spatial feature tables can then be found in
--quant-opts to specify the corresponding
--intensity_props parameter for quantification:
nextflow run labsyspharm/mcmicro --in /path/to/exemplar-001 --quant-opts '--intensity_props median_intensity'
Area is in pixels.