rnalysis.enrichment.RankedSet.union

RankedSet.union(*others: Union[set, FeatureSet]) FeatureSet

Calculates the set union of the indices from multiple FeatureSet objects (the indices that exist in at least one of the FeatureSet objects).

Parameters

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

Returns

a new FeatureSet with elements from this FeatureSet and all other objects.

Return type

FeatureSet

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