Skip to content

scdef.tl.marker_genes

marker_genes(model: scDEF, top_genes: Optional[int] = None, counts_layer: Optional[str] = None) -> Tuple[Dict[str, List[str]], Dict[str, ndarray]]

Marker genes of every factor of every layer with at least two factors, ranked by marker_scores.

Example::

markers, scores = scd.tl.marker_genes(model, top_genes=20)
markers["L0_3"]

Parameters:

Name Type Description Default
model scDEF

fitted scDEF model.

required
top_genes Optional[int]

number of genes to keep per factor; all genes if None.

None
counts_layer Optional[str]

layer of model.adata with the counts; defaults to the model's counts_layer.

None

Returns:

Type Description
Dict[str, List[str]]

A pair of dicts: each factor to its genes ranked by marker score (truncated to

Dict[str, ndarray]

top_genes if given), and each factor to the scores of all genes, in

Tuple[Dict[str, List[str]], Dict[str, ndarray]]

model.adata.var_names order.