Skip to content

msmu.pp.apply_filter

Applies the filter to the specified modality in the MuData object.

Parameters:

Name Type Description Default
mdata MuData

MuData object to which the filter will be applied.

required
modality str

The modality within the MuData object to which the filter will be applied.

required
on Literal['all', 'var', 'obs']

Which axis to apply filters on. One of: - "var": apply only variable filters from varm["filter"] - "obs": apply only observation filters from obsm["filter"] - "all": apply both variable and observation filters

'all'
columns list[str] | None

Optional list of filter column names to apply. When omitted, all available filter columns for the selected axis are applied.

None

Returns:

Type Description
MuData

MuData object with the filter applied.