Skip to content
Single-cell & spatiallatest-release

spatialaxe

nf-core/spatialaxe

A pipeline to process spatialomics data from 10x Xenium In Situ or 10x Atera.

version1.0.1748d310ac0Aug 6, 2026 Upstream Usage docs

Key tools

MultiQC

Run it

nfclaw
nfclaw run spatialaxe --input samplesheet.csv --outdir results --mode <mode> -profile docker
raw nextflow
nextflow run pipelines/spatialaxe/upstream -profile docker --input samplesheet.csv --outdir results --mode <mode>
demo · bundled test profile
nfclaw run spatialaxe --demo --outdir results # adds the upstream test profile (-profile test,docker)

Inputs

columntyperequiredallowed valuesconstraints
samplestringyesmatches ^\S+$
bundlestringyesmatches ^\S+$
imagestringnomatches ^\S+$

--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):

csv
sample,bundle

Any of the optional columns above may be appended to the header when your data needs them: image.

From data files. nfclaw cannot generate this samplesheet: the samplesheet declares no file type nfclaw could match files against (no column's pattern names a file extension).

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:

bash
nfclaw run spatialaxe --input samplesheet.csv --outdir results --mode <mode> -profile docker \
--limit-cpus 4 --limit-memory 15.GB

nfclaw 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:

bash
nfclaw run spatialaxe ... --nxf-ver 25.04.0

--nxf-ver is recorded in <outdir>/provenance/, so the replay uses the same engine. See known-issues.

Demo

bash
nfclaw run spatialaxe --demo --outdir results # adds the upstream test profile (-profile test,docker)
<!-- Generated from nf-core/spatialaxe@748d310ac01943c97a15bdbc27ec2525a3ee0a96. Do not edit by hand. -->

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.

samplesheet.csv header
sample,bundle
ColumnTypeRequiredAllowed / constraints
samplestringrequiredmatches ^\S+$
bundlestringrequiredmatches ^\S+$
imagestringoptionalmatches ^\S+$

Required parameters

--inputstring (file path)

Path to comma-separated file containing information about the Xenium experiment. (eg; meta,path-to-xenium-bundle,path-to-morphology.ome.tif))

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.

--modestring

Mode in which the pipeline is to be run. Either image-based segmentation, coordinate-based segmentation, segmentation-free analysis or data preview.

imagecoordinatesegfreepreviewqc

Parameter explorer

103 parameters · 4 groups

Every 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.

83 parameters · 20 hidden

Generic options3

Display the full detailed help message.

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).

Input Output options19

Image alignment file containing similarity transform matrix. (e.g., the _imagealignment.csv file exported from Xenium Explorer)

Model to use for running or starting training.

Email address for completion summary.

Path to gene panel JSON file to use for relabeling transcripts with the correct gene.

Gene synonyms that may have been counted as off-targets but simply differ in name.

Path to comma-separated file containing information about the Xenium experiment. (eg; meta,path-to-xenium-bundle,path-to-morphology.ome.tif))

Segmentation method to run.

Mode in which the pipeline is to be run. Either image-based segmentation, coordinate-based segmentation, segmentation-free analysis or data preview.

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.

Fasta file for the probe sequences used in the xenium experiment.

Path to qupath segmentation file in GeoJSON format.

Path to the directory containing genomic features (.gff) and fasta (.fa) files used as reference annotations.

Prior segmentation mask from other segmentation methods.

StarDist pretrained model for cell segmentation (e.g., '2D_versatile_fluo', '2D_versatile_he').

StarDist tiling for large images (e.g., '4 4'). Reduces memory usage.

StarDist non-maximum suppression threshold. Lower values reduce overlapping detections.

StarDist pretrained model for nuclei segmentation.

StarDist object probability threshold. Lower values detect more objects.

Institutional Config options1

Base path / URL for data used in the test profiles.

Segmentation options60

Number of samples to process per batch during prediction

Number of samples to process per training batch

Path to Baysor config TOML file (optional).

Prior segmentation type for Baysor. 'cells' uses Xenium bundle cell_id column; 'cellpose' uses Cellpose mask as image prior.

Baysor prior-segmentation-confidence (0-1).

