muon.pp.filter_obs

Contents

muon.pp.filter_obs#

muon.pp.filter_obs(data: AnnData | MuData, var: str | Sequence[str], func: Callable | None = None) None#

Filter observations (samples or cells) in-place using any column in .obs or in .X.

Parameters:
  • data (AnnData or MuData) – AnnData or MuData object

  • var (str or Sequence[str]) – Column name in .obs or in .X to be used for filtering. Alternatively, obs_names can be provided directly.

  • func – Function to apply to the variable used for filtering. If the variable is of type boolean and func is an identity function, the func argument can be omitted.