tacco.preprocessing.filter_annotation

filter_annotation(adata, annotation_key=None, **kw_args)[source]

Filter AnnData to include only cells where at least one annotation is neither negative nor na. Identical to filter_reference() with mode=’annotation’.

Parameters:
  • adata – An AnnData containing the annotation to filter on.

  • annotation_key – The .obsm key where the annotation is stored.

  • **kw_args – Additional keyword arguments forwarded to , mode='annotation')().

Returns:

Depending on return_mask and return_view returns a filter mask, a filtered view, or a filtered copy of adata.