Utilities
Small shared helpers.
cal_fdr
cal_fdr(p_vals: ndarray) -> np.ndarray
Benjamini-Hochberg FDR adjustment for an array of p-values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
p_vals
|
ndarray
|
Raw p-values. |
required |
Returns:
| Type | Description |
|---|---|
FDR-adjusted values, capped at 1.
|
|
Source code in scTenifold/core/_utils.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |
timer
timer(func: Optional[Callable] = None) -> Callable
Decorator that prints the wall-clock runtime of func.
A verbosity keyword is consumed from the call site (default 1);
set to 0 to silence.
Source code in scTenifold/core/_utils.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |