molkart
nf-core/molkart
An analysis pipeline for processing Molecular Cartography data.
Key tools
Run it
nfclaw run molkart --input samplesheet.csv --outdir results -profile dockernextflow run pipelines/molkart/upstream -profile docker --input samplesheet.csv --outdir resultsnfclaw run molkart --demo --outdir results # adds the upstream test profile (-profile test,docker)Inputs
| column | type | required | allowed values | constraints |
|---|---|---|---|---|
sample | string | yes | matches ^\S+$ | |
nuclear_image | string (file path) | yes | matches ^\S+\.(tif|tiff)$ | |
spot_table | string (file path) | yes | matches ^\S+\.(txt|tsv)$ | |
membrane_image | string | no |
--input must match ^\S+\.csv$.
The samplesheet is a CSV with this header (the columns the schema requires); fill each value per the table above and reference.md (no example value is invented here):
sample,nuclear_image,spot_tableAny of the optional columns above may be appended to the header when your data needs them: membrane_image.
From data files. --input may also be the data files — a directory (searched recursively), a quoted glob, or files (--input once per file) — from which nfclaw writes this samplesheet: sample from file names; nuclear_image, spot_table from files matching their patterns, by sample name. Set other columns with --sheet-set COLUMN=VALUE. Preview it with --check; a run records it in <outdir>/provenance/ for replay.
Resources
Resource requests follow the pipeline's configs and selected profiles. nf-core's resource labels often assume a server — a single step can request far more memory than a workstation has, and retry rules can increase requests. If a run fails with Process requirement exceeds available memory (or CPUs), cap every request, and every retry, at what this machine actually has:
nfclaw run molkart --input samplesheet.csv --outdir results -profile docker \ --limit-cpus 4 --limit-memory 15.GBnfclaw turns those into Nextflow's process.resourceLimits and passes them as a -c config — the mechanism nf-core prescribes for exactly this (docs). Set them to the machine's real capacity. --limit-time DURATION also caps how long any one task may run: a task that needs longer is stopped, and so is every retry, so set it only as a deliberate ceiling, never as a guess at how long the analysis takes. The generated config is kept in <outdir>/provenance/, so commands.sh replays the run under the same ceiling.
Nextflow engine
This release declares nextflowVersion = '!>=25.04.0'.
To pin this release's declared minimum engine — useful when a newer Nextflow has incompatible config parsing:
nfclaw run molkart ... --nxf-ver 25.04.0--nxf-ver is recorded in <outdir>/provenance/, so the replay uses the same engine. See known-issues.
Demo
nfclaw run molkart --demo --outdir results # adds the upstream test profile (-profile test,docker)Samplesheet
A CSV with this header (the columns the schema requires). Fill each value per the constraints below; optional columns from the table may be appended.
sample,nuclear_image,spot_table| Column | Type | Required | Allowed / constraints |
|---|---|---|---|
sample | string | required | matches ^\S+$ |
nuclear_image | string (file path) | required | matches ^\S+\.(tif|tiff)$ |
spot_table | string (file path) | required | matches ^\S+\.(txt|tsv)$ |
membrane_image | string | optional | — |
Required parameters
--segmentation-methodstringList of segmentation tools to apply to the image. Allowed values: mesmer, cellpose, stardist, ilastik. Use a comma-separated string without whitespaces for multiple methods.
--inputstring (file path)Path to comma-separated file containing information about the samples in the experiment.
Constraint · matches ^\S+\.csv$
--outdirstring (directory path)The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure.
Parameter explorer
62 parameters · 6 groupsEvery parameter from the pinned nextflow_schema.json. nfclaw checks explicit values before launch; complex rules use the pinned pipeline's runtime validation. Search, filter by group, and expand any parameter for its default, allowed values and constraints.
41 parameters · 21 hidden
Generic options5
Display the help message.
Display the full detailed help message.
URL or local path to location of module test dataset files
Custom MultiQC yaml file containing HTML including a methods description.
Display hidden parameters in the help message (only works when --help or --help_full are provided).
Image Preprocessing8
Contrast limit for localized changes in contrast by CLAHE.
Kernel size to be used by CLAHE.
Number of histogram bins to be used by CLAHE.
Pixel size to be used by CLAHE.
Box size used by Mindagap to overcome gaps, a larger number allows to overcome large gaps, but results in less fine details in the filled grid.
Loop number performed by Mindagap. Lower values are faster, but the result is less good.
Specifies whether contrast-limited adaptive histogram equalization should be skipped.
Skip mindagap if your data does not contain gaps between tiles.
Input Output options4
Email address for completion summary.
Path to comma-separated file containing information about the samples in the experiment.
MultiQC report title. Printed as page header, used for filename if not otherwise specified.
The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure.
Segmentation Methods And options19
Cell probability threshold for Cellpose
Specifies the channel to be segmented by Cellpose.
Specifies nuclear channel index for Cellpose if using pretrained models such as cyto.
Custom Cellpose model can be provided by the user.
Cell diameter, if 0 will use the diameter of the training labels used in the model, or with built-in model will estimate diameter for each image.
Should cells detected near image edges be excluded.
Flow error threshold for Cellpose.
Pretrained Cellpose model to be used for segmentation.
Should flow fields from Cellpose be saved?
Provide ilastik with a multicut project to create segmentation masks.
Provide ilastik with a pixel classification project to produce probability maps.
Compartment to be segmented with Mesmer (nuclear, whole-cell)
Pixel size in microns for segmentation with Mesmer.
Maximum area size (in pixels) for segmentation masks.
List of segmentation tools to apply to the image. Allowed values: mesmer, cellpose, stardist, ilastik. Use a comma-separated string without whitespaces for multiple methods.
Minimum area size (in pixels) for segmentation masks.
Model to use for segmentation with stardist.
Number of tiles on the X axis for Stardist.
Number of tiles on the Y axis for Stardist.
Training Subset options5
Create subset for training a segmentation model.
Number of crops you would like to extract.
Indicates fraction of pixels per crop above global threshold to ensure tissue and not only background is selected.
Indicates crop size on x axis.
Indicates crop size on y axis.
Outputs
Results land in --outdir; the files and directory layout depend on the selected workflow, parameters and publication settings. Run metadata is normally placed in <outdir>/pipeline_info/ (execution report, software versions), when those outputs are enabled. The pinned tree includes MultiQC support; a report is produced only when its workflow step runs. nfclaw run also writes <outdir>/provenance/ with the exact params file and the run log, <outdir>/provenance/logs/run.log — the whole launch, whose last line states the outcome (Nextflow's own log is <outdir>/.nextflow.log); unless --no-provenance it adds a run manifest (pinned version, commit and exact command), input/output SHA-256 checksums, and a replayable commands.sh.
The exact output files and directory layout for this release are documented upstream: github.com/nf-core/molkart/blob/1.2.0/docs/output.md
Check a run — in the foreground or the background — with nfclaw status <outdir>: success, still running, how it ended (with the error), or stopped without an outcome; exit 0 success, 3 running, 1 otherwise.