-
Notifications
You must be signed in to change notification settings - Fork 31
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
Reveal selected samples from a selected node in a tandem plot #243
Conversation
This is really exciting! Haven't gone through the code yet but when I click on the root node I get the following browser error: ... and, after this, I can't select any nodes (the menus don't even come up; I just get the same error again, for both tips and internal nodes): Looks like Emperor is breaking somewhere? Not sure. |
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.
This looks cool. I have a few (mostly minor) suggestions, but once those are addressed (and once the matching PR (#237) is merged in to master and we verify that it fixes the issues with this I brought up earlier), then this should be good to merge.
empress/core.py
Outdated
@@ -24,6 +24,8 @@ | |||
TEMPLATES = os.path.join(SUPPORT_FILES, 'templates') | |||
SELECTION_CALLBACK_PATH = os.path.join(SUPPORT_FILES, 'js', | |||
'selection-callback.js') | |||
TIP_CLICK_CALLBACK_PATH = os.path.join(SUPPORT_FILES, 'js', | |||
'tip-click-callback.js') |
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.
This callback is called tip-click-callback
, but it looks like this information is also sent over for internal nodes. Should this just be renamed to node-click-callback
or something?
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.
Sorry, it looks like this conversation was marked as resolved but I don't think this change was applied...
|
||
ec.decViews.scatter.setEmissive(0x000000, samples); | ||
ec.sceneViews[0].needsUpdate = true; | ||
}); |
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.
This code looks OK, but would suggest renaming the module to node-click-callback or something (see the comment in core.py).
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.
(sorry, this was marked as resolved but i don't think has been addressed... if i'm misunderstanding something just let me know)
Co-authored-by: Marcus Fedarko <[email protected]>
@fedarko should be ready for another pass, thanks! |
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.
There are a couple unresolved things that I don't think have been addressed? Once those are handled this should be fine. (I remember this happened a while back, and it turns out that GitHub just broke or something for me and wasn't showing the updated things... but I pulled all of the latest code and I think some things really are missing. But if I'm wrong, just let me know.)
Thanks!
empress/core.py
Outdated
@@ -24,6 +24,8 @@ | |||
TEMPLATES = os.path.join(SUPPORT_FILES, 'templates') | |||
SELECTION_CALLBACK_PATH = os.path.join(SUPPORT_FILES, 'js', | |||
'selection-callback.js') | |||
TIP_CLICK_CALLBACK_PATH = os.path.join(SUPPORT_FILES, 'js', | |||
'tip-click-callback.js') |
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.
Sorry, it looks like this conversation was marked as resolved but I don't think this change was applied...
|
||
ec.decViews.scatter.setEmissive(0x000000, samples); | ||
ec.sceneViews[0].needsUpdate = true; | ||
}); |
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.
(sorry, this was marked as resolved but i don't think has been addressed... if i'm misunderstanding something just let me know)
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.
Changes look good to me. Once #237 is in and we've verified that it addresses the issues discussed earlier, we can merge this.
empress/core.py
Outdated
filter_extra_samples, | ||
ignore_missing_samples, |
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.
this order disagrees with the parameter names in validate_and_match
. I got around this by switching the param order in tools.match_inputs()
as done in this other branch's commit:
Lines 58 to 67 in aa40f2b
def match_inputs( | |
bp_tree, | |
table, | |
sample_metadata, | |
feature_metadata=None, | |
ordination=None, | |
filter_extra_samples=False, | |
ignore_missing_samples=False, | |
filter_missing_features=False | |
): |
Co-authored-by: Marcus Fedarko <[email protected]>
Users can now reveal selected samples by clicking on a node in the tree. Selections are shown when a node is clicked, and hidden when the node's menu is removed from the screen.
This was paired-programmed with @kwcantrell 🥇