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

BTE queries fail from handling the id prefixes #122

Closed
colleenXu opened this issue Mar 26, 2021 · 2 comments
Closed

BTE queries fail from handling the id prefixes #122

colleenXu opened this issue Mar 26, 2021 · 2 comments

Comments

@colleenXu
Copy link
Collaborator

colleenXu commented Mar 26, 2021

Like #116, with MyGene.info:

When querying from Pathway -> Gene with a REACT ID, the query fails because the requested id in q sent to MyGene.info includes the prefix, which MyGene doesn't recognize. Compare the query message sent by BTE to the correct query for MyGene.info below:


  1. What a successful query directly to MyGene.info looks like, see the q doesn't have a prefix:
fields: entrezgene
Request body:
{
  "q": "R-HSA-70895",
  "scopes": "pathway.reactome.id",
  "size":1000
}

  1. Query sent by BTE: see that the q has a prefix. BTE doesn't get any results from doing this.
    {
      "timestamp": "2021-03-26T02:22:18.663Z",
      "level": "DEBUG",
      "message": "call-apis: Succesfully made the following query: {\"url\":\"https://mygene.info/v3/query\",\"params\":{\"fields\":\"entrezgene\",\"species\":\"human\"},\"data\":\"q=REACT:R-HSA-70895&scopes=pathway.reactome.id&size=1000\",\"method\":\"post\",\"timeout\":50000}",
      "code": null
    },

Note: This is what the BTE TRAPI endpoint received. The smartapi ID is 59dce17363dce279d389100834e43648.

{
  "message": {
    "query_graph": {
      "edges": {
        "e00": {
          "object": "n01",
          "subject": "n00"
        }
      },
      "nodes": {
        "n00": {
          "category": "biolink:Pathway",
          "id": "REACT:R-HSA-70895"
        },
        "n01": {
          "category": "biolink:Gene"
        }
      }
    }
  }
}
@colleenXu
Copy link
Collaborator Author

colleenXu commented Mar 26, 2021

Followup:
Pathway -> Gene with KEGG ids work fine -> the prefix is removed correctly when directly querying MyGene.

Query sent by BTE: see that the q doesn't have a prefix. BTE doesn't get any results from doing this.

    {
      "timestamp": "2021-03-26T02:45:20.955Z",
      "level": "DEBUG",
      "message": "call-apis: Succesfully made the following query: {\"url\":\"https://mygene.info/v3/query\",\"params\":{\"fields\":\"entrezgene\",\"species\":\"human\"},\"data\":\"q=hsa00120&scopes=pathway.kegg.id&size=1000\",\"method\":\"post\",\"timeout\":50000}",
      "code": null
    },

Note: This is what the BTE TRAPI endpoint received. The smartapi ID is 59dce17363dce279d389100834e43648.

{
  "message": {
    "query_graph": {
      "edges": {
        "e00": {
          "object": "n01",
          "subject": "n00"
        }
      },
      "nodes": {
        "n00": {
          "category": "biolink:Pathway",
          "id": "KEGG:hsa00120"
        },
        "n01": {
          "category": "biolink:Gene"
        }
      }
    }
  }
}

@kevinxin90
Copy link
Contributor

It's working now

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

2 participants