Skip to content

msmu.tl.run_de

Run Differential Expression Analysis (DEA) between two groups in a MuData object.

Parameters:

Name Type Description Default
mdata MuData

MuData object containing the data.

required
modality str

Modality name within the MuData to analyze.

required
category str

Observation category to define groups.

required
ctrl str

Name of the control group.

required
expr str | None

Name of the experimental group. If None, all other groups are used.

None
layer str | None

Layer to use for quantification aggregation. If None, the default layer (.X) will be used. Defaults to None.

None
stat_method Literal['welch', 'student', 'wilcoxon']

Statistical test to use ("welch", "student", "wilcoxon").

'welch'
measure Literal['median', 'mean']

Measure of central tendency to use ("median" or "mean") for fold-change.

'median'
n_resamples int | None

Number of resamples for permutation test. If None, no permutation test is performed.

1000
fdr bool | Literal['empirical', 'bh']

Method for multiple test correction ("empirical", "bh", or False).

'empirical'
log_transformed bool

If True, data is assumed to be log-transformed. Defaults to True.

True
_force_resample bool

If True, forces resampling even if the number of resamples exceeds the number of combinations.

False

Returns:

Type Description
DeaResult

DeaResult containing DE analysis results.