scdef.tl.get_stored_confident_signatures ¶
get_stored_confident_signatures(model: scDEF, layer_idx: int = 0, max_genes: Optional[int] = None, return_confidences: bool = False, return_combined_scores: bool = False, return_signature_confidences: bool = False) -> Union[Dict[str, List[str]], Tuple[Dict[str, List[str]], Dict[str, ndarray]], Tuple[Dict[str, List[str]], Dict[str, ndarray], Dict[str, ndarray]], Tuple[Dict[str, List[str]], Dict[str, float]], Tuple[Dict[str, List[str]], Dict[str, ndarray], Dict[str, ndarray], Dict[str, float]]]
Load precomputed confident signatures (and optional scores) from cache.
Reads the cache written by set_confident_signatures,
which must have been run first. Stored keys are stable original-index labels and
are translated to the current model.factor_names, so factors the model no
longer keeps are dropped rather than mislabelled.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
scDEF
|
fitted scDEF model with a populated
|
required |
layer_idx
|
int
|
layer to read signatures for. |
0
|
max_genes
|
Optional[int]
|
keep at most this many genes per signature, highest-scoring first. Defaults to the full confident list. |
None
|
return_confidences
|
bool
|
also return the per-gene posterior confidences. |
False
|
return_combined_scores
|
bool
|
also return the per-gene combined scores used to order each signature. |
False
|
return_signature_confidences
|
bool
|
also return the per-factor weighted Jaccard confidence — how stable the gene list is across posterior samples. |
False
|
Returns:
| Type | Description |
|---|---|
Union[Dict[str, List[str]], Tuple[Dict[str, List[str]], Dict[str, ndarray]], Tuple[Dict[str, List[str]], Dict[str, ndarray], Dict[str, ndarray]], Tuple[Dict[str, List[str]], Dict[str, float]], Tuple[Dict[str, List[str]], Dict[str, ndarray], Dict[str, ndarray], Dict[str, float]]]
|
The signatures per factor, alone or followed by whichever of the optional |
Union[Dict[str, List[str]], Tuple[Dict[str, List[str]], Dict[str, ndarray]], Tuple[Dict[str, List[str]], Dict[str, ndarray], Dict[str, ndarray]], Tuple[Dict[str, List[str]], Dict[str, float]], Tuple[Dict[str, List[str]], Dict[str, ndarray], Dict[str, ndarray], Dict[str, float]]]
|
dictionaries were requested, in the order the flags appear above. |