Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update at_colocalization_neighbors.m #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

emmagao29
Copy link
Collaborator

Is this the way to do it?

@stevevanhooser
Copy link
Contributor

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
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants