Skip to content

scdef.tl.marker_scores

marker_scores(model: scDEF, layer_idx: int = 0, counts_layer: Optional[str] = None) -> DataFrame

Marker scores of the factors of one layer: genes that distinguish each factor's cells.

marker_scores_from_usages on the model's counts and on the proportions of the cell weights of the layer (each cell's weights divided by their sum). The gene loadings (get_signatures_dict) describe each factor's programme; the marker scores rank the genes by how much more they are expressed where the factor is used, against the other factors of the layer.

Parameters:

Name Type Description Default
model scDEF

fitted scDEF model (cell weights annotated, model.annotate_adata()).

required
layer_idx int

layer index.

0
counts_layer Optional[str]

layer of model.adata with the counts; defaults to the model's counts_layer (adata.X when it is None).

None

Returns:

Type Description
DataFrame

DataFrame of factors (rows, in model.factor_names[layer_idx] order) by genes.