Skip to content

msmu.tl.corr

Compute the correlation matrix for the specified modality in a MuData object.

Parameters:

Name Type Description Default
mdata MuData

MuData object containing the data.

required
modality str

The modality to compute correlations on.

required
layer str | None

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

None
method Literal['pearson', 'spearman', 'kendall']

Correlation method to use: "pearson", "spearman", or "kendall". Defaults to "pearson".

'pearson'

Returns:

Type Description
DataFrame

DataFrame representing the correlation matrix.