dynamo.pl.highest_frac_genes¶
- dynamo.pl.highest_frac_genes(adata, n_top=30, gene_prefix_list=None, gene_prefix_only=True, show=True, save_path=None, ax=None, gene_annotations=None, gene_annotation_key='use_for_pca', log=False, store_key='highest_frac_genes', orient='v', figsize=None, layer=None, title=None, v_rotation=35, **kwargs)[source]¶
Plot the top genes.
- Parameters:
adata (
AnnData) – an AnnData object.n_top (
int(default:30)) – the number of top genes to show. Defaults to 30.gene_prefix_list (
Optional[List[str]] (default:None)) – a list of gene name prefix. Defaults to None.gene_prefix_only (
bool(default:True)) – whether to show prefix of genes only. It only takes effect if gene prefix is provided. Defaults to True.show (
bool(default:True)) – whether to show the plots. Defaults to True.save_path (
Optional[str] (default:None)) – the path to save the figure. Defaults to None.ax (
Optional[Axes] (default:None)) – the axis on which the graph will be plotted. If None, a new axis would be created. Defaults to None.gene_annotations (
Optional[List[str]] (default:None)) – annotations for genes, or annotations for gene prefix subsets. Defaults to None.gene_annotation_key (
str(default:'use_for_pca')) – gene annotations key in adata.var. Defaults to “use_for_pca”.log (
bool(default:False)) – whether to use log scale. Defaults to False.store_key (
str(default:'highest_frac_genes')) – the key for storing expression percent results. Defaults to “highest_frac_genes”.orient (
Literal['v','h'] (default:'v')) – the orientation of the graph. Can be one of ‘v’ or ‘h’. ‘v’ for genes in x-axis and ‘h’ for genes on y-axis. Defaults to “v”.figsize (
Optional[Tuple[float]] (default:None)) – the size of each panel of the figure. Defaults to None.layer (
Optional[str] (default:None)) – layer on which the gene percents will be computed. Defaults to None.title (
Optional[str] (default:None)) – the title of the figure. Defaults to None.v_rotation (
float(default:35)) – rotation of text sticks when the direction is vertica. Defaults to 35.
- Raises:
ValueError – invalid AnnData object.
NotImplementedError – invalid orient.
- Return type:
- Returns:
The matplotlib Axes of the figure.