rnalysis.enrichment.FeatureSet.intersection
- FeatureSet.intersection(*others: set | FeatureSet) FeatureSet
Calculates the set intersection of the indices from multiple FeatureSet objects (the indices that exist in ALL of the FeatureSet objects).
- Parameters:
others (FeatureSet, RankedSet or set) – The objects against which the current object will be compared.
- Returns:
a new FeatureSet with elements common to this FeatureSet and all other objects.
- Return type:
- Examples:
>>> from rnalysis import enrichment >>> en = enrichment.FeatureSet({'WBGene00000001','WBGene00000002','WBGene00000006'}, 'set name') >>> s = {'WBGene00000001','WBGene00000002','WBGene00000003'} >>> en2 = enrichment.FeatureSet({'WBGene00000004','WBGene00000001'}) >>> en.intersection(s, en2) >>> print(en) FeatureSet: set name {'WBGene00000001'}