mantispy.tl.feature_sets

Contents

mantispy.tl.feature_sets#

mantispy.tl.feature_sets(adata, by='feature_group')#

Build a decoupler network from the parsed feature annotation.

Parameters:
  • adata (AnnData) – Object whose var carries the parser’s columns.

  • by (str | Sequence[str] (default: 'feature_group')) – A var column, several of them (joined with |), or "group_by_channel" for the feature_group-and-channel combination.

Return type:

DataFrame

Returns:

A frame with source, target and weight, ready for enrich() or for decoupler directly. Features with a missing annotation in any of the columns are left out.

Raises:

KeyErrorvar has none of the columns named by by.