ggml_ot.gene.top_ranked

Contents

ggml_ot.gene.top_ranked#

ggml_ot.gene.top_ranked(adata, components=None, n_genes=None, gene_symbols=None, up_regulated=False, down_regulated=False)[source]#

Return genes with the highest contributions to each GGML component.

Parameters:
adata

Annotated data matrix.

components default: None

One-based component IDs. For example, '1,2,3' means the first, second, and third GGML component. Defaults to all GGML components.

n_genes default: None

Number of genes to rank for each component.

gene_symbols Optional[str] (default: None)

Key for field in .var that stores gene symbols if you do not want to use .var_names.

up_regulated default: False

If True, rank by positive loadings only.

down_regulated default: False

If True, rank by negative loadings only. When both flags are equal, absolute loadings are used.

Returns:

np.ndarray Array of shape (n_components, n_genes) with gene names.