decoupler.get_ora_df

decoupler.get_ora_df(df, net, groupby, features, source='source', target='target', n_background=20000, min_n=5, verbose=False)

Wrapper to run ORA without an input matrix, instead it uses an input DataFrame in long format with one group columns and the significant features in another. Useful for results of differential analysis where no mat is available.

Parameters:
dfDataFrame

Long format DataFrame with groups and significant features.

netDataFrame

Network in long format.

groupbystr

Column name in df with groups.

featuresstr

Column name in df with significant features.

sourcestr

Column name in net with source nodes.

targetstr

Column name in net with target nodes.

n_backgroundint

Integer indicating the background size.

min_nint

Minimum of targets per source. If less, sources are removed.

verbosebool

Whether to show progress.

Returns:
pvalsDataFrame

Obtained p-values per group and source.