mantispy.pp.subset_features#

mantispy.pp.subset_features(adata, key='selected')[source]#

Return a new object holding only the features flagged by var[key].

Parameters:
adata AnnData

Object to subset. Never modified.

key str (default: 'selected')

Boolean var column naming the features to keep, as feature_select() writes.

Return type:

AnnData

Returns:

A new object holding only the flagged features.

Raises:

KeyError – If var has no column key.