-
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
Add informative merge suffixes for platemap and external metadata column collisions #292
Add informative merge suffixes for platemap and external metadata column collisions #292
Conversation
Codecov Report
@@ Coverage Diff @@
## master #292 +/- ##
==========================================
+ Coverage 95.12% 95.17% +0.05%
==========================================
Files 57 57
Lines 3057 3068 +11
==========================================
+ Hits 2908 2920 +12
+ Misses 149 148 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Discussion item regarding understanding the problem and determining where to place solution.
I also see that there is no external metadata test - would you be able to add a test here?
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.
Nice work! I left a few comments for your consideration. Mostly I felt things looked good, but am interested in your thoughts with regards to the approach. As @gwaybio mentioned, I'd also wonder about a test for the external metadata to make sure this works in alignment with the platemap data.
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 @kenibrewer ! I'll get this merged in
Description
This is a breaking change that addresses #249 . It is a breaking change in that output files processed with this version of pycytominer.annotate may differ from those processed by the previous version (but only where metadata column collisions are already happening).
Previously, if a platemap or external metadata table had columns that were already present in the profiles_df un-informative _x, _y suffixes were used that made results more unpredictable and hard to code for. This change will instead leave the profiles_df column names unchanged in annotated_df, and add new columns with either
_platemap
or_external
suffixes.I also included some changes to annotate.py that previously used the string"none"
as an argument instead ofNone
. The latter is more pythonic and the way most users expect to interact with those arguments.EDIT: "None" arg changes moved to #293
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.