@stmt.command()<EOL>@click.option(<EOL>"<STR_LIT>",<EOL>help='<STR_LIT>',<EOL>)<EOL>@click.option("<STR_LIT>", help="<STR_LIT>")<EOL>@click.option(<EOL>"<STR_LIT>",<EOL>help='<STR_LIT>',<EOL>)<EOL>@click.option("<STR_LIT>", help="<STR_LIT>")<EOL>@click.option("<STR_LIT>", help="<STR_LIT>")<EOL>@click.option(<EOL>"<STR_LIT>",<EOL>help="<STR_LIT>",<EOL>)<EOL>@click.argument("<STR_LIT>")<EOL>@pass_context<EOL>def edges(ctx, statement, rules, species, namespace_targets, version, api, config_fn):
if config_fn:<EOL><INDENT>config = bel.db.Config.merge_config(ctx.config, override_config_fn=config_fn)<EOL><DEDENT>else:<EOL><INDENT>config = ctx.config<EOL><DEDENT>if namespace_targets:<EOL><INDENT>namespace_targets = json.loads(namespace_targets)<EOL><DEDENT>if rules:<EOL><INDENT>rules = rules.replace("<STR_LIT:U+0020>", "<STR_LIT>").split("<STR_LIT:U+002C>")<EOL><DEDENT>namespace_targets = utils.first_true(<EOL>[namespace_targets, config["<STR_LIT>"]["<STR_LIT>"].get("<STR_LIT>")], None<EOL>)<EOL>api_url = utils.first_true(<EOL>[api, config["<STR_LIT>"]["<STR_LIT>"].get("<STR_LIT>", None)], None<EOL>)<EOL>version = utils.first_true(<EOL>[version, config["<STR_LIT>"]["<STR_LIT>"].get("<STR_LIT>", None)], None<EOL>)<EOL>print("<STR_LIT>")<EOL>print("<STR_LIT>".format(version))<EOL>print("<STR_LIT>".format(api))<EOL>print("<STR_LIT>")<EOL>bo = BEL(version=version, endpoint=api_url)<EOL>if species:<EOL><INDENT>edges = (<EOL>bo.parse(statement)<EOL>.orthologize(species)<EOL>.canonicalize(namespace_targets=namespace_targets)<EOL>.compute_edges(rules=rules)<EOL>)<EOL><DEDENT>else:<EOL><INDENT>edges = (<EOL>bo.parse(statement)<EOL>.canonicalize(namespace_targets=namespace_targets)<EOL>.compute_edges(rules=rules)<EOL>)<EOL><DEDENT>if edges is None:<EOL><INDENT>print(bo.original_bel_stmt)<EOL>print(bo.parse_visualize_error)<EOL>print(bo.validation_messages)<EOL><DEDENT>else:<EOL><INDENT>print(json.dumps(edges, indent=<NUM_LIT:4>))<EOL>if bo.validation_messages:<EOL><INDENT>print(bo.validation_messages)<EOL><DEDENT>else:<EOL><INDENT>print("<STR_LIT>")<EOL><DEDENT><DEDENT>return<EOL>
Create BEL Edges from BEL Statement