rnalysis.general.parse_gene_name_stringο
- rnalysis.general.parse_gene_name_string(string)ο
Receives a string that contains gene names (like βdaf-2β or βlin15Bβ). Parses the string into a set of gene names. The format of a gene name is a sequence consisting of the expression β[a-z]{3,4}β, the character β-β, and the expression β[A-Z,0-9]{1,4}β. :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 = 'saeg-2 lin-15B cyp-23A1lin-15A WBGene12345678%GHF5H.3' >>> parsed = general.parse_gene_name_string(string) >>> print(parsed) {'saeg-2', 'lin-15B', 'cyp-23A1', 'lin-15A'}