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

[bug] missing Automat publications (and other attributes) #209

Closed
colleenXu opened this issue Jun 22, 2021 · 2 comments · Fixed by biothings/api-respone-transform.js#14 or biothings/bte_trapi_query_graph_handler#32
Labels
bug Something isn't working data source

Comments

@colleenXu
Copy link
Collaborator

colleenXu commented Jun 22, 2021

Summary

Bug: Automat services are returning publications + other attributes in their edge properties, which we aren't picking up.

Expected behavior: For TRAPI APIs, we should ingest and keep their edge attributes (a caveat is what if those edge attributes aren't TRAPI/biolink compliant? but this shouldn't be much of a concern. They should be since they're TRAPI APIs...).


Example:

EDIT: use different forks/branch code to run these queries:

  • Eric's bte-trapi/BioThings Explorer code (Eric's fork here, my branch with copied files here) so BTE uses the latest smartapi specs
  • CX's biomedical id resolver branch code so BTE can query Automat correctly

BTE has edge attributes like this from Automat Pharos API, in response to the query below. (This is from the edge between PUBCHEM.COMPOUND:2662-biolink:activity_decreased_by-NCBIGene:763)

                    "attributes": [
                        {
                            "attribute_type_id": "provided_by",
                            "value": [],
                            "value_type_id": "biolink:provided_by"
                        },
                        {
                            "attribute_type_id": "api",
                            "value": [
                                "Automat Pharos (trapi v-1.1.0)"
                            ],
                            "value_type_id": "bts:api"
                        },
                        {
                            "attribute_type_id": "publications",
                            "value": [],
                            "value_type_id": "biolink:publication"
                        }
                    ]

Compare to the corresponding edge, directly from Automat Pharos (this is edge 4386b8d7bf0ac020588859df59f811c9 that has the object NCBIGene:763). Notice that there are values in the publications attribute that BTE did not ingest properly above.

                    "attributes": [
                        {
                            "attribute_type_id": "biolink:Attribute",
                            "original_attribute_name": "affinity_parameter",
                            "value": "Ki",
                            "value_type_id": "EDAM:data_0006"
                        },
                        {
                            "attribute_type_id": "biolink:knowledge_source",
                            "original_attribute_name": "knowledge_source",
                            "value": [
                                "PHAROS_1_norm_edges.jsonl"
                            ],
                            "value_type_id": "EDAM:data_0006"
                        },
                        {
                            "attribute_type_id": "biolink:aggregator_knowledge_source",
                            "original_attribute_name": "biolink:aggregator_knowledge_source",
                            "value": [
                                "infores:pharos",
                                "infores:pharos"
                            ],
                            "value_type_id": "biolink:InformationResource"
                        },
                        {
                            "attribute_type_id": "biolink:Attribute",
                            "original_attribute_name": "affinity",
                            "value": 6.1,
                            "value_type_id": "EDAM:data_0006"
                        },
                        {
                            "attribute_type_id": "biolink:publications",
                            "original_attribute_name": "publications",
                            "value": [
                                "PMID:20605094",
                                "PMID:23067387"
                            ],
                            "value_type_id": "EDAM:data_0006"
                        },
                        {
                            "attribute_type_id": "biolink:relation",
                            "original_attribute_name": "relation",
                            "value": "GAMMA:ki",
                            "value_type_id": "EDAM:data_0006"
                        },
                        {
                            "attribute_type_id": "biolink:aggregator_knowledge_source",
                            "value": "infores:automat.pharos",
                            "value_type_id": "biolink:InformationResource",
                            "original_attribute_name": "biolink:aggregator_knowledge_source"
                        }
                    ],

The query

this can be POST request to BTE or to Automat Pharos: https://automat.renci.org/pharos/query

{
    "message": {
        "query_graph": {
            "nodes": {
                "n0": {
                    "ids":["PUBCHEM.COMPOUND:2662"],
                    "categories":["biolink:SmallMolecule"]
                },
                "n1": {
                    "categories":["biolink:Gene"]
               }
            },
            "edges": {
                "e0": {
                    "subject": "n0",
                    "object": "n1",
                    "predicates": ["biolink:activity_decreased_by"]
                }
            }
        }
    }
}
@colleenXu
Copy link
Collaborator Author

Why was this issue closed? My understanding is that this is still being worked on...

@newgene
Copy link
Member

newgene commented Aug 16, 2021

It was closed by Github automatically after merging @ericz1803 's PR above. Reopen it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working data source
Projects
None yet
3 participants