linnarsson-lab / loom-viewer

Tool for sharing, browsing and visualizing single-cell data stored in the Loom file format
BSD 2-Clause "Simplified" License
35 stars 6 forks source link

Some numerical attributes are shown as text and vice versa #119

Closed slinnarsson closed 6 years ago

slinnarsson commented 6 years ago

In Cell Metadata view, some attributes that contain only floats ("ClassProbability...") are shown as text, and some that contain only text ("Class") are shown as numbers(*):

screen shot 2017-10-03 at 14 10 40

(*) Actually, Class is an attribute that contains only strings, and they are all "Neurons". This is for some reason shown as a single 1.

JobLeonard commented 6 years ago

I don't think the first one is a bug: For whateve reason, Class has only one unique value shared with every attribute. So the viewer assumes it is more understandable to only list that value.

The other attributes have unique values for each value, and we cannot list all of those. So instead only the first five are shown. I think the original reasoning was to apply this to string attributes with unique markers (for example, Genes or CellID - although ironically those are often not shown like this in my testing datasets because there usually are a handful of duplicates strings). However, these are numerical values, so that should change.

slinnarsson commented 6 years ago

But why is the single value Neurons shown as 1? I would expect it to be shown as Neurons.

JobLeonard commented 6 years ago

Ah, I see what you mean (did not know the value should be Neurons instead of 1). Looks like a simple bug: I forgot to check for indexed strings there. Will fix, give me a minute

JobLeonard commented 6 years ago

Should be fixed:

image

JobLeonard commented 6 years ago

Should I switch over to Box as the default over Bar?

JobLeonard commented 6 years ago

image

slinnarsson commented 6 years ago

yes, sure.