decoupler.mt.query_set#
- decoupler.mt.query_set(features, net, alternative='greater', n_bg=20000, ha_corr=0.5, tmin=5, verbose=False)#
Test overlap between a given feature set against a database of sets.
- Parameters:
- features
list Set of features
- net
DataFrame Dataframe in long format. Must include
sourceandtargetcolumns, and optionally aweightcolumn.- alternative
str(default:'greater') Defines the alternative hypothesis for fisher exact test. Check
scipy.stats.fisher_exact.- n_bg
int|float|None(default:20000) Number indicating the background size.
- ha_corr
int|float(default:0.5) Haldane-Anscombe correction of odds ratio.
- tmin
int|float(default:5) Minimum number of targets per source. Sources with fewer targets will be removed.
- verbose
bool(default:False) Whether to display progress messages and additional execution details.
- features
- Returns:
Dataframe containing the odds ratio and fisher exact test p-values for the overlap of the given features across sets in a network.
Example
import decoupler as dc ct = dc.op.collectri() ft = set(ct[ct["source"] == "SMAD4"]["target"]) dc.mt.query_set(features=ft, net=ct)