def parse_(gnomic_string, *args, **kwargs): parser = GnomicParser() semantics = DefaultSemantics(*args, **kwargs) return parser.parse(gnomic_string, whitespace='', semantics=semantics, rule_name='FEATURE')
def _parse_gnomic_string(cls, gnomic_string, *args, **kwargs): parser = GnomicParser() semantics = DefaultSemantics(*args, **kwargs) return parser.parse(gnomic_string, whitespace='', semantics=semantics, rule_name='start')
def parse(cls, gnomic_change_string): from gnomic.grammar import GnomicParser from gnomic.semantics import DefaultSemantics parser = GnomicParser() semantics = DefaultSemantics() return parser.parse(gnomic_change_string, whitespace='', semantics=semantics, rule_name='CHANGE')
def parse(cls, gnomic_feature_string): from gnomic.grammar import GnomicParser from gnomic.semantics import DefaultSemantics if not isinstance(gnomic_feature_string, six.string_types): raise ValueError('"gnomic_feature_string" must a string, got {}'.format(repr(gnomic_feature_string))) parser = GnomicParser() semantics = DefaultSemantics() return parser.parse(gnomic_feature_string, whitespace='', semantics=semantics, rule_name='FEATURE')
def parse(cls, string, *args, **kwargs): """ :: >>> Feature.parse('MYO1#SGD:S000001065') Feature(name='MYO1', accession=Accession(database='SGD', identifier='S000001065'})) :param string: :param args: :param kwargs: :return: """ from gnomic.grammar import GnomicParser from gnomic.semantics import DefaultSemantics parser = GnomicParser() semantics = DefaultSemantics(*args, **kwargs) return parser.parse(string, whitespace='', semantics=semantics, rule_name='FEATURE')