Permalink
Newer
100644
83 lines (51 sloc)
2.53 KB
|
|
||
| 1 | # owlsim-v3 | |
|
|
||
| 2 | ||
| 3 | Ontology Based Profile Matching | |
| 4 | ||
|
|
||
| 5 | [](https://travis-ci.org/monarch-initiative/owlsim-v3) | |
|
|
||
| 6 | [](https://coveralls.io/github/monarch-initiative/owlsim-v3?branch=master) | |
|
|
||
| 7 | [](http://owlsim.readthedocs.org/en/latest/?badge=latest) | |
|
|
||
| 8 | ||
|
|
||
| 9 | This will eventually replace sim2 currently distributed as part of owltools | |
|
|
||
| 10 | ||
| 11 | ## Documentation | |
| 12 | ||
| 13 | For now you must do this: | |
| 14 | ||
| 15 | mvn javadoc:javadoc | |
| 16 | ||
| 17 | And then open target/site/apidocs/index.html in a browser | |
| 18 | ||
|
|
||
| 19 | ## Running it | |
| 20 | ||
|
|
||
| 21 | To become more familiar with the code, please run the junit tests in eclipse. | |
|
|
||
| 22 | ||
|
|
||
| 23 | Also try the performance/integration tests in `owlsim.compute.matcher.perf` - these will need extra files downloaded | |
| 24 | see the Makefile for details. | |
|
|
||
| 25 | ||
|
|
||
| 26 | To run the REST services: | |
|
|
||
| 27 | ||
|
|
||
| 28 | mvn package | |
|
|
||
| 29 | ||
|
|
||
| 30 | produces a standalone Dropwizard jar: | |
| 31 | ||
| 32 | owlsim-services/target/owlsim-services-3.0-SNAPSHOT.jar | |
| 33 | ||
| 34 | which runs with: | |
| 35 | ||
|
|
||
| 36 | cd owlsim-services | |
| 37 | java -jar target/owlsim-services-3.0-SNAPSHOT.jar server src/test/resources/test-configuration.yaml | |
|
|
||
| 38 | ||
| 39 | where configuration.yaml describes the desired ontologies: | |
| 40 | ||
| 41 | ontologyUris: | |
|
|
||
| 42 | - owlsim-core/src/test/resources/simple-pheno-with-negation.owl | |
|
|
||
| 43 | ontologyDataUris: [] | |
| 44 | ||
| 45 | and then browse the [REST documentation](http://localhost:8080/api/docs/). | |
| 46 | ||
| 47 | If you prefer to run the REST services from your IDE launch: | |
| 48 | `org.monarchinitiative.owlsim.services.OwlSimServiceApplication` as a main | |
| 49 | class with `server` and an appropriate YAML configuration as arguments. | |
|
|
||
| 50 | ||
| 51 | Paths: | |
| 52 | ||
| 53 | * http://localhost:8080/api-docs/ | |
| 54 | * http://localhost:8080/match/matchers -- lists matchers | |
| 55 | ||
| 56 | or for some versions of dropwizard: | |
| 57 | ||
| 58 | * http://localhost:8080/api/docs/ | |
|
|
||
| 59 | * http://localhost:8080/api/match/matchers | |
|
|
||
| 60 | ||
|
|
||
| 61 | Example query using default config: | |
|
|
||
| 62 | ||
|
|
||
| 63 | http://localhost:8080/api/match/jaccard?id=X:heart-morphology&id=X:brain-morphology | |
|
|
||
| 64 | ||
| 65 | ## Build with Docker | |
| 66 | ||
|
|
||
| 67 | Run those commands from the root directory (with Docker >= 1.9): | |
|
|
||
| 68 | ||
| 69 | ``` | |
| 70 | mvn package | |
|
|
||
| 71 | docker build -t owlsim-all . # by default contains all the species | |
|
|
||
| 72 | docker run -e JAVA_OPTS='-Xmx10g' -p 8080:8080 owlsim-all | |
|
|
||
| 73 | ``` | |
| 74 | ||
| 75 | To restrict to specific species: | |
| 76 | ||
| 77 | ``` | |
| 78 | docker build --build-arg species=all -t owlsim-all . # default if no args is provided or not matching any species | |
|
|
||
| 79 | docker build --build-arg species=Hs -t owlsim-human . | |
| 80 | docker build --build-arg species=Hs,Mm -t owlsim-multi . | |
| 81 | # supported species: Hs,Mm,Dr,Dm,Ce | |
|
|
||
| 82 | ``` |