-
Notifications
You must be signed in to change notification settings - Fork 26
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 nuclear filtering functionality to pixel clustering pipeline #653
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@@ -174,7 +174,7 @@ | |||
"cell_type": "markdown", |
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.
Rather than having this as None, we should tell the user to skip the cell if they don't want to run it
Reply via 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 good, just a minor tweak
…eck for valid seg_dir if provided
Co-authored-by: Noah F. Greenwald <noahfgreenwald@gmail.com>
* Add nuclear mask filtering to som_utils * Add nuclear filtering method to pixel clustering notebook * Print informative message instead of error if seg_dir is None, and check for valid seg_dir if provided * Remove extra print statement * Update ark/phenotyping/som_utils.py Co-authored-by: Noah F. Greenwald <noahfgreenwald@gmail.com> Co-authored-by: Noah F. Greenwald <noahfgreenwald@gmail.com>
* change notebook names * Update README.md * Text changes for clustering description * testbook fix * Readme adjustements, waiting for Pixie preprint * Add PIxie preprint * added pixie to citation section * added years to citation links * overview fix * bolding fix * Add nuclear filtering functionality to pixel clustering pipeline (#653) * Add nuclear mask filtering to som_utils * Add nuclear filtering method to pixel clustering notebook * Print informative message instead of error if seg_dir is None, and check for valid seg_dir if provided * Remove extra print statement * Update ark/phenotyping/som_utils.py Co-authored-by: Noah F. Greenwald <noahfgreenwald@gmail.com> Co-authored-by: Noah F. Greenwald <noahfgreenwald@gmail.com> * Ensure channel norm and pixel norm files get re-computed if a new set of channels are provided (#654) * Initial commit of normalization updates * Remove capsys call * Provide more robust support by resetting entire pixel_output_dir if new set of channels provided * readme updates * readme updates * improved pairwise spatial enrichment analysis notebook name * fixed mantis-link in readme Co-authored-by: Candace Liu <candace.liu94@gmail.com> Co-authored-by: Sricharan Reddy Varra <srivarra@stanford.edu> Co-authored-by: alex-l-kong <31424707+alex-l-kong@users.noreply.github.com>
What is the purpose of this PR?
Closes #619. Prior to pixel clustering, users may need to filter out non-nuclear marker signal from the nucleus and vice-versa for nuclear marker signal.
How did you implement your changes
Add a function
filter_with_nuclear_mask
tosom_utils
which runs this process. The code in #619 provides most of the functionality, however we'll need to make two modifications:seg_dir is not None
prior to running. Users may run pixel clustering without segmentation labels, however they will not be able to run this function if that's the case because it relies on the_feature_1.tiff
files.channel
defaults toNone
in the notebook and function. This is the easiest guard against errors caused by running all the cells at once in the notebook.The cell that calls this function in
example_pixel_clustering
will be placed after the smoothing process.This PR also solidifies some of the notebook testing, as it was not using the renamed channels after smoothing. This should also apply for the nuclear filtering tests too.