morris-lab / CellOracle

This is the alpha version of the CellOracle package
Other
307 stars 56 forks source link

Custom colors for oracle.plot_cluster_whole? #91

Closed andrewjkwok closed 2 years ago

andrewjkwok commented 2 years ago

Hi,

Wanted to quickly ask - is it possible to pass custom colors for my cell clusters (or some categorical variable) for the oracle.plot_cluster_whole function after in silico GRN perturbation?

I've tried passing a palette argument as I would in scanpy but that doesn't seem to work, and I can't find within the API documentation what kind of options I might have for the oracle.plot_cluster_whole function.

Many thanks in advance, Andrew

KenjiKamimoto-ac commented 2 years ago

Hi @andrewjkwok

I updated cellorale now. In the current version, celloracle=0.10.11, we can update cluster color palette as follows.

oracle.update_cluster_colors(palette=sns.color_palette("husl", 24))

1) Before changing color.

スクリーンショット 2022-09-27 午後3 24 25

2) Change color. After running update_cluster_colors function, new color information is used.

スクリーンショット 2022-09-27 午後3 24 47

I hope it helps.

Kenji

andrewjkwok commented 2 years ago

Yes, this helps a lot, thank you!!