Alejandro1400 / CellRidgeAnalyzer

0 stars 0 forks source link

[FEAT] STORM processing blinking statistics analysis #6

Open Alejandro1400 opened 1 month ago

Alejandro1400 commented 1 month ago

STORM Processing

For the STORM processing we will be using ThunderSTORM from ImageJ. The documentation for it can be found in the next links:

When using ThunderSTORM the option for Multi-emitter needs to be selected, this helps us analyze as temporal resolution is of greater importance than spatial resolution in blinking statistics analysis. In the section detailing Duty Cycle of the next document it is detailed: Nikon STORM

Therefore, after using STORM, its output will retreive a resolution with overlapping cases resolved, which will help in identifying in higher precision a profiling of molecules over frames.

image

These results may go through multiple filters in ThunderSTORM options but it is suggested to only use Merging and Drift Correction. Density filter is not of interest because we want temporal resolution, Z-stage offset may not have utility as images analyzed for this project are in 2D-resolution.

Local Density Filtering Local Density filtering removes noise by discarding a localization event if the number of neighbors is below a user-specified treshold. (This doesn't interest us because that exact case of a molecule appearing just once is something we want to understand.

Removing Duplicates

Repeated localizations of single molecules can occur due to overlapping fitting using the multi -emitter analysis approach. Here, molecules with a mutual distance smaller than their localization uncertainty are grouped together, and in each group, only the molecule with the smallest localization uncertainty is kept.

Lateral drift correction

Since we are analyzing temporal resolution, drift correction is important for merging molecules and get their profile. In this scenario it would use Cross-correlation or Fiducial Markers solution, where through analyzing batches of frames, the repetition of similar events correlates to estimated fiducial markers for a set of frames

Alejandro1400 commented 1 month ago

The merging algorithm in ThunderSTORM is of no use to us because it outputs just the number of molecules with how many times it was detected. Instead, what we want is to keep the same dataset but adding a column molecule_id according to the merging. Also, by the definition of ThunderSTORM, the intensity is calculated as the sum, which doesn't allow for a temporal profiling.

Therefore, the imlpementation of our own merging algorithm results important

Alejandro1400 commented 1 month ago

I implemented a merging algorithm using KD Tree but looking at the output received in the dashboard, there seems to be many cases where the algorithm is detecting molecules that turn on and off almost instantly and this can surely be a problem of thresholding being applied of what is a molecule.

image

For example, in this graph we can see that there are many turning on-off events but the on states do not last very long. This is a clear indicative that there are problems in finding the molecules

Alejandro1400 commented 1 month ago

Therefore, the first step I am taking into finding these scenarios is to analyze a smaller area of the image. From the first frame I identified somewhere that a molecule is clearly visible and then used with the same parameters the ThunderSTORM algorithm. In this case I used Image 4(same area)_dish(2)_laser_30.0. And a 11.40x8.20 um section.

Just by analyzing the first frame I found that there were 8 'molecules found' but looking at the results there is certainly a trend. Initially we can see probably 4 clear molecules, which are those which have multiple connected components, and therefore occupy a great space. Especially the one in the middle left is very big and we are sure that is a molecule. But, looking at the molecules it identified, there are possible impostors. In which they had a very bright spot but actually very small and are probably not molecules:

image

The thunderstorm output gives us the intensity and offset profile in photons, which may be of great interest:

image

We can actually identify scenarios where the intensity is lower than offset, and when filtering them out we can see that it was clearly one of the molecules which should not be considered and therefore filtered.

image

If we further keep only the scenarios where the intensity is at least 3 times the value of the offset we get to the molecules that we expect are real molecules.

image

image

Now, the idea is to think of how can we actively measure them and filter out through this process.

Alejandro1400 commented 1 month ago

Now also, we may not want to eliminate this values, because these may as well be valuable information of the turning on and off event. But we need a criteria that determines if a molecule is actually just a false positive. My proposed solution is:

image

image

image

image

They are separate scenarios and all have an intensity value lower than the offset. Since these are so isolated cases and have such low intensity then they should not be considered.

This has led to the conclusion that the merging algorithm needs to require 3 things:

  1. A first merging process that connects closely related in both distance and time events of molecules. More than molecules, these are merging of events
  2. The maximum distance needs to be higher than the uncertainty, by a value which is closer to the diffraction limit.
  3. A second merging process should try to connect these initial event merges into molecules. This should be done by from this initial merges, which will have a more accurate localization, comparing the distance and trying to find the closest related, once again the distance should be between 100-200 nm
  4. Possible molecules which are not part of a sequence. A sequence can be a long amount of consecutive frames considered to be a same molecule or a short burst that still excedes a intensity/offset threshold (So that we know they are actually molecules)
  5. Isolated events where the intensity/offset value is very small can be considered false positives
  6. When checking multi-emitter fitting it will become a little more complex to select how they are merged, becasue of the maximum distance. It is a good idea to check cases like the one specified before where 2 different merges are never on the same frame but are consecutive without a clear drop in intensity. This makes it more probable to be the same molecule than being two separate ones very close together.

Guidance for Quantitative Confocal Microscopy Analysis ThunderSTORM basic guide