rapids_singlecell.dcg.ora#

rapids_singlecell.dcg.ora = <rapids_singlecell.decoupler_gpu._helper._Method.Method object>#

Over Representation Analysis (ORA).

Tests feature-set overlaps with Fisher’s exact test and corrected log odds. Input matrices use float32; Fisher calculations use float64.

Finally, the obtained pvalue are adjusted by Benjamini-Hochberg correction.

Parameters:
data

AnnData instance, DataFrame or tuple of [matrix, samples, features].

net

Dataframe in long format. Must include source and target columns, and optionally a weight column.

tmin

Minimum number of targets per source. Sources with fewer targets will be removed.

layer

Layer key name of an anndata.AnnData instance.

raw

Whether to use the .raw attribute of anndata.AnnData.

empty

Whether to remove empty observations (rows) or features (columns).

bsize

For large datasets in sparse format, this parameter controls how many observations are processed at once. Increasing this value speeds up computation but uses more memory. If omitted, uses the method’s default batch size.

verbose

Whether to display progress messages and additional execution details.

pre_load

Whether to pre-load the data into memory. If True, the data will be pre-loaded into memory before processing.

adj_pv_gpu

Whether to use GPU for adjusting p-values.

n_up

Number of highest-ranked features to select. Defaults to the top 5% of features, with a minimum of two. Fractional values are rounded up.

n_bm

Number of lowest-ranked features to select (default zero), rounded up. The sum of n_up and n_bm must not exceed the number of features.

n_bg

Background size (default 20,000), including in value-cutoff mode. None or zero uses all processed genes. Must accommodate the union of selected genes and each feature set.

ha_corr

Correction added to contingency-table entries for log odds ratios (default 0.5). Does not affect p-values; cutoffs require a nonnegative value.

value_cutoff

Optional strict value threshold replacing ranks. Cannot combine with n_up or nonzero n_bm. Use 0.5 for binary DEG labels, or value_cutoff=0.05, value_direction='less' for adjusted p-values.

Supply comparisons as rows and all tested genes as columns, including unannotated genes. Zero rows/columns are retained regardless of empty; comparisons with no selected genes have p-values of one. Values must be finite; exclude untested genes. Use n_bg=None for this universe.

value_direction

Select values strictly 'greater' (default) or 'less' than value_cutoff. Equality is excluded, independently of the Fisher tail.

alternative

Fisher alternative: 'two-sided' (default), 'greater' for enrichment, or 'less' for depletion.

Returns:

Enrichment scores ES and, if applicable, adjusted pvalue by Benjamini-Hochberg.