qurro
qurro copied to clipboard
Support configurable "rank types"
progress
- [ ] rename ranking selector label
- [ ] rename rank plot y-axis label
- [ ] remove python code that sends a "rank type" to the JS code in one of the JSONs
- [ ] remove JS code that makes these changes based on the rank type
- [ ] un-break JS unit tests checking that these changes are applied
- [ ] Adjust standalone Qurro CLI accordingly
problem explanation
So here's the problem: if you perform Aitchison PCA yourself (for example, in the soon-to-be-merged-in color composition tutorial -- thanks @cameronmartino!!!), you already have the sample and feature loadings conveniently in a DataFrame. It's totally possible to just output the feature loadings to a TSV file, and then use that in standalone Qurro as the --ranks
. (This is easier than building up a skbio OrdinationResults object yourself.) edit: the tutorial currently does that to avoid this problem.
However, a problem with that is that Qurro's code sees that you passed in a TSV file and assumes that it was a file of differentials -- so the Qurro interface will be all like "yeah check out all of these differentials that just happen to be named PC1, PC2, PC3, ..." for the ranking selector and for the rank plot y-axis, which is obviously misleading since these aren't differentials.
![Screen Shot 2020-03-03 at 1 56 36 PM](https://user-images.githubusercontent.com/4177727/75823480-ae3c9d00-5d56-11ea-85fa-fbf2e0ee00fa.png)
One solution to this problem is adding a --rank-type
command-line parameter for standalone Qurro that'd let you adjust the text shown in the interface, but I feel like no one will use that. An easier solution (and one that would also knock out a lot of the problems associated with #281) would just be renaming the ranking selector back from Differential
/Feature Loading
to just Ranking
, and renaming the y-axis prefix from Differential
/Feature Loading
to Magnitude
or Value
or something.