rnalysis.enrichment.RankedSet.difference

RankedSet.difference(*others: set | FeatureSet) FeatureSet

Calculates the set difference of the indices from multiple FeatureSet objects (the indices that appear in the first FeatureSet object but NOT in the other objects).

Parameters:

others (FeatureSet, RankedSet or set) – The objects against which the current object will be compared.

Returns:

a new FeatureSet with elements in this FeatureSet that are not in the other objects.

Return type:

FeatureSet

Examples:
>>> from rnalysis import enrichment
>>> en = enrichment.FeatureSet({'WBGene00000001','WBGene00000002','WBGene00000006'}, 'set name')
>>> s = {'WBGene00000001','WBGene00000002','WBGene00000003'}
>>> en2 = enrichment.FeatureSet({'WBGene00000004','WBGene00000001'})
>>> en.difference(s, en2)
>>> print(en)
FeatureSet: set name
{'WBGene00000006'}