grassp.pl.highly_variable_proteins#
- highly_variable_proteins(adata_or_result, *, highly_variable_proteins=True, show=None, save=None, log=False)[source]#
Mean–variance relationship for protein expression.
A lightweight wrapper around
scanpy.pl.highly_variable_genes()
which substitutes genes with proteins. It visualises the mean intensity versus dispersion (or variance for the Seurat v3 flavour) and highlights the subset flagged as highly variable duringhighly_variable_proteins()
.- Parameters:
- adata_or_result
AnnData
|DataFrame
|recarray
Either an
AnnData
object that already contains the highly-variable-proteins results (adata.uns['hvg']
& friends) or the corresponding result DataFrame/recarray returned byhighly_variable_proteins()
.- highly_variable_proteins
bool
(default:True
) If
True
(default) only the highly variable subset is highlighted in black; otherwise the entire set is displayed uniformly.- show
bool
|None
(default:None
) If
True
(default) the plot is shown and the function returnsNone
.- save
bool
|str
|None
(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'}
.- log
bool
(default:False
) Plot axes on log-scale (disabled by default).
- adata_or_result
- Return type:
Axes
|None
- Returns:
Returns the current axes if
show
isFalse
.
Notes
Adapted from Scanpy’s implementation to use proteins terminology.