scdef.tl.set_confident_signatures ¶
set_confident_signatures(model: scDEF, confidence_threshold: float = 0.9, tau_quantile: float = 0.99, min_effect: Optional[float] = None, mc_samples: int = 100, random_seed: int = 0) -> Dict[str, List[str]]
Precompute and cache confident signatures/scores for all layers.
Stores signatures, per-gene confidences, combined scores, and per-factor
weighted signature Jaccard confidences (posterior stability of each
confident gene list, weighted by combined_scores) in
model.adata.uns['confident_signatures'] for reuse by plotting.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
scDEF
|
fitted scDEF model. |
required |
confidence_threshold
|
float
|
a gene enters a factor's signature when
|
0.9
|
tau_quantile
|
float
|
quantile of the factor's loadings used as the effect
threshold |
0.99
|
min_effect
|
Optional[float]
|
absolute floor on |
None
|
mc_samples
|
int
|
number of posterior samples drawn to estimate the per-gene probabilities and the signature stability. |
100
|
random_seed
|
int
|
seed for those posterior draws, so the cache is reproducible. |
0
|
Returns:
| Type | Description |
|---|---|
Dict[str, List[str]]
|
The confident signature per factor, flattened across all layers. |