decoupler.run_wmean
- decoupler.run_wmean(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 (WMEAN).
Wrapper to run WMEAN.
- Parameters:
- matlist, pd.DataFrame or AnnData
List of [features, matrix], dataframe (samples x features) or an AnnData instance.
- netpd.DataFrame
Network in long format.
- sourcestr
Column name in net with source nodes.
- targetstr
Column name in net with target nodes.
- weightstr
Column name in net with weights.
- timesint
How many random permutations to do.
- batch_sizeint
Size of the batches to use. Increasing this will consume more memmory but it will run faster.
- min_nint
Minimum of targets per source. If less, sources are removed.
- seedint
Random seed to use.
- verbosebool
Whether to show progress.
- use_rawbool
Use raw attribute of mat if present.
- Returns:
- Returns wmean, norm_wmean, corr_wmean activity estimates and p-values or stores them in mat.obsm[‘wmean_estimate’],
- mat.obsm[‘wmean_norm’], mat.obsm[‘wmean_corr’] and mat.obsm[‘wmean_pvals’].