scdef.tl.get_lineage_factors ¶
get_lineage_factors(model: 'scDEF', top_factor_label: str, layer_idx: int = 0, n_eff_parents_max: float = 1.5, prob_min: float = 0.5, exclude_technical: bool = True) -> List[str]
Return factors at layer_idx that are clear descendants of top_factor_label.
top_factor_label may name a factor at any layer (including the top). Factors
at layer_idx are included when the upward best_parent chain reaches that
ancestor and each step on the path is unambiguous
(n_eff_parents <= n_eff_parents_max, best_parent_prob >= prob_min).
When layer_idx == ancestor_layer - 1, these are the direct children of the
ancestor; for lower layer_idx, they are deeper descendants with the same
clarity constraints on every step up to the ancestor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
'scDEF'
|
fitted scDEF / iscDEF / sscDEF model with |
required |
top_factor_label
|
str
|
ancestor factor name (any layer; current
|
required |
layer_idx
|
int
|
child layer to query (default 0 = L0). |
0
|
n_eff_parents_max
|
float
|
maximum effective parents on each step toward the ancestor. |
1.5
|
prob_min
|
float
|
minimum |
0.5
|
exclude_technical
|
bool
|
drop factors marked technical in |
True
|
Returns:
| Type | Description |
|---|---|
List[str]
|
List of factor names in the current model view at |