Open emmagao29 opened 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?
Yes! Thank you so much! I will try my best with it!
Is this the way to do it?