Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main README example TRAPI Query needs updating #436

Open
RichardBruskiewich opened this issue Jun 14, 2023 · 1 comment
Open

Main README example TRAPI Query needs updating #436

RichardBruskiewich opened this issue Jun 14, 2023 · 1 comment
Assignees

Comments

@RichardBruskiewich
Copy link
Contributor

RichardBruskiewich commented Jun 14, 2023

Just a placeholder issue pointing out the fact that the main repository README needs updating to TRAPI 1.4. This may just mean transferring some of the examples from the implementation guidelines into the root README.

For example, extending the entire example to be closer to 1.4 spec (i.e. with addition (i.e. "auxiliary_graphs") and restructuring (results.edge_bindings moved into "analyses").

Roughed in (not totally right for sure...):

{
  "response": {
    "message": {
    "query_graph": {
        "nodes": {
            "type-2 diabetes": {"ids": ["MONDO:0005148"]},
            "drug": {"categories": ["biolink:Drug"]}
        },
        "edges": {
            "treats": {"subject": "drug", "predicates": ["biolink:treats"], "object": "type-2 diabetes"}
        }
    },
    "knowledge_graph": {
        "nodes": {
            "MONDO:0005148": {"name": "type-2 diabetes"},
            "CHEBI:6801": {"name": "metformin", "categories": ["biolink:Drug"]}
        },
        "edges": {
            "df87ff82": {"subject": "CHEBI:6801", "predicate": "biolink:treats", "object": "MONDO:0005148", "sources": [{"resource_id": "infores:molepro", "resource_role": "primary_knowledge_source"}]}
        }
    },
    "auxiliary_graphs": {
        "a0": {
            "edges": [
                "e02",
                "e12"
            ]
        },
        "a1": {
            "edges": [
                "extra_edge0"
            ]
        },
        "a2": {
            "edges": [
                "extra_edge1"
            ]
        }
    },
    "results": [
        {
            "node_bindings": {
                "type-2 diabetes": [{"id": "MONDO:0005148"}],
                "drug": [{"id": "CHEBI:6801"}]
            },
            "analyses":[
                {
                    "resource_id": "infores:ara0",
                    "edge_bindings": {"treats": [{"id": "df87ff82"}]},
                    "support_graphs": [],
                    "score": 0.7
                }
            ]
        }
    ]
}
  }
}
@edeutsch
Copy link
Collaborator

Looking for volunteers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants