EBISPOT / OLS-graphview

Ontology visualisation widget for EBI's Ontology Lookup Service (OLS)
Apache License 2.0
2 stars 3 forks source link

Display two ontologies #1

Open charlineDS opened 7 years ago

charlineDS commented 7 years ago

Hi there,

We are working on project about the ontology and we are trying to display two ontologies on the same web page. We were trying to use your plugin ols-graphview but it’s appears that there is a bug. When you create two section with the tag

and different id, like <div id= « ontology_vis »> …

<div id = »ontology_vis1 » …

The plugin use ids (like "vis_network", "spinner", "Legend") and when we call it twice the ids are repeated and the plugin won’t work correctly (we only see one ontology). We are trying to solve this by changing ids into classes and select elements by the highest container’s id. For the moment this is not successful, do you think you can help us solve this problem ?

Thank you for your attention to this matter,

LLTommy commented 7 years ago

Hi! Honestly I never tried to display two ontologies with the graphview on the same webpage but I can imaging that some things collide. I will have a look into it and see if there is an easy way to fix it, give me some time please.

However, have you seen the tree view plugin? You might be interested in this as well and this plugin I tested with two instances on the same page to compare ontologies - that worked a while ago, not sure about the news version with default options - but there should be a way.

LLTommy commented 7 years ago

Ok I had a quick look. To initialise the plugin twice leads to problems with the second window. And yes I agree, the reason is that id's clash, I did not prepare the case using the plugin twice, so I'd need to do quite a few changes in order to make it possible to have two independent instances on the same page.

In the meantime, another way to display to different ontology terms in the same window would work quite quickly. I don't know if that is good enough for you and your usecase but you might want to give it a try.0

If you go to example 3 and replace in line number 64 the line for example with instance.fetchNewGraphData("http://www.ebi.ac.uk/ols/api/ontologies/efo/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000400/graph"); You have an ontology term from cmpo as well as one for efo in one visualisation. You could explore this further and implement the click/double click function on your own (by simply fetching data from the right url depending on which subgraph (e.g. efo, cmpo?) was clicked) ...... could that be a solution for you?

charlineDS commented 7 years ago

Well, no it can’t be a solution for our problem, because the purpose of all of this, is to be able to display N ontologies on the same page. So we need to display each ontology in a different container :D

LLTommy commented 7 years ago

I will try to find some time to look into this in the near future. But no promises ;)

LLTommy commented 7 years ago

Sorry, I did not forget about this, it's just hard for me to find some time to address this at the moment

charlineDS commented 7 years ago

Don't worry we found another way to display n ontologies in the same webpage, but thanks :)

LLTommy commented 7 years ago

Ok cool, just out of interest: Did you do it with my graphview or with something else?

charlineDS commented 7 years ago

No we didn't use yours, we used among other things, the library vis.js