HelenaLC / CATALYST

Cytometry dATa anALYsis Tools
67 stars 30 forks source link

tSNE contour coloured by density #331

Closed PKLiverpool closed 1 year ago

PKLiverpool commented 1 year ago

Hi there,

Really appreciating this tool and the comment forum, very very useful.

Just wondering whether there's similar functionality to cytobank in terms of colouring a tSNE plot by contour/cell density?

image

Any ideas would be much appreciated.

Cheers Paul

HelenaLC commented 1 year ago

Not so much a CATALYST-specific question, I suppose... But just to say: No, plotDR does not do this. But you should be able to reproduce plots such as the ones above using ggplot by i) extracting a data.frame of the t-SNE coordinates (and, if needed, marker expression and cell metadata), and ii) using geom_density_2d() or geom_density_2d_filled(). Alternatively, there's also the schex package, which might offer an interesting way of visualising.