Fix handling of Spearman correlation (et al) with NaN value from server #4107
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to cBioPortal/cbioportal#9148
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?