locat.plotting_and_other_methods module#

locat.plotting_and_other_methods.get_gene_x(adata, gene, layer=None)[source]#
locat.plotting_and_other_methods.parse_output(adata, res, localres)[source]#
locat.plotting_and_other_methods.plot_gene_localization_summary(genes, locat_df, adata, suptitle='Gene Localization Summary', embedding_key='X_umap', embedding_dims=2)[source]#

Plots expression, GMM fit, and localized masks for each gene.

locat.plotting_and_other_methods.plot_gene_umap_expressing_on_top(adata, gene, ax, expr_thresh=0.0, q_vmax=80, layer=None, s_bg=5, s_expr=8, alpha_bg=0.6, alpha_expr=0.9, use_log1p=True, cmap_genes='Reds', title_fs=12)[source]#
locat.plotting_and_other_methods.plot_grid(adata, gene_lists, titles=None, expr_thresh=0.0, use_log1p=True, cmap='Reds')[source]#

Plot a grid of single-gene UMAP panels, one row per gene list.

Parameters:
adata:

AnnData object with obsm["X_umap"] and expression in .X.

gene_lists:

List of gene lists, one per row.

titles:

Row labels, one per entry in gene_lists. If None, rows are unlabelled.

expr_thresh:

Cells with expression <= this value are shown as background (default: 0.0).

use_log1p:

If True, apply log1p to expression before plotting (default: True).

cmap:

Colormap for expressing cells (default: "Reds").

Returns:
matplotlib.figure.Figure
locat.plotting_and_other_methods.plotgenes(adata, d0, topgenes, suptitle='TITLEARG', size=10, emb='X_umap', genes_per_row=5, text_size=12, geneinf=False)[source]#
locat.plotting_and_other_methods.train_clustering(adata, genesuse, pthresh=0.5)[source]#
locat.plotting_and_other_methods.train_clustering_logpadj(adata, genesuse, resolution=0.25, method='wilcoxon')[source]#