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

Call superclasses? #283

Open
cbizon opened this issue Sep 19, 2021 · 0 comments
Open

Call superclasses? #283

cbizon opened this issue Sep 19, 2021 · 0 comments

Comments

@cbizon
Copy link
Contributor

cbizon commented Sep 19, 2021

{
    "message": {
        "query_graph": {
            "edges": {
                "e01": {
                    "object": "n0",
                    "subject": "n1",
                    "predicates": [
                        "biolink:entity_negatively_regulates_entity"
                    ]
                }
            },
            "nodes": {
                "n0": {
                    "ids": [
                        "NCBIGene:23221"
                    ],
                    "categories": [
                        "biolink:Gene"
                    ]
                },
                "n1": {
                    "categories": [
                        "biolink:SmallMolecule"
                    ]
                }
            }
        }
    }
}

Spoke is returning at least one result. But aragorn never calls spoke. This is because spoke has in its meta_knowledge_graph an edge between Gene and ChemicalEntity, rather than SmallMolecule. Now, if you take the result that spoke returned and put it in node norm, it gets recognized as a small molecule.

Should we call things that offer superclasses of what we're looking for and then see if we can downcast them? I don't really think so, but it might make sense in some cases e.g. external APIs where the way things are structured make it hard to be precise, even if the returned values can be more precisely typed.

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

No branches or pull requests

2 participants