Skip to content

scdef.tl.get_biological_signature

get_biological_signature(model: scDEF, top_genes: int = 10) -> List[str]

Gene signature of the top-layer factor — the programme every cell shares.

Looks up the cached confident signature of f"{top_layer_name}_0". Unlike get_technical_signature and get_global_signature, which pool several factors into a relevance-weighted consensus, this reads a single factor's list.

Factors flagged technical are dropped before the lookup, which in practice only matters if the top-layer factor is itself flagged — in that case the result is empty.

With the default top_factors=1 the top layer has exactly one factor. If the model was built with a wider top layer, only its first factor is read.

Parameters:

Name Type Description Default
model scDEF

scDEF model instance. Requires factor_diagnostics (for the technical column) and set_confident_signatures.

required
top_genes int

maximum number of genes to return.

10

Returns:

Type Description
List[str]

The top gene names for the top-layer factor, or [] if it has no

List[str]

cached signature or is itself flagged technical.