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

Colouring/filtering bugs #106

Closed JobLeonard closed 7 years ago

JobLeonard commented 7 years ago

screenshot_20170530_112836 screenshot_20170530_113016 clusters_metadata

screenshot_20170530_113953 screenshot_20170530_113939 sex_metadata

JobLeonard commented 7 years ago

Seems that -1 (or perhaps negative numbers in general) trips up the colours as implemented in the client.

There are also problems with filtering in the Oligos_All set, which may or may not be related to these bugs.

JobLeonard commented 7 years ago

One issue is that I'm copying the color generating functions all over the plotters. What we should do is make generators for heatmaps, categorical, and whatever else we come up with. These generators would take an attribute, and based on the type of data and the min/max values, return a function that takes a data value and returns a colour scaled correctly for the data.

EDIT: Even better, an attribute and a colorMode string.

JobLeonard commented 7 years ago

Adding clamping (see #108) will kind of happen as a side-effect of this fix, btw.

JobLeonard commented 7 years ago

Only one bug left: reloading when filtering a gene breaks the webpage - see #109