- decoupler.run_wsum(mat, net, source='source', target='target', weight='weight', times=1000, batch_size=10000, min_n=5, seed=42, verbose=False, use_raw=True)
Weighted sum (WSUM).
WSUM infers regulator activities by first multiplying each target feature by its associated weight which then are summed to an enrichment score (wsum_estimate). Furthermore, permutations of random target features can be performed to obtain a null distribution that can be used to compute a z-score (wsum_norm), or a corrected estimate (wsum_corr) by multiplying wsum_estimate by the minus log10 of the obtained empirical p-value.
- matlist, DataFrame or AnnData
List of [features, matrix], dataframe (samples x features) or an AnnData instance.
Network in long format.
Column name in net with source nodes.
Column name in net with target nodes.
Column name in net with weights.
How many random permutations to do.
Size of the batches to use. Increasing this will consume more memmory but it will run faster.
Minimum of targets per source. If less, sources are removed.
Random seed to use.
Whether to show progress.
Use raw attribute of mat if present.
WSUM scores. Stored in .obsm[‘wsum_estimate’] if mat is AnnData.
Normalized WSUM scores. Stored in .obsm[‘wsum_norm’] if mat is AnnData.
Corrected WSUM scores. Stored in .obsm[‘wsum_corr’] if mat is AnnData.
Obtained p-values. Stored in .obsm[‘wsum_pvals’] if mat is AnnData.