empress icon indicating copy to clipboard operation
empress copied to clipboard

Support alternate (smaller) display for taxonomy levels with ancestor information

Open fedarko opened this issue 3 years ago • 1 comments

One consequence of the fix implemented in #487 is that it makes individual taxonomic classifications at each level much longer than before (since now we're including ancestor information). See the example screenshots below of the moving pictures tree, colored by Level 4 (order) taxonomic classifications.

Old New (#487)
old new

It's not a major thing, but some users might prefer the thinner legends in older versions of EMPress. Ideally, we would want to minimize the amount of text in each legend while still preventing ambiguity. I'm not sure of how to do this! (At least in a way that is both easy for users to understand and not super slow on the JS side of things.)

One potential solution that might work is trying to only show the lowest selected value (e.g. if Level 7 is selected, just showing species-level classifications -- e.g. s__), and only adding ancestor levels to the taxonomy string displayed in the legend as needed to disambiguate things. So this might look something like

  • s__coli
  • g__Bacteroides; s__
  • g__Lactobacillus; s__
  • s__thermophila
  • ...

... That being said, mixing things up like this might confuse users more -- so I'm not sure.

fedarko avatar Feb 26 '21 23:02 fedarko

@fedarko Your suggested approach would work very well. Would just probably need to account for things like f__Lactobacillaceae; g__; s__ so that these aren't displayed as g__; s__. What about making this a setting in the settings tab. Something like Labeling strategy. Could be one of:

  • full: what's currently implemented.
  • smallest unique subsequence: what you propose.

The default should probably be smallest unique subsequence. And it would be nice if the title attribute of the labels in the legend had the full name (so that users could readily see the full name if needed).

ElDeveloper avatar Mar 02 '21 00:03 ElDeveloper