Parameter Reference

Here we provide parameter options for each workflow in MIAAIM. Commands are added in the

Note

For up-to-date references of parameters for each workflow, visit the Workflow GitHub Repositories

Nextflow

Parameters passed are passed directly using the indicated flags below. See here for a full description of flags that can be passed to Nextflow. We have listed those below that are necessary for MIAAIM to run or are commonly used in our own usage.

Nextflow parameters

Flag

Description

Options

-with-report

generate provenance report

-resume

resume workflow with cached results

--profile

use indicated configuration profile

standard
small
medium
big
multi
hyper
LSFsmall
LSFbig_multi

--start-at

start workflow at indicated position

input
hdiprep
hdireg

--start-at

start workflow at indicated position

hdiprep
hdireg

--fixed-image

fixed image for registration

*.ome.tiff
*.ome.tif
*.tiff
*.hdf5
*.h5
*.nii
*.imzml

--moving-image

moving image for registration

*.ome.tiff
*.ome.tif
*.tiff
*.hdf5
*.h5
*.nii
*.imzml

--fixed-pars

fixed image preprocessing yaml file

--moving-pars

moving image preprocessing yaml file

--elastix-pars

elastix registration parameters

--transformix

apply transformation matrix

--transformix-pars

transformix parameters

Note

When supplying file names as parameters, do not indicate the file’s full path – only include the file name. For example, do not enter --fixed-image path/to/image.ome.tiff. Instead, enter --fixed-image image.ome.tiff.

Warning

If your input file is in the .imzml format, be sure to include the associated .ibd file in the same directory that the image is stored.

Note

You can start a workflow at an intermediate step, such as hdireg, as long as you have the appropriate intermediate files present. hdiprep produces files with the suffix _processed.

Warning

Nextflow does not currently see contents of parameters supplied to the registration workflow. This means that resuming your analysis after changing elastix parameter files will produce cached results. To fix this, change the file name, or start the workflow at the hdireg step without using the resume flag.

HDIprep

Here we list the optional input parameters that can be supplied to the HDIprep workflow through the YAML parameter file. These parameters are passed to both the fixed and moving images with separate YAML files.

–fixed-pars and –moving-pars

YAML Step / Flag

Description

Options

Step : ImportOptions

options for reading image data

flatten:

flatten pixels for dimension reduction

Options:
True if compressing images
False if histology processing

subsample:

subsample image for compression

Options:
True if subsampling pixels
False if no subsampling

method:

subsampling method

Options:
'grid' for uniform grid sampling
'random' for random coordinate sampling
'pseudo_random' for random sampling
initalized by uniform grids

grid_spacing:

x and y grid spacing for sampling

Options:
Example : (5,5)

n:

random / pseudo_random sampling fraction

Options:
Ex. : 0.15

masks:

TIFF mask to compress image portion

Options:
Ex. : 'moving-mask.tiff'

save_mem:

reduce memory footprint

Options:
True for large image compression
False if interactive Python code

Step : ProcessingSteps

steps to process images

- RunOptimalUMAP

steady-state compression

Options:
n_neighbors nearest neighbors (Ex. 15)
landmarks spectral centroids (Ex. 3000)
metric UMAP metric (Ex. euclidean)
random_state seed (Ex. 1)
dim_range range of dimensionalities (Ex. (1,10))
**kwargs kwargs passed to UMAP

- RunUMAP

UMAP compression

**kwargs passed to UMAP

- RunOptimalParametricUMAP

neural network steady state UMAP

Options:
n_neighbors nearest neighbors (Ex. 15)
landmarks spectral centroids (Ex. 3000)
metric UMAP metric (Ex. euclidean)
random_state seed (Ex. 1)
dim_range range of dimensionalities (Ex. (1,10))
**kwargs kwargs passed to UMAP

- RunParametricUMAP

neural network UMAP compression

**kwargs passed to UMAP

- SpatiallyMapUMAP

reconstruct compressed image

- ApplyManualMask

apply manual mask

Options:
mask accessed from ImportOptions

- MedianFilter

median filter (remove salt and pepper noise)

Options:
filter_size filter disk size (Ex. 15)
parallel use parallel processing (True or False)

- Threshold

create mask by thresholding

Options:
type threshold type ('manual' or 'otsu')
thresh_value manual threshold value (Ex. 1.0)
correction multiply threshold for stringent results (Ex. 1.2)

- Open

morphological closing on mask

Options:
disk_size filter disk size (Ex. 15)
parallel use parallel processing (True or False)

- Close

resume workflow with cached results

Options:
disk_size filter disk size (Ex. 15)
parallel use parallel processing (True or False)

- Fill

Fill holes in mask

- ApplyMask

apply mask to image for final processing step

- NonzeroBox

extract image bounding box (for controlled padding)

Step : ExportNifti1

export in the NIfTI format

Options:
padding pad to add to images image (Ex. (50,50))
target_size resize image before padding (Ex. (1000,1050))

HDIreg

—elastix-pars

Flag

Description

Options

--p

parameter file(s) for registration

*.txt

--mp

moving image landmark points

*.txt

--fp

fixed image landmark points

*.txt

--fMask

fixed image mask

*.tif

Tip

You can chain together multiple elastix parameter files by supplying multiple inputs. For example, an affine registration followed by a nonlinear one can be implemented as --p affine.txt nonlinear.txt where affine.txt and nonlinear.txt are your parameter files.

—transformix-pars

Flag

Description

Options

--tps

transformation parameter file(s)

*.txt

--target_size

resize image before padding

(Ex. (1000,1050))

--pad

pad to add to images image

(Ex. (50,50))

--trim

number of pixels to trim off edges

(Ex. 50)

--out_ext

aligned image final file format

.ome.tiff
.ome.tif
.tiff
.hdf5
.h5
.nii

Tip

If you use multiple registration parameter files in elastix, then you should add both sets of transformation parameters to the transformix command to receive final results. From the above example, two transformation parameter files would be exported – TransformationParameters.0.txt for the affine registration and TransformationParameters.1.txt for nonlinear. Your transformix call should be --tps TransformationParameters.0.txt TransformationParameters.1.txt