liana.multi.filter_view_markers

liana.multi.filter_view_markers#

liana.multi.filter_view_markers(mdata, markers, view_sep=':', var_column='highly_variable', inplace=False)#

Remove potential cell type marker genes found in the background of other views.

In each view, sets highly variable genes to False if they are in the markers dict for another view, but not if they are in the markers for the same view.

Parameters:
  • mdata (MuData) – MuData (multimodal) data object.

  • markers (dict[str, list[str]]) – Dictionary with markers for each view. Keys are the views and values are lists of markers. Can contain markers for views that are not in mdata.mod.keys().

  • view_sep (str (default: ':')) – Separator between view and gene names. Defaults to ‘:’.

  • var_column (str | None (default: 'highly_variable')) – Column in mdata.mod[‘some_view’].var that contains the highly variable genes. Defaults to ‘highly_variable’. If set to None, instead of setting the hvg genes to False, the hvg genes will be removed from the view.

  • inplace (bool (default: False)) – Whether to store results in place, or else to return them.

Return type:

MuData | None

Returns:

The filtered mdata instance or None if inplace=True.