Skip to content
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

Fix handling of Spearman correlation (et al) with NaN value from server #4107

Merged
merged 1 commit into from
Jan 3, 2022

Conversation

alisman
Copy link
Collaborator

@alisman alisman commented Jan 3, 2022

Related to cBioPortal/cbioportal#9148

image

Issue comes from this service when you submit only one bin.

https://www.cbioportal.org/api/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisEnd=1&xAxisLogScale=false&xAxisStart=0&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisLogScale=false&yAxisStart=0

Service returns NaN for the correlation values which javascript then barfs on. This PR will just print NaN instead of white screen so it's improvement.

There seems to be a problem with selection mechanism wherein if you choose less than four bars, it considers it just a single bar. Questions are:
A) should service return NaN?
B) should selection UI allow selection of a single bar? When you drag from within a bar, how should that affect selection?

@alisman alisman requested a review from inodb January 3, 2022 15:55
Copy link
Member

@inodb inodb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@inodb
Copy link
Member

inodb commented Jan 3, 2022

@alisman My thoughts on the questions:

A) I think it makes sense to return NA when no correlation can be computed with given input
B) Selection of single bar makes sense to me. When starting from within a bar, it should select the whole bar

@alisman alisman merged commit 3422512 into cBioPortal:master Jan 3, 2022
@alisman alisman deleted the density branch January 3, 2022 20:01
@inodb inodb added the bug label Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants