VH-Lab / vhlab-microscopyimageanalysis-matlab

Matlab app for analysis of high density imaging data like that from Array Tomography
0 stars 0 forks source link

Update at_colocalization_neighbors.m #19

Open emmagao29 opened 6 years ago

emmagao29 commented 6 years ago

Is this the way to do it?

stevevanhooser commented 6 years ago

Hi -

So, you don't need to update the overlapthreshold field with a new threshold for this one. The task that at_colocalization_rethreshold performs requires it to re-do the threshold. And the code is held-over, you should delete this bit:

colocalization_data.parameters.threshold = parameters.threshold; colocalization_data.overlap_thresh = colocalization_data.overlap_ab >= parameters.threshold;

(parameters for this function will have a single field, 'number_neighbors', it has no field 'threshold')

But you just want to remove colocalizations that have fewer than N neighbors. Suppose you find all such ROIs and the indexes are in a vector called I.

Then you'll set those entries (i,:) to 0 in the overlapthresh field

for i=1:numel(I), colocalization_data.overlap_thresh(I(i),:)) = 0; end

you'll need to use the same code you used to find the number of neighbors before this, so find the list I

Make sense?

emmagao29 commented 6 years ago

Yes! Thank you so much! I will try my best with it!