Skip to content

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

Merged
merged 4 commits into from
Jun 6, 2023
Merged

Conversation

srivarra
Copy link
Contributor

@srivarra srivarra commented Jun 1, 2023

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 in plot_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.

fov0_cell_mask_colored

@srivarra srivarra self-assigned this Jun 1, 2023
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@srivarra srivarra added the enhancement New feature or request label Jun 1, 2023
@srivarra srivarra marked this pull request as ready for review June 1, 2023 20:35
Copy link
Contributor

@cliu72 cliu72 left a 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.

Copy link
Contributor

@camisowers camisowers left a 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.

@srivarra srivarra requested review from cliu72 and ngreenwald June 5, 2023 21:08
Copy link
Contributor

@cliu72 cliu72 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@ngreenwald ngreenwald added this pull request to the merge queue Jun 6, 2023
Merged via the queue into main with commit c0c31ed Jun 6, 2023
@ngreenwald ngreenwald deleted the pixie/save_colored_phenotype_maps branch June 6, 2023 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Save the colored pixel/cell phenotype maps at the end of the Pixie notebooks
4 participants