Fine-tuning analysis parameters
Here you can find additional information on the process of choosing the optimal parameters.
See also
One way to choose the parameters is to use the tools available on the GUI described in this section Tune parameters tab.
Before optmizing the parameters we need to identify the type of problem that we have. There are two types of problems:
Too many spots detected (i.e., too many false positives)
Too few spots detected (i.e, too few true positives)
Let’s start with problem number 1.
Too many spots detected
While there could be many reasons why SpotMAX is detecting too many spots, we can identify these main issues:
Oversegmentation of the spots channel See
Spots segmentation methodparameter.Minimum spot size is too small See
Spot (z, y, x) minimum dimensions (radius)parameter.Ineffective filtering with features See
Features and thresholds for filtering true spotsparameter.Oversegmentation of the reference channel Valid only when
Keep only spots that are inside ref. channel maskis active)
Oversegmentation of the spots channel before spot detection
If you are having too many false positives the first thing to check is whether
you have too many areas where we do not expect spots segmented using the method
selected at the Spots segmentation method parameter.
To check if true, set up all the parameters and then click on the
compute button beside the Spots segmentation method parameter. Inspect the
results and if the problem is there you can try the following steps
Better pre-processing
Increase smoothing: try to increase
Initial gaussian filter sigmaparameter since it might help removing noise, hence reducing the area where SpotMAX will look for spots. Try values like 1.0, 2.0, or even 3.0 and beyond.Activate or deactivate sharpening: try activating/deactivating
Sharpen spots signal prior detectionparameterActivate aggreation: if you have multiple objects (e.g., cells) try activating
Aggregate cells prior analysisparameter. This could help because thresholding on all the cells at once can help reducing the segmented areas where SpotMAX will look for spots.
Better spots segmentation method
This might sound trivial, but make sure that you are using the best
Spots segmentation method. You can tune this in the
Tune parameters tab or by visually inspecting the result of each one
of the available methods.
Minimum spot size is too small
Another common issue for too many false positives is having a minimum spot size that is too small. This is the case when there are multiple detections within the same spot.
To fix this, increase Resolution multiplier in y- and x- direction
and Spot minimum z-size (μm) parameters. You can visually tune
this in the Tune parameters tab.
Ineffective filtering with features
Once you tried all of the above, it might be time to look into filtering valid
spots using the features calculated by SpotMAX. You can set these at the
Features and thresholds for filtering true spots parameter.
To better understand which feature to use, read their description in the section Single-spot features description.
Some of the most used features are the Effect size (vs. backgr.) and the Statistical test (vs. ref. ch.). For example, in the tutorial Count single mitochondrial DNA nucleoids and quantify mitochondrial network volume, we show that it is beneficial to filter those spots whose mean intensity is significantly higher than the same area in the reference channel.
On the other hand, if you want to get rid of dimmer spots (low signal-to-noise ratio (SNR)) any of the effect size described in the seciton Effect size (vs. backgr.) are good candidates, since the effect size is a measure of the SNR of the spot.
Another combination that we found working well, is to use an OR statement
between global and local effect sizes. For example, you could filter spots
whose global OR local Effect size (vs. backgr.) are higher than a
specific value.
Tip
To understand what could be a good minimum effect size, run the analysis without filtering valid spots, load the results into the GUI and check what is the effect size of the spots you want to remove using the tools available in the Inspect and edit results.
Oversegmentation of the reference channel
If you have a reference channel it might be beneficial to use it. SpotMAX can automatically segment it and use it to filter valid spots.
Note
This applies only if you activate the
Keep only spots that are inside ref. channel mask parameter.
However, oversegmentation can lead to keeping spots that are instead outside of
the reference channel. Make sure that you are segmenting the reference channel
correctly by testing with the
compute button beside the
Ref. channel segmentation method.
Too few spots detected
The reasons why SpotMAX does not detect all the true positives are essentially opposite to why it detects too many spots (explained above) and they are the followning:
Undersegmentation of the spots channel See
Spots segmentation methodparameter.Minimum spot size is too large See
Spot (z, y, x) minimum dimensions (radius)parameter.Too aggressive filtering with features See
Features and thresholds for filtering true spotsparameter.Undersegmentation of the reference channel Valid only when
Keep only spots that are inside ref. channel maskis active)
Undersegmentation of the spots channel before spot detection
If you are having too many false positives the first thing to check is whether
you have too many areas where we do not expect spots segmented using the method
selected at the Spots segmentation method parameter.
To check if true, set up all the parameters and then click on the
compute button beside the Spots segmentation method parameter. Inspect the
results and if the problem is there you can try the following steps
Better pre-processing
Decrease smoothing: try to decrase
Initial gaussian filter sigmaparameter since the smoothing could be too aggressive resulting in dimmer spots being filtered out. Try also values below 1.0, like 0.75 or 0.5.Activate or deactivate sharpening: try activating/deactivating
Sharpen spots signal prior detectionparameterDeactivate aggreation: if you have multiple objects (e.g., cells) try deactivating
Aggregate cells prior analysisparameter. This could help especially if you have large variation of the signal intensities between different cells.Activate removal of hot pixels: try activating/deactivating
Remove hot pixelsparameter
Better spots segmentation method
See above Better spots segmentation method.
Minimum spot size is too large
Another common issue for not enough true positives is having a minimum spot size that is too large. This can lead to detecting a single spot where there are two or more, especially when they are very close to each other.
To fix this, decrease Resolution multiplier in y- and x- direction
and Spot minimum z-size (μm) parameters. You can visually tune
this in the Tune parameters tab.
Too aggressive filtering with features
If you are using features with the paramter
Features and thresholds for filtering true spots, make sure
that you are not removing too many spots.
To better understand which feature to use, read their description in the section Single-spot features description.
Some of the most used features are the Effect size (vs. backgr.) and the Statistical test (vs. ref. ch.). For example, in the tutorial Count single mitochondrial DNA nucleoids and quantify mitochondrial network volume, we show that it is beneficial to filter those spots whose mean intensity is significantly higher than the same area in the reference channel. However, if we choose a p-value that is too low we would remove what are instead true spots.
On the other hand, if you are getting rid of dimmer spots using the Effect size (vs. backgr.) try reducing the minimum allowed.
Tip
To understand what could be a good minimum effect size, run the analysis without filtering valid spots, load the results into the GUI and check what is the effect size of the spots you want to remove using the tools available in the Inspect and edit results.
Undersegmentation of the reference channel
If you have a reference channel it might be beneficial to use it. SpotMAX can automatically segment it and use it to filter valid spots.
Note
This applies only if you activate the
Keep only spots that are inside ref. channel mask parameter.
However, undersegmentation can lead to removing spots that are inside the
reference channel. Make sure that you are segmenting the reference channel
correctly by testing with the
compute button beside the
Ref. channel segmentation method.
Nothing works
If you tried many combinations of parameters and nothing seem to work there are three options:
Use external software for some of the analysis steps
Train SpotMAX AI on your data
Submit your case with some sample data
Use external software for some of the analysis steps
Some of the analysis steps within SpotMAX can be replaced with results you
obtain with other software. For example, you could segment the spots or the
reference channel with ilastik, CellProfiler, or TrackMate to cite a
few, save the results to a TIFF file and provide this to SpotMAX at the
parameters Spots channel segmentation end name and
Ref. channel segmentation end name. If you do this, SpotMAX
will not perform these steps and will instead use your external TIFF file.
Train SpotMAX AI on your data
If you have some experience with Python (and ideally access to a GPU) you can easily train the SpotMAX neural network on your data. Few manually annotated images could actually make a big difference.
See this repository for instructions on how to train the model on your data: SpotMAX AI.
Submit your case with some sample data
Feel free to submit your case with some sample data and the parameters you tried so far by opening an issue on our GitHub page or by sending me an email at .
Until next time!