acore.enrichment_analysis.annotate module#
Put unique features into foreground, background or assign nan.
- annotate_features(features: Series, in_foreground: set[str] | list[str], in_background: set[str] | list[str]) Series[source]#
Annotate features as foreground or background based on their presence in the foreground and background lists.
- Parameters:
- Returns:
pandas.Series containing ‘foreground’ or ‘background’. missing values are preserved.
Example:
result = _annotate_features(features, in_foreground, in_background)