scanpy.pl.rank_genes_groups_violin
- scanpy.pl.rank_genes_groups_violin(adata, groups=None, n_genes=20, gene_names=None, gene_symbols=None, use_raw=None, key=None, split=True, scale='width', strip=True, jitter=True, size=1, ax=None, show=None, save=None)
Plot ranking of genes for all tested comparisons.
- Parameters
- adata :
AnnData
AnnData
Annotated data matrix.
- groups :
Sequence
[str
] |None
Optional
[Sequence
[str
]] (default:None
) List of group names.
- n_genes :
int
int
(default:20
) Number of genes to show. Is ignored if
gene_names
is passed.- gene_names :
Iterable
[str
] |None
Optional
[Iterable
[str
]] (default:None
) List of genes to plot. Is only useful if interested in a custom gene list, which is not the result of
scanpy.tl.rank_genes_groups()
.- gene_symbols :
str
|None
Optional
[str
] (default:None
) Key for field in
.var
that stores gene symbols if you do not want to use.var_names
displayed in the plot.- use_raw :
bool
|None
Optional
[bool
] (default:None
) Use
raw
attribute ofadata
if present. Defaults to the value that was used inrank_genes_groups()
.- split :
bool
bool
(default:True
) Whether to split the violins or not.
- scale :
str
str
(default:'width'
) See
violinplot()
.- strip :
bool
bool
(default:True
) Show a strip plot on top of the violin plot.
- jitter :
int
|float
|bool
Union
[int
,float
,bool
] (default:True
) If set to 0, no points are drawn. See
stripplot()
.- size :
int
int
(default:1
) Size of the jitter points.
- show :
bool
|None
Optional
[bool
] (default:None
) Show the plot, do not return axis.
- save :
bool
|None
Optional
[bool
] (default:None
) If
True
or astr
, save the figure. A string is appended to the default filename. Infer the filetype if ending on {'.pdf'
,'.png'
,'.svg'
}.- ax :
Axes
|None
Optional
[Axes
] (default:None
) A matplotlib axes object. Only works if plotting a single component.
- adata :