-
Notifications
You must be signed in to change notification settings - Fork 1
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
Redo segmentations #7
base: main
Are you sure you want to change the base?
Redo segmentations #7
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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.
LGTM! Exciting to see this optimization, super interesting! I left some comment and one major concern for mycoplasma with the nuclei, other than that nice job!
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.
Woahhh that IC hurts haha. Maybe would require some changes, one I can recommend is definitely changing from background to regular method and go from there. Very odd!
Also GSDMC is definitely better for segmentation only because there is clear contrast, those other channels are very messy... interesting stuff!
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.
Looks to be empty unfortunately :(((((
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.
What is the red line? Mean of the diameter?
Also, very interesting how small the nuclei are, but I am not as familiar with the data so it might be expected! Might need some coSMicQC if those diameters are cluster nuclei/over-segmented haha
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.
45 diameter looks to be pretty optimal! Unfortunately I can't see all of the options though.
One main thing I noticed (that we chatted about in person) was that these nuclei look very messy and look to contain mycoplasma, in my opinion. I have only seen it once and these nuclei look very similar to what I saw for mycoplasma.
As we discussed, it would be good to ask the collaborators to test the cells to ensure no contamination.
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.
I don't see any examples in this file for what the cell segmentations look like, so I can't provide feedback on that unfortunately :(((
# save to a dict for later use | ||
for img in nuclei: | ||
img = normalize(img) | ||
masks, flows, styles, diams = model.eval(img, channels=channels, diameter=50) |
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.
Totally agree with this diameter!
#!/usr/bin/env python | ||
# coding: utf-8 | ||
|
||
# This notebook focuses on trying to find a way to segment cells within organoids properly. |
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.
# This notebook focuses on trying to find a way to segment cells within organoids properly. | |
# This notebook focuses on trying to find a way to segment cells properly. |
Same comment as in the nuclei segmentation script.
|
||
# ## Cellpose | ||
|
||
# In[ ]: |
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.
Missing here.
# get masks for all the images | ||
# save to a dict for later use | ||
for img in imgs: | ||
# masks, flows, styles, diams = model.eval(img, diameter=diameter, channels=channels) |
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.
Recommend removing commented out code.
# This notebook focuses on trying to find a way to segment cells within organoids properly. | ||
# The end goals is to segment cell and extract morphology features from cellprofiler. | ||
# These masks must be imported into cellprofiler to extract features. |
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.
Consider updating this to reflect the cytoplasm issue checking.
This PR performs segmentations within python to import masks into CellProfiler later for feature extraction