You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.
BEL::Script.parse returns an Enumerator with all of the Parameters, Terms, and a Statement. It would be helpful to have shortcut methods to easily get at specific elements like the parsed Term.
For example, given the term: "kin(p(HGNC:AKT1))", I would like to parse the term to identify the outer BEL function (for this example, "kinaseActivity"). To do this, I need to understand exactly what parse will return, and (1) get the Statement, (2) take the Statement.subject - this should be the Term that was parsed, and (3) get the Statement.subject.fx and convert it to its long form.
The text was updated successfully, but these errors were encountered:
Closed. This API will be replaced by bel_parser. The BELParser::ASTFilter allows you to filter types. For example you can find all statements from a BEL Script with:
require'bel_parser'includeBELParserstatements=ASTFilter.new(ASTGenerator.new(File.open('projects/openbel/bel_parser/corpora/full_abstract1.bel')),:simple_statement).each.to_a# do something with statements
Leaving this open though because ASTFilter will not drill down into every AST to find inner nodes. This limits you, for example, from filtering to all terms in a BEL Script.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
BEL::Script.parse returns an Enumerator with all of the Parameters, Terms, and a Statement. It would be helpful to have shortcut methods to easily get at specific elements like the parsed Term.
For example, given the term: "kin(p(HGNC:AKT1))", I would like to parse the term to identify the outer BEL function (for this example, "kinaseActivity"). To do this, I need to understand exactly what parse will return, and (1) get the Statement, (2) take the Statement.subject - this should be the Term that was parsed, and (3) get the Statement.subject.fx and convert it to its long form.
The text was updated successfully, but these errors were encountered: