Eliminating undesired elements from text file

I am currently analysing some localisation images produced in ImageJ in Matlab. These images consist of duplicated spots, with different intensities. Although ImageJ does an overall ok job at localising spots, sometimes some "fake spots" are detected, as can be seen in the attatched image. I want to be able to delete these "fake spots" from the output text file (also attatched as csv), so that only the pairs of fluorophores remain. The output text file contains the x and y psoitions of fluorophores, their intensity and so on.
Pairs of fluorophores should be separated by a distance of about 12800nm (although this can vary slightly), so I was thinking of using this separation to exclude fake spots (as they don't have a partner at that distance).
Thank you very much in advance and feel free to ask me for any additional info.

4 comentarios

Cris LaPierre
Cris LaPierre el 17 de Jul. de 2020
What would be an example of a fake spot in your csv file? Are there some rows you could give as examples?
Jose Aroca
Jose Aroca el 17 de Jul. de 2020
Hello. First of all, thanks for your answer. In the image attatched it can be seen that there is a fake spot present in row number 181, with x value 15969.17632nm and y value 2639.13853nm. This is in fact a fake spot because the other values contain pair of spots.
The spot in row 178 corresponds to its pair in row 180 (separated by x-distance 12784nm and with a similar y distance). Similarly, the spot in row 179 corresponds to its pair in row 182 (separated by x-distance 12803nm and similar y coordinate). Therefore, pair of spots should have x-coordinates separated by about 12800nm and similar y distances.
rangesearch() passing in the x and y coordinates, and the maximum permitted range, and taking the second output, D.
Then
no_pair = cellfun(@(dists) all(dists < MinimumRange), D);
and delete the rows for which no_pair is true.
Jose Aroca
Jose Aroca el 18 de Jul. de 2020
Thank you for your answer. How can I make sure that the rangesearch function runs once for every frame. Ie., in the attatched image, I would like the rangesearch funtion to work between rows 1-10, between rows 11-20, rows 21-30, etc. Also, frames need not to be 10 rows long, but by chance the first 3 are.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Productos

Versión

R2020a

Preguntada:

el 17 de Jul. de 2020

Comentada:

el 18 de Jul. de 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by