rapids_singlecell.tl.rank_genes_groups_logreg

rapids_singlecell.tl.rank_genes_groups_logreg#

rapids_singlecell.tl.rank_genes_groups_logreg(adata, groupby, *, groups='all', use_raw=None, reference='rest', n_genes=None, layer=None, **kwds)[source]#

Rank genes for characterizing groups.

Parameters:
adata AnnData

Annotated data matrix.

groupby str

The key of the observations grouping to consider.

groups Union[Literal['all'], Iterable[str]] (default: 'all')

Subset of groups, e.g. ['g1', 'g2', 'g3'], to which comparison shall be restricted, or 'all' (default), for all groups.

use_raw bool (default: None)

Use raw attribute of adata if present.

reference str (default: 'rest')

If 'rest', compare each group to the union of the rest of the group. If a group identifier, compare with respect to this group.

n_genes int (default: None)

The number of genes that appear in the returned tables. Defaults to all genes.

layer str (default: None)

Key from adata.layers whose value will be used to perform tests on.

Return type:

None

Returns:

Updates adata with the following fields.

namesstructured np.ndarray (.uns['rank_genes_groups'])

Structured array to be indexed by group id storing the gene names. Ordered according to scores.

scoresstructured np.ndarray (.uns['rank_genes_groups'])

Structured array to be indexed by group id storing the z-score underlying the computation of a p-value for each gene for each group. Ordered according to scores.

pvalsstructured np.ndarray (.uns['rank_genes_groups'])

p-values.

pvals_adjstructured np.ndarray (.uns['rank_genes_groups'])

Corrected p-values.