Run SpotMAX from the command line (headless)

To run SpotMAX from the command line you will need to create a configuration INI file (extension .ini) containing the analysis parameters.

Note

While it is possible to modify a INI template file or write one from scratch we highly recommend to generate it using the GUI. See this section for more details Run SpotMAX from the GUI.

The configuration file is separated into sections with the same name you will find in the GUI.

Once you have the configuration file, you can simply run SpotMAX in the command line by typing the following command:

spotmax - p path/to/configuration_file.ini

Important

Remember to first activate the environment where you installed SpotMAX otherwise the command spotmax will not be found. Refer to the installation guide for details about activating the environment How to install SpotMAX.

Additional resources

This is how a configuration file looks like:

[File paths and channels]
Experiment folder path(s) to analyse = /spotmax/docs/source/tutorials/data/smFISH_yeast/Position_2
Spots channel end name = MDN1
Cells segmentation end name = segm.npz
Reference channel end name = DAPI
Spots channel segmentation end name = 
Ref. channel segmentation end name = 
Table with lineage info end name = acdc_output.csv
Run number = 1
Text to append at the end of the output files = tutorial
File extension of the output tables = .csv

[METADATA]
Number of frames (SizeT) = 1
Analyse until frame number = 1
Number of z-slices (SizeZ) = 25
Pixel width (μm) = 0.07206
Pixel height (μm) = 0.07206
Voxel depth (μm) = 0.24
Numerical aperture = 1.4
Spots reporter emission wavelength (nm) = 668.0
Spot minimum z-size (μm) = 1.0
Resolution multiplier in y- and x- direction = 1.5
Spot (z, y, x) minimum dimensions (radius) = (4.17, 6.06, 6.06) pixel
                                             (1.0, 0.437, 0.437) micrometer

[Pre-processing]
Aggregate cells prior analysis = True
Remove hot pixels = False
Initial gaussian filter sigma = 0.75
Sharpen spots signal prior detection = True

[Reference channel]
Segment reference channel = True
Keep only spots that are inside ref. channel mask = False
Use the ref. channel mask to determine background = False
Ref. channel is single object (e.g., nucleus) = True
Ref. channel gaussian filter sigma = 2.0
Sigmas used to enhance network-like structures = 0.0
Ref. channel segmentation method = Thresholding
Ref. channel threshold function = threshold_otsu
Save reference channel segmentation masks = False
Save pre-processed reference channel image = False

[Spots channel]
Spots segmentation method = spotMAX AI
Spot detection threshold function = threshold_li
Spots detection method = peak_local_max
Features and thresholds for filtering true spots = 
Optimise detection for high spot density = True
Compute spots size (fit gaussian peak(s)) = False
Save spots segmentation masks = False
Save pre-processed spots image = False

[SpotFIT]
Bounds interval for the x and y peak center coord. = 0.1
Bounds interval for the z peak center coord. = 0.2
Bounds for sigma in x-direction = 0.5, spotsize_yx_radius_pxl
Bounds for sigma in y-direction = 0.5, spotsize_yx_radius_pxl
Bounds for sigma in z-direction = 0.5, spotsize_z_radius_pxl
Bounds for the peak amplitude = 0.0, spotsize_A_max
Bounds for the peak background level = spot_B_min, inf

[Configuration]
Folder path of the log file = ~\spotmax_appdata\logs
Folder path of the final report = 
Filename of final report = 
Disable saving of the final report = False
Use default values for missing parameters = False
Stop analysis on critical error = True
Use CUDA-compatible GPU = False
Number of threads used by numba = -1
Reduce logging verbosity = False

[neural_network.init.spots]
model_type = 2D
preprocess_across_experiment = False
preprocess_across_timepoints = False
gaussian_filter_sigma = 1.0
remove_hot_pixels = False
config_yaml_filepath = /spotmax/nnet/config.yaml
PhysicalSizeX = 0.07206
resolution_multiplier_yx = 1.0
use_gpu = False

[neural_network.segment.spots]
threshold_value = 0.9
label_components = False