FACSPy.remove_unnamed_channels

FACSPy.remove_unnamed_channels#

FACSPy.remove_unnamed_channels(adata, as_view=False, copy=False)#

Removes unnamed channels. Unnamed channels are defined as channels that have the same value in the ‘pnn’ field as the ‘pns’ field in adata.var. This happens when channels were recorded and saved to the .fcs file that were not given a name via the panel. Scatter- and technical channels are kept, regardless of their definition in the Panel object.

This function removes these channels in order to not include empty channels in further analysis.

Parameters:
  • adata (AnnData) – The anndata object of shape n_obs x n_vars where rows correspond to cells and columns to the channels.

  • as_view (bool) – If True, returns an AnnDataView object.

  • copy (bool) – Whether to copy the dataset.

Return type:

AnnData or None, depending on copy.

Examples

>>> import FACSPy as fp
>>> dataset = fp.create_dataset(...)
>>> fp.remove_unnamed_channels(dataset)