mygene.info icon indicating copy to clipboard operation
mygene.info copied to clipboard

more consistent handling of CURIE searches

Open andrewsu opened this issue 3 years ago • 0 comments

Per #103, we can do a fielded search for MGI IDs by simply escaping the colon in the CURIE. This strategy also works for GO IDs, but not MONDO IDs:

  • http://mygene.info/v3/query?q=mgi:MGI:88339 (WORKS)
  • http://mygene.info/v3/query?q=go.BP.id:GO:0000082 (WORKS)
  • http://mygene.info/v3/query?q=clingen.mondo:MONDO:0018950 (DOESN'T WORK)

If I execute these three examples using non-fielded queries, I also get inconsistent behavior:

  • http://mygene.info/v3/query?q=MGI:88339 (DOESN'T WORK)
  • http://mygene.info/v3/query?q=GO:0000082 (WORKS)
  • http://mygene.info/v3/query?q=MONDO:0018950 (DOESN'T WORK)

If I escape the colon in a non-fielded query, that fixes the MONDO query but not the MGI query:

  • http://mygene.info/v3/query?q=MGI:88339 (DOESN'T WORK)
  • http://mygene.info/v3/query?q=GO:0000082 (WORKS)
  • http://mygene.info/v3/query?q=MONDO:0018950 (WORKS)

If possible, I think we should make this consistent behavior across all CURIE types. If that's not possible, then I think we should be more clear in the documentation.

andrewsu avatar Mar 16 '21 19:03 andrewsu