scCustomize icon indicating copy to clipboard operation
scCustomize copied to clipboard

New Violin Plot Function (analogous to scanpy: `sc.pl.stacked_violin` with identity on y axis

Open samuel-marsh opened this issue 1 year ago • 0 comments

Create a new violin plot function that allows for plotting of vertical violins with identities stacked on the y axis and features on the x axis. Colored by continuous gradient based on gene expression in identity.

Example: Figure 2E: https://www.science.org/doi/10.1126/science.abl5197#F2 New scCustomize Feature

Code: https://zenodo.org/record/6334988 TICA_04_myeloid.ipynb sc.pl.stacked_violin(migDC_subset, var_names=['CRLF2','CCL17','CSF2RA','GPR157','CCL22','SPRED2','EBI3','AIRE','PDLIM4','ROR2','LZTFL1'], figsize=(8,3), groupby='organ_code',title='Migratory DCs', cmap='GnBu', standard_scale='var', categories_order=['LNG','LLN','MLN'])

  • [x] New fetch and organize data function
  • [ ] Test best value to use for fill
  • [x] Enable aesthetic stacking to match Stacked_VlnPlot
  • [ ] If possible wrap into current scCustomize VlnPlots with logical parameter (identity_y_axis?). (Need to ensure it is not confusing with flip parameter that creates hortizontal violins.

samuel-marsh avatar Jun 26 '23 13:06 samuel-marsh