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

small bug: merging Multiomics drug response edges #775

Closed
colleenXu opened this issue Jan 18, 2024 · 2 comments
Closed

small bug: merging Multiomics drug response edges #775

colleenXu opened this issue Jan 18, 2024 · 2 comments
Labels
bug Something isn't working On CI Related changes are deployed to CI server

Comments

@colleenXu
Copy link
Collaborator

colleenXu commented Jan 18, 2024

I noticed an edge between imatinib - KIT, from Multiomics drug response, that had two primary_knowledge_source objects. When I dug into more, I realized that there were two records in the BioThings API that were being merged by BTE.

Screen Shot 2024-01-17 at 5 29 09 PM

This can be fixed quickly by using "biolink:primary_knowledge_source" edge-attribute that is still there to identify unique edges. However, if this edge-attribute is removed later (since it's not actually needed), we'll need to figure out another way to "not merge" these records.

@colleenXu
Copy link
Collaborator Author

@tokebe @andrewsu I think this bug fix can be deployed now for this upcoming release...

@tokebe tokebe added the On CI Related changes are deployed to CI server label Jan 18, 2024
@colleenXu
Copy link
Collaborator Author

colleenXu commented Feb 21, 2024

I've confirmed that things work as-expected after the Prod deployment

POST to https://bte.transltr.io/v1/smartapi/adf20dd6ff23dfe18e8e012bde686e31/query (Prod instance, Multiomics drug-repsonse only through BTE)

{
    "message": {
        "query_graph": {
            "nodes": {
                "n0": {
                    "ids":["PUBCHEM.COMPOUND:5291"],
                    "categories":["biolink:ChemicalEntity"],
                    "name": "imatinib"
                },
                "n1": {
                    "categories":["biolink:Gene"]
               }
            },
            "edges": {
                "e1": {
                    "subject": "n0",
                    "object": "n1",
                    "predicates": ["biolink:physically_interacts_with"]
                }
            }
        }
    }
}

Response (multiomics-fix.json) has two separate edges, one for TTD and one for drugcentral

                "95791a7a9661df24ea4774998fc53757": {
                    "predicate": "biolink:physically_interacts_with",
                    "subject": "PUBCHEM.COMPOUND:5291",
                    "object": "NCBIGene:3815",
                    "attributes": [
                        {
                            "attribute_type_id": "biolink:primary_knowledge_source",
                            "attributes": [
                                {
                                    "attribute_type_id": "biolink:source_infores",
                                    "value": "infores:ttd"
                                }
                            ],
                            "value": "infores:ttd"
                        },
                        {
                            "attribute_type_id": "biolink:aggregator_knowledge_source",
                            "value": "infores:biothings-multiomics-biggim-drugresponse"
                        }
                    ],
                    "sources": [
                        {
                            "resource_id": "infores:ttd",
                            "resource_role": "primary_knowledge_source"
                        },
                        {
                            "resource_id": "infores:biothings-multiomics-biggim-drugresponse",
                            "resource_role": "aggregator_knowledge_source",
                            "upstream_resource_ids": [
                                "infores:ttd"
                            ]
                        },
                        {
                            "resource_id": "infores:service-provider-trapi",
                            "resource_role": "aggregator_knowledge_source",
                            "upstream_resource_ids": [
                                "infores:biothings-multiomics-biggim-drugresponse"
                            ]
                        }
                    ]
                },


                "3e5fb4a92bbbbe921a84a0c0193e5460": {
                    "predicate": "biolink:physically_interacts_with",
                    "subject": "PUBCHEM.COMPOUND:5291",
                    "object": "NCBIGene:3815",
                    "attributes": [
                        {
                            "attribute_type_id": "biolink:primary_knowledge_source",
                            "attributes": [
                                {
                                    "attribute_type_id": "biolink:source_infores",
                                    "value": "infores:drugcentral"
                                }
                            ],
                            "value": "infores:drugcentral"
                        },
                        {
                            "attribute_type_id": "biolink:aggregator_knowledge_source",
                            "value": "infores:biothings-multiomics-biggim-drugresponse"
                        }
                    ],
                    "sources": [
                        {
                            "resource_id": "infores:drugcentral",
                            "resource_role": "primary_knowledge_source"
                        },
                        {
                            "resource_id": "infores:biothings-multiomics-biggim-drugresponse",
                            "resource_role": "aggregator_knowledge_source",
                            "upstream_resource_ids": [
                                "infores:drugcentral"
                            ]
                        },
                        {
                            "resource_id": "infores:service-provider-trapi",
                            "resource_role": "aggregator_knowledge_source",
                            "upstream_resource_ids": [
                                "infores:biothings-multiomics-biggim-drugresponse"
                            ]
                        }
                    ]
                },

Closing issue, opening a new one on a more robust fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working On CI Related changes are deployed to CI server
Projects
None yet
Development

No branches or pull requests

2 participants