Baysor --scale parameter for non-tiled runs.

Enable tiled Baysor segmentation (divide transcripts into patches, run Baysor per patch, stitch results).

Balance transcripts across tiles by merging sparse tiles.

Tile width in microns for Baysor tiling.

Minimum molecules per cell (--min-molecules-per-cell) for tiled Baysor.

Post-stitch cell filtering threshold: minimum transcripts per cell.

Overlap between Baysor patches in microns.

Baysor --scale for tiled runs (larger to compensate for EM on smaller tiles).

Specify the name of the boundary stain to use or disable. Supported for cell segmentation staining workflow output bundles. Possible options are: \"ATP1A1/CD45/E-Cadherin\" (default) or \"disable\"

Process only one sample at a time from a multi-sample samplesheet.

Number of sample(s) to process at a time from a multi-sample samplesheet. Works if buffered_samples is true.

Whether to use connected components for grouping transcripts without direct nucleus association

Whether to only run nucleus segmentation.

Pre-downscale morphology image to avoid Cellpose OOM on large images.

AWS Batch queue for Cellpose (single large GPU).

Number of tiles along the x axis for cell-type separability.

Number of tiles along the y axis for cell-type separability.

Minimum intensity in photoelectrons (pe) to filter nuclei. Default: 100. (appropriate range of values is 0 to 99th percentile of image stack or 1000, whichever is larger)

Number of devices (GPUs) to use during training

Nuclei boundary expansion distance in µm. Default: 5 (Min: 0, Max: 15 if either boundary-stain or interior-stain are enabled and 100 if nucleus-expansion only)

List of features to be passed to the ficture method. (eg: TP53,OCIAD1,BCAS3,SOX)

Whether to filter the transcripts.parquet file before running Baysor segmentation.

Input data platform. Used by proseg, segger, and spatialdata modules.

AWS Batch queue for GPU tasks (e.g., Segger, ProSeg).

List of image-based segmentation methods.

Specify the name of the interior stain to use or disable. Supported for cell segmentation staining workflow output bundles. Possible options are: \"18S\" (default) or \"disable\"

Number of training epochs

only keep transcripts whose x-coordinate is less than specified limit, if no limit is specified, the default value will retain all transcripts since Xenium slide is <24000 microns in x and y (default: 24000.0)

only keep transcripts whose y-coordinate is less than specified limit, if no limit is specified, the default value will retain all transcripts since Xenium slide is <24000 microns in x and y (default: 24000.0)

Minimum Q-Score to pass filtering.

only keep transcripts whose x-coordinate is greater than specified limit, if no limit is specified, the default minimum value will be 0.0

only keep transcripts whose y-coordinate is greater than specified limit, if no limit is specified, the default minimum value will be 0.0

Regex used to identify or match negative control samples in a dataset.

Whether to only run nucleus segmentation.

Whether to run the off-target probe tracking.

IQR multiplier for empirical cell size filtering during stitching.

Post-stitch cell size filtering method. Options: 'empirical' (IQR-based), 'distribution' (z-score), 'both', or null to disable.

Z-score threshold for distribution-based cell size filtering during stitching.

Grid layout for tiling (rows x cols), e.g. '3x3', '4x4'.

Overlap between adjacent patches in microns.

Whether to relabel genes with gene_panel.json file. True when gene_panel is provided.

Whether to run the qc layer in the pipeline.

List of segmentation-free methods.

Device used for training. (e.g., cuda for GPU or cpu)

Method for KNN computation. (e.g., cuda for GPU-based computation)

Path to a pre-trained Segger model checkpoint.

Number of data-loader workers for Segger.

Whether to run refinement on the image-based segmentation methods. Runs coordinate-based methods after the initial image-based segmentation run.

Whether to enhance the morphology.ome.tif file.

Height of the tiles in pixels

Width of the tiles in pixels

Enable tiled segmentation for large datasets. Divides transcripts into overlapping patches, runs segmentation in parallel per patch, then stitches results.

List of transcript-based segmentation methods.

Enable GPU acceleration (set automatically by the gpu profile).

Whether to run vanilla xeniumranger workflow.

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/spatialaxe/blob/1.0.1/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.