enblacar / SCpubr

Generate high quality, publication ready visualizations for single cell transcriptomics data.
https://enblacar.github.io/SCpubr-book/
GNU General Public License v3.0
150 stars 12 forks source link

REQUEST | do_ViolinPlot | I want order to be added #46

Closed christinepich closed 9 months ago

christinepich commented 9 months ago

Hi enblacar team!

Great package. I'm using it a lot, but I was wandering if you could add one more thing to the do_ViolinPlot() function. Is it possible to add order in the do_ViolinPlot() function as it is the case for do_BarPlot() and do_BoxPlot() functions? I am using "sort" in the VlnPlot() quite often, and I am missing it in do_ViolinPlot().

Feature request:

# do_ViolinPlot( order = TRUE) 

SCpubr version:

# 2.0.2

Thanks a lot!

Christine

enblacar commented 9 months ago

Hi @christinepich,

Thanks for using my package!

That would be a really nice addition to the function! I have just coded it and added the order = TRUE parameter to do_ViolinPlot. Groups are sorted based on the median, and it can only be used provided that split.by = NULL. This will roll out on update 2.0.3.

Let me know if you have similar suggestions!

Best, Enrique

christinepich commented 9 months ago

Thank you very much! That's great.

Best, Christine