-
Notifications
You must be signed in to change notification settings - Fork 35
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
Implementing DeepProfiler single cell output and normalization #210
Implementing DeepProfiler single cell output and normalization #210
Conversation
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 - I'm excited to have this functionality in pycytominer!
I have only one feature request. Can you add the functionality to output the non-normalized single cell features inside setup_normalize()
? (I've suggested a rename to get_singlecells()
)
I've made several suggestions to making this change. I haven't tested these suggestions so please make sure that I've thought all the logic through.
I've also just now kicked off the continuous integration tests. If these pass then the only change required for the test suite is to add a test for the new output single cell functionality.
Co-authored-by: Gregory Way <gregory.way@gmail.com>
Co-authored-by: Gregory Way <gregory.way@gmail.com>
Co-authored-by: Gregory Way <gregory.way@gmail.com>
Co-authored-by: Gregory Way <gregory.way@gmail.com>
Co-authored-by: Gregory Way <gregory.way@gmail.com>
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.
Congrats on the successful integration tests!
Two other comments, see below. Then I think we can merge.
single_cells = single_cells_DP.get_single_cells(output=True) | ||
single_cells_normalized = single_cells_DP.normalize_deep_single_cells( |
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.
Can you add a test where you apply normalize()
to single_cells
as described in 43 using the exact same normalize logic used in .normalize_deep_single_cells()
and pd.DataFrame.assert_equal
?
It would be good to test the internal normalize logic has expected behavior as an external application.
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.
Unfortunately I had to do a bit of strangling with the locations
to make the DP data compatible with normalize()
. Let me know if the changes in b754251 work for the pandas assertion.
Co-authored-by: Gregory Way <gregory.way@gmail.com>
Co-authored-by: Gregory Way <gregory.way@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #210 +/- ##
==========================================
- Coverage 95.74% 95.51% -0.24%
==========================================
Files 53 53
Lines 2611 2695 +84
==========================================
+ Hits 2500 2574 +74
- Misses 111 121 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
Description
As of commit
e1091b3
, DeepProfiler saves features in the formatfeatures/plate/well/site.npz
This change allowspycytominer.cyto_utils.DeepProfilerData
to work with this format withfilename_delimiter = "/"
. ADeepProfilerData
object can be used withAggregateDeepProfiler
to aggregate the data (as in current version of pycytominer) or withSingleCellDeepProfiler
to load and normalize single cell embeddings.What is the nature of your change?
Checklist
Please ensure that all boxes are checked before indicating that a pull request is ready for review.
@gwaybio This is ready for review.