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
Add colocalization metrics #6189
Add colocalization metrics #6189
Conversation
Hello @thanushipeiris! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2022-06-24 05:00:40 UTC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @thanushipeiris. Most of these seem reasonable to provide, but I think perhaps the sum and average cases are a bit too simple and we can let users just do those operations on their own.
I have left some initial comments, but this will need another round of review later. I did not yet look at the tests that were added.
…nto colocalization-metrics
…rguments, changed function names, warning if mask is not binary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the initial updates. See some minor suggestions and a couple of questions about the valid image range for the Manders measures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the updates @thanushipeiris. I am fine with the implementation, but we could use an example somewhere under doc/examples
if you can think of a good demo case using these.
For example, for Pearson I would expect the correlation to be high for color channels of a typical RGB image like astronaut
, but low for the two channels of cells3d
(where one channel is nuclei and the other is membranes). Do we have a reasonable dataset to show typical usage for these Manders coefficients?
Hi @thanushipeiris, just checking in here. I added a small docstring formatting fix. Any chance you could add an example for the gallery? |
Yep will do in the next couple of days, if I find a good set of images with colocalized stains |
@thanushipeiris thank you for all your work so far, it looks great! Would you like to add an example on the gallery? If you don't have time available, we could continue this PR from here. Thanks again! |
…nto colocalization-metrics
…nto colocalization-metrics
Is the addition of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small comment, this PR removes the executable permissions on dev.py
. Probably useful to keep this. Did you do this intentionally? I think I saw a similar change elsewhere and wondering if git or some other tool is messing with us.
…nto colocalization-metrics
…eiris/scikit-image into colocalization-metrics
Nope, not sure where this came from and I have deleted it.
As far as I can see, this PR's dev.py is identical to the scikit-image main branch, even though it's showing up as an "empty" file in the Files changed section of this PR. |
Also the tests are failing with This has been happening for a long time on this PR and I'm not sure why or how to fix it... |
I think GitHub's GUI is just confusing in this instance and the "Empty file." bit just means that there is no diff to show. If you look behind the name of the file here you can see GitHub showing "100755 → 100644"; I guess that's why it shows up in this PR at all. Maybe a leftover from the merge conflict as well. Are you on Linux or similar? Then you can revert that bit with |
We are switching to a new meson-based build system. The error should be resolved if you add the file Oh, and you'll likely need to do the same for test_colocalization.py but in the |
@lagru This looks good to me. I am thinking about releasing 0.20.0rc0 tomorrow and wanted to check whether you thought we should merge this before or after 0.20. If before, feel free to merge. |
"is_thing" implies that only a check is performed. However, as this function also performs a cast at the end, "as_thing" is likely a clearer name. Also be more explicit about the signature.
plt.show() isn't necessary to show the last plot.
I took the liberty to push a few last minor fixes and suggestions. I'll merge once the CI is green. Thank you @thanushipeiris and everyone else who was involved! |
Description
This pull request implements several commonly used pixel-based colocalization metrics for fluorescent microscopy:
A
roi
parameter is provided for each function for users to limit analysis to a particular region of interest.Checklist
./doc/examples
(new features only)./benchmarks
, if your changes aren't covered by anexisting benchmark
For reviewers
later.
__init__.py
.doc/release/release_dev.rst
.