rnalysis.general.parse_wbgene_string

rnalysis.general.parse_wbgene_string(string)

Receives a string that contains WBGene indices. Parses the string into a set of WBGene indices. The format of a WBGene index is ‘WBGene’ and exactly 8 digits. :type string: str :param string: The string to be parsed. Can be any format of string. :return: a set of the WBGene indices that appear in the given string.

Examples

>>> from rnalysis import general
>>> string =  '''WBGene WBGenes WBGene12345678, WBGene98765432WBGene00000000& the geneWBGene44444444daf-16A5gHB.5
... WBGene55555555'''
>>> parsed = general.parse_wbgene_string(string)
>>> print(parsed)
{'WBGene12345678', 'WBGene44444444', 'WBGene98765432', 'WBGene55555555', 'WBGene00000000'}