mofaflex.FeatureSet#

class mofaflex.FeatureSet(features, name, description='')#

Class for storing a single set of features (genes).

This class stores a single set of features (genes) and provides set operations for intersection, union, and difference.

Parameters:
  • features (Collection[str]) – The set of features in the feature set.

  • name (str) – The name of the feature set.

  • description (str (default: '')) – A description of the feature set.

Notes

If the feature set is empty, a warning is raised. If the collection of features contains duplicates, a warning is raised.

Attributes table#

description

A description of the feature set.

empty

Check if the feature set is empty.

features

The set of features in the feature set.

name

The name of the feature set.

Methods table#

subset(features)

Subset features from a feature set.

Attributes#

FeatureSet.description#

A description of the feature set.

FeatureSet.empty#

Check if the feature set is empty.

FeatureSet.features#

The set of features in the feature set.

FeatureSet.name#

The name of the feature set.

Methods#

FeatureSet.subset(features)#

Subset features from a feature set.

Parameters:

features (Iterable[str]) – Features to subset.

Return type:

FeatureSet