def parse_(gnomic_string, *args, **kwargs):
     parser = GnomicParser()
     semantics = DefaultSemantics(*args, **kwargs)
     return parser.parse(gnomic_string,
                         whitespace='',
                         semantics=semantics,
                         rule_name='FEATURE')
Beispiel #2
0
 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_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_(gnomic_string, *args, **kwargs):
     parser = GnomicParser()
     semantics = DefaultSemantics(*args, **kwargs)
     return parser.parse(gnomic_string,
                         whitespace='',
                         semantics=semantics,
                         rule_name='FEATURE')
Beispiel #5
0
    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')
Beispiel #6
0
    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')
Beispiel #7
0
    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')