biothings / mygene.info

MyGene.info: A BioThings API for gene annotations
http://mygene.info
Other
113 stars 20 forks source link

WNT7B #26

Closed rsasik closed 6 years ago

rsasik commented 6 years ago

A name "WNT7B" gives this output (below). I don't think WNT4 should be there.

{ "max_score": 427.66583, "took": 6, "total": 4, "hits": [ { "_id": "7477", "_score": 427.66583, "name": "Wnt family member 7B" }, { "_id": "22422", "_score": 341.75598, "name": "wingless-type MMTV integration site family, member 7B" }, { "_id": "315196", "_score": 303.5048, "name": "Wnt family member 7B" }, { "_id": "54361", "_score": 0.3820109, "name": "Wnt family member 4" } ] }

newgene commented 6 years ago

@rsasik An "unfielded" query like this:

http://mygene.info/v3/query?q=WNT7B

queries against many fields, we specifically tuned the scoring function so that the symbol matches appear first and the matches on fields like "name" appear later. That's why you see first three hits have much higher scores (they are wnt7b in human, mouse, rat). While WNT4 shows up is just because of the matches on its summary text. You can see it here:

http://mygene.info/v3/query?q=WNT7B&fields=name,symbol,taxid,entrezgene,summary

Alternatively, you can also try the more specific "fielded" query:

http://mygene.info/v3/query?q=symbol:WNT7B

which should return only the matches on symbol field.