-
Notifications
You must be signed in to change notification settings - Fork 30
Save Colored Pixie Masks #1007
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
Save Colored Pixie Masks #1007
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.
Looks great!
Just a small request: in all three notebooks, can we move the plot_utils.save_colored_masks
code block to before the plot_utils.plot_pixel_cell_cluster_overlay
code block? I think most people will run these chunks of code for a subset of FOVs to test, and then want to generate the masks and colored masks for all FOVs in the cohort (but not look at all FOVs in the notebook - since that would be a shit ton of scrolling). So I think it would be more intuitive to have the mask generation and colored mask generation code together.
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 really nice. No notes.
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 good!
If you haven't already, please read through our contributing guidelines before opening your PR
What is the purpose of this PR?
Allows the user to save both, cell phenotype masks and pixel phenotype masks.
How did you implement your changes
Created a
dataclass
to store the metacluster / coloring information. Refactored a good chunk of what's there to reduce duplicate lines. For testing, created fixtures and applied them elsewhere inplot_utils_test.py
where appropriate.Remaining issues
This pr was a good instance to test an alternative / refactored masking procedure specifically for pixie before tackling #857 again in the near future.
Here is an example image, had to convert the format from TIFF to png to upload.