You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes one has multiple columns that contain similar categorical values (e.g. different cell type annotations). Each of these columns gets its own colour mapping which can also change when the column is changed. It would be nice if there was a function to bind multiple columns to a single colour mapping (e.g. dict) that would contain the union of all values in these columns. Thus the same values in different columns would get the same colour.
Example:
Above a few cell types (left) have been merged into one cell type (right, saphire blue), but all the colours are now different.
Having a dict as input to umap would be very nice (based on the documentation I thought it was not possible). However, with the dict, one needs to create and update the dict whenever changing the columns, which is a bit of an inconvenience.
Its not (though I thought it was originally), so I've opened a PR to support it.
What sort of column changing are you thinking? What I'm imagining right now seems a bit more complicated to implement, but I'm not sure if it's the same idea. Could you write out some examples of the API you're proposing?
Activity
ivirshup commentedon Aug 26, 2020
How about passing a dict mapping the category names to colors which you can pass for palette? Then you could do:
Hrovatin commentedon Aug 26, 2020
Having a dict as input to umap would be very nice (based on the documentation I thought it was not possible). However, with the dict, one needs to create and update the dict whenever changing the columns, which is a bit of an inconvenience.
ivirshup commentedon Aug 31, 2020
Its not (though I thought it was originally), so I've opened a PR to support it.
What sort of column changing are you thinking? What I'm imagining right now seems a bit more complicated to implement, but I'm not sure if it's the same idea. Could you write out some examples of the API you're proposing?