bimberlabinternal / CellMembrane

An R package with wrappers and pipelines for single cell RNA-seq analysis
10 stars 3 forks source link

Update ClusteredDotPlot default colors #271

Closed GWMcElfresh closed 3 weeks ago

GWMcElfresh commented 3 weeks ago

Hi everyone,

Happy to spin this up into a more flexible solution for us to supply colors to the ClusteredDotPlots, but the default colors were a little washed out compared to the rather vibrant color bar. I swapped these to (I think) the defaults used by ComplexHeatmap.

Before: image

After: image

Let me know if we prefer this merged quickly, or some scaffolding to allow for customization (e.g. passing a 'number of quantiles' argument for breaks + color vector).

Best regards, GW

bbimber commented 3 weeks ago

I dont have that strong of opinions, but is there no palette that defines those colors, instead of hard-coding the hex codes?

Anyway, it seems like a better color choice and not worth spending undue time on it, so if there isnt a clear palette this is fine.

GWMcElfresh commented 3 weeks ago

I dont have that strong of opinions, but is there no palette that defines those colors, instead of hard-coding the hex codes?

The ComplexHeatmap dev opted to let circlize handle the palette making in general, since he developed both. The hexcodes I pulled are technically from a bespoke palette via: colorRamp2(c(0, 0.5, 1), c("blue", "white", "red")) but with five breaks.

I'll comment the colors though for github. RStudio has spoiled me with the hexcode coloring these days.

but yeah, I'll kick this around to folks and see if anyone is super inspired to divert from red/blue.

GWMcElfresh commented 3 weeks ago

Everyone's satisfied with the Red/Blue colors, so I think we're good here.