-
Notifications
You must be signed in to change notification settings - Fork 307
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
Separate unprofiled samples into separate group in comparison tab #3760
Separate unprofiled samples into separate group in comparison tab #3760
Conversation
p => p.molecularProfileId | ||
); | ||
return Promise.resolve( | ||
this.samples.result!.filter(sample => { |
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 condition could use a comment. like, i don't understand why we use "isSampleProfiledInMultiple" why multiple?
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.
also, seems like a very expensive operation, right? samples x genes x more . maybe no way around it.
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.
isSampleProfiledInMultiple
is a method that checks whether a sample is profiled in multiple profiles, in a way that's more efficient than checking a single profile multiple times. the logic here (I'll add a comment because it is really hard to read) is we want to only consider a sample unprofiled if it is unprofiled in every gene in every profile. yes, it is expensive - samples x genes x profiles. the worst case is when everything is profiled, otherwise the _.every
and the _.some
would both return early. I cant think of a better way to check it unfortunately, let me know if you can
1011886
to
cc4e5e2
Compare
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.
LGTM. Thanks!
cc4e5e2
to
23b390c
Compare
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!
@tmazor @jjgao @inodb @alisman the reason for the screenshot failures is that this PR redefines what it means for a sample to be designated "unprofiled" in the results view filter. whereas before, a sample is considered unprofiled if it is unprofiled for any gene x profile, now it is unprofiled only if for every gene x profile. Just want to confirm that's desired. |
23b390c
to
aa18581
Compare
@adamabeshouse the new logic makes sense. |
aa18581
to
b6cffdf
Compare
@adamabeshouse you're referring to what gets filtered by the option selected below? I hadn't initially considered that the change in this PR would change how that filter functions. I think there is a use case for that filter to work as it previously did. Take this query: https://www.cbioportal.org/results/oncoprint?cancer_study_list=msk_impact_2017&Z_SCORE_THRESHOLD=2.0&RPPA_SCORE_THRESHOLD=2.0&profileFilter=mutations%2Cfusion%2Ccna&case_set_id=msk_impact_2017_cnaseq&gene_list=ACVR1%2520EGFR&geneset_list=%20&tab_index=tab_visualize&Action=Submit&hide_unprofiled_samples=true |
@tmazor I feel like the definition should be unified across tabs, otherwise it could be confusing? Maybe we add another setting that determines how we define "unprofiled"? Maybe it can be a sub-section in the global settings menu, with a radio button that determines whether its "unprofiled for any" or "unprofiled for all"? |
That's a great point @adamabeshouse , and given that both options could be useful in difference scenarios, I like the idea of having a choice. However, if that radio button is also meant to control the definition of the unprofiled group in group comparison, I don't think that will be clear since it's under a filter checkbox. We want that unprofiled group to exist regardless of the status of that filter checkbox. Maybe it just needs to be a separate section in the filter menu after Annotate/Filter? |
@tmazor great point... hmmm... Maybe under a "Definitions" section? |
@adamabeshouse yes let's try a 'Definitions' section! |
Good discussion. I like the idea of having the two options in the filtering menu. Also agreed with Tali that we will need to unprofiled group (not profiled in all). But I am not sure how a Definition section in the filtering menu would help much as it's hidden. I am wondering if it is sufficient to clarify in the group description? When hovering over, we show the group description. |
After some discussion, the decision is:
|
b6cffdf
to
571f225
Compare
@adamabeshouse the unaltered group seems to have disappeared? |
@adamabeshouse also all samples are excluded with the selection below, which doesn't seem right |
@tmazor ah, good catch - its a bug with multiple study queries because it was considering all of the profiles for each sample, when obviously a sample would never be profiled in a different study... Just pushed the fix, let me know if it works. Also worth noting/discussing: I adjusted the filter warning to correspond with the two settings (I couldnt think of a quick way to juxtapose these so I just did screenshots of screenshots, please ignore the jankiness): |
571f225
to
1fb506c
Compare
@adamabeshouse looks good to me. Thanks! |
e0c62eb
to
932bffd
Compare
…parison tab And Specify unprofiled in any or unprofiled in every for results view filtering Signed-off-by: Adam Abeshouse <abeshoua@mskcc.org>
932bffd
to
6601c1d
Compare
cBioPortal/cbioportal#8411
Link