monarch-initiative / owlsim-v3

Ontology Based Profile Matching
16 stars 5 forks source link

Adding labels to phenotype list #17

Open yuanzhou opened 8 years ago

yuanzhou commented 8 years ago

1. When running phenogrid inside monarch-app, phenotype_list.json provided by monarch-app's disease page is used as the phenogrid data input. For those unmatched (after a simsearch) phenotypes, even though they have labels from the original phenotype_list.json, we will still need to create some functionality to traverse the labels for those unmatched. No need to send out extra ajax calls in this case.

2. When running phenogrid outside monarch-app, the users can provide any/random phenotype list that only have the IDs (since they won't be able to know all the labels) as the phenogrid data input. After a simsearch with sending out all the phenotype IDs, we get all the matched info. Unmatched phenotypes are still returned back with IDs. This screenshot shows that we have 14 phenotype provided by the user, and simsearch results contain all the 14 IDs in expanded a, and the similarity info in expanded b.

capture

So there are two possible workarounds:

a) Phenogrid sends out all those unmatched IDs in one ajax call to monarch-app, and gets all the corresponding labels back. We'll need to make sure either send this ajax call in the very beginning so once the unmatched checkbox is checked, the results can show immediately. Or do it by the time the checkbox is clicked, and display a loading image.

b) Can we modify simsearch API to add all the labels in the returned a section? This way we avoid using any extra ajax calls. And since simsearch can add labels to matched phenotypes, it should be straightforward to to the same to unmatched phenotypes.