Closed ElDeveloper closed 4 years ago
Really cool! I guess a good start would be to copy the sample names to the clipboard so a user can copy/paste them to another tool. This, makes me wonder how this new feature will work in the large PCoA's we have been creating, for example the +113K samples one. Perhaps, then as a following step (other PR), it would be nice to be able to define some kind of API so that selection creates a button, that can be pressed and a new filter of the distance matrix and pcoa job can be sent do QIIME2/Qiita (I can imagine a config file that allows configuration of this feature) ...
This should be ready for review merge the main things that have changed since last time:
/*__click_callback__*/
. This can be used to insert the code for a 3rd party application, like in Empress. This could potentially be used for Qiita 🐾 .Here's how things look with a small dataset:
And for a sample set with 80K samples, everything remains fairly responsive:
Only a few minor comments; BTW should all three.js-plugins/*.js be minimized?
We haven't in the past since there's a couple of things that we modify for our own code. Some patches which have been accepted in mrdoob/three.js some which haven't (yet).
Thanks for reviewing @antgonza!
The user can now hold shift and select a group of samples (see animated GIF):
Now that the functionality is in place, we have to decide what do we do with the selected samples. For now the color is changed, and the sample list is printed to the console. Next, we can copy the list of samples to the clipboard. In any case this callback will be helpful to integrate with other visualization tools.
You'll notice this required that THREE was updated to the latest version. A number of API calls were updated along the way. Changes to any of those JavaScript files should pretty much be ignored.