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.

features#

The set of features in the feature set.

Type:

frozenset

name#

The name of the feature set.

Type:

str

description#

A description of the feature set.

Type:

str

Notes

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

Attributes table#

empty

Check if the feature set is empty.

Methods table#

subset(features)

Subset features from a feature set.

Attributes#

FeatureSet.empty#

Check if the feature set is empty.

Methods#

FeatureSet.subset(features)#

Subset features from a feature set.

Parameters:

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

Return type:

FeatureSet