-
Notifications
You must be signed in to change notification settings - Fork 0
Quick Start
Ontotrek is hosted at http://genepio.org/ontotrek.
OntoTrek can be run immediately in your browser if you have cloned the github repo to your computer. Since the index.html app page script fetches the selected ontology file in .json format from the data/ subfolder, it requires running a local webserver from the folder it is located in, e.g.
> python -m http.server
This enables one to open a web browser, usually with URL http://localhost:8000/index.html to run the application.
If you want to look at a particular ontology file that is not in the list, in the web app you can enter a URL of an ontology to be directly retrieved and displayed.
This application for the most part relies only on javascript in your browser.
Issue is as of Jan 26 2020 that 3d-force-graph isn't compiling that simply, so currently in index.html we're including one of its files as a direct reference to a file downloaded from //unpkg.com/3d-force-graph
- Clone the 3d-force-graph repo separately, and npm install or update it. If that doesn't work that isn't a problem. The needed files are still there for browserify
However, it loads the 3d-force-graph script which is contained inside bundle.js. If for development reasons you want to upgrade bundle.js to the latest versions of 3d-force-graph etc. you will need to install the node.js npm environment. Details of javascript and file generation are in /js/common.js. To summarise:
To update /js/bundle.js which needs latest 3d-force-graph, you need to run browserify.org's "browserify" command. To load it (may need sudo su):
npm install -g browserify
Then in /js folder, regenerate bundle.js based on super-basic index.js
browserify index.js -o bundle.js
That should do it!
A number of OBOFoundry ontologies are included in Ontotrek. They can be loaded using the dropdown menu.
You can also provide your own ontology URL. The ontology should be formatted as an OWL rdf/xml file. Currently all terms which are owl:subClassOf owl:Thing are retrieved. If subclasses are inferred in your ontology, you will need to create an explicit version of it by using a reasoner and saving the output to an OWL file.
Once an ontology is loaded, a snapshot of the ontology can be downloaded as a JSON file. This JSON file can also be uploaded as an alternative to loading an ontology. This method is much quicker as there is the entire ontology is rendered immediately, rather than built from the root. A loaded ontology can be re-render to rebuild it from scratch.