pegasus.qcviolin¶
- pegasus.qcviolin(data, plot_type, min_genes_before_filt=100, n_violin_per_panel=8, panel_size=(6, 4), left=0.2, bottom=0.15, wspace=0.3, hspace=0.35, return_fig=False, dpi=300.0)[source]¶
Plot quality control statistics (before filtration vs. after filtration) as violin plots. Require statistics such as “n_genes”, “n_counts” and “percent_mito” precomputed.
- Parameters
data (
MultimodalData
,UnimodalData
, oranndata.AnnData
object.) – Single cell expression data.plot_type (
str
) – Choose fromgene
,count
andmito
, which shows number of expressed genes, number of UMIs and percentage of mitochondrial rate.min_genes_before_filt (
int
, optional, default: 100) – If data loaded are raw data (i.e. min(n_genes) == 0), filter out cell barcodes with less thanmin_genes_before_filt
for better visual effects.n_violin_per_panel (
int
, optional, default: 8) – Number of violin plots (samples) shown in one panel.panel_size (tuple, optional (default: (6, 4))) – The panel size (width, height) in inches.
left (float, optional (default: 0.2)) – This parameter sets the figure’s left margin as a fraction of panel’s width (left * panel_size[0]).
bottom (float, optional (default: 0.15)) – This parameter sets the figure’s bottom margin as a fraction of panel’s height (bottom * panel_size[1]).
wspace (float, optional (default: 0.4)) – This parameter sets the width between panels and also the figure’s right margin as a fraction of panel’s width (wspace * panel_size[0]).
hspace (float, optional (defualt: 0.15)) – This parameter sets the height between panels and also the figure’s top margin as a fraction of panel’s height (hspace * panel_size[1]).
return_fig (
bool
, optional, default:False
) – Return aFigure
object ifTrue
; returnNone
otherwise.dpi (
float
, optional, default:300.0
) – The resolution in dots per inch.
- Returns
A
matplotlib.figure.Figure
object containing the dot plot ifreturn_fig == True
- Return type
Figure
object
Examples
>>> pg.qcviolin(data, "mito", dpi = 500)