diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..763cc1e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,41 @@ +# +# Oracle Java 8 Dockerfile +# +# https://github.com/dockerfile/java +# https://github.com/dockerfile/java/tree/master/oracle-java8 +# + +# Pull base image. +FROM ubuntu:16.04 + +ARG species=all + +RUN apt-get -y update && apt-get install -y software-properties-common python-software-properties + +# Install Java. +RUN \ + echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \ + add-apt-repository -y ppa:webupd8team/java && \ + apt-get update && \ + apt-get install -y oracle-java8-installer && \ + rm -rf /var/lib/apt/lists/* && \ + rm -rf /var/cache/oracle-jdk8-installer + +# Define commonly used JAVA_HOME variable +ENV JAVA_HOME /usr/lib/jvm/java-8-oracle + +# Define working directory. +WORKDIR /data +ADD owlsim-services/target/owlsim-services-3.0-SNAPSHOT.jar /data/ +ADD configuration-samples/configuration-all.yaml /data/configuration.yaml + +RUN if [ $species = "human" ]; \ + then \ + wget https://data.monarchinitiative.org/owl/all-hp.owl -O /data/all.owl; \ + else \ + wget http://ci.monarchinitiative.org/view/dev/job/create-owlsim-files-on-dev/lastSuccessfulBuild/artifact/server/all.owl -O /data/all.owl; \ + fi + +CMD java -jar /data/owlsim-services-3.0-SNAPSHOT.jar server /data/configuration.yaml + +EXPOSE 8080 diff --git a/README.md b/README.md index 41485c8..7fd2ddc 100644 --- a/README.md +++ b/README.md @@ -56,8 +56,26 @@ Paths: or for some versions of dropwizard: * http://localhost:8080/api/docs/ - * http://localhost:8080/api/match/matchers + * http://localhost:8080/api/match/matchers Example query using default config: http://localhost:8080/api/match/jaccard?id=X:heart-morphology&id=X:brain-morphology + +## Build with Docker + +Run those commands from the root directory (with Docker >= 1.9): + +``` +mvn package +docker build -t owlsim-all . # by default contains all the species +docker run -p 8080:8080 owlsim-all +``` + +To restrict to specific species: + +``` +docker build --build-arg species=all -t owlsim-all . # default if no args is provided or not matching any species +docker build --build-arg species=human -t owlsim-human + +``` diff --git a/configuration-samples/configuration-all.yaml b/configuration-samples/configuration-all.yaml new file mode 100644 index 0000000..8ea11ad --- /dev/null +++ b/configuration-samples/configuration-all.yaml @@ -0,0 +1,197 @@ +ontologyUris: + - /data/all.owl +ontologyDataUris: [] +dataTsvs: [] +curies: + # Skolemize Blank Nodes + # overwrite iri fragment with '' for unresovable bnodes + '_': 'https://monarchinitiative.org/.well-known/genid/' + + # Monarch-specific + '': 'https://monarchinitiative.org/' + 'MONARCH': 'https://monarchinitiative.org/MONARCH_' + + 'MonarchData': 'http://data.monarchinitiative.org/ttl/' + 'MonarchArchive': 'http://archive.monarchinitiative.org/ttl/' + + # other semantic-web items + 'Annotation': 'http://www.w3.org/ns/oa#Annotation' # FIXME - i don't think we're using this + 'dc': 'http://purl.org/dc/elements/1.1/' + 'foaf': 'http://xmlns.com/foaf/0.1/' + + # ontologies + # [y] indicates those that the monarch team contributes to + 'AQTLTrait': 'http://identifiers.org/animalqtltrait/' # FIXME - should get integrated into Upheno + 'BFO': 'http://purl.obolibrary.org/obo/BFO_' # BFO: Basic Formal Ontology + 'CHEBI' : 'http://purl.obolibrary.org/obo/CHEBI_' # ChEBI: Chemicals of Biological Interest + 'CHR' : 'http://purl.obolibrary.org/obo/CHR_' # CHR: Chromosome Ontology + 'CL' : 'http://purl.obolibrary.org/obo/CL_' # CL: Cell Ontology (cell types) [y] + 'CLO' : 'http://purl.obolibrary.org/obo/CLO_' # CLO: Cell Line Ontology [y] + 'CMO' : 'http://purl.obolibrary.org/obo/CMO_' # CMO: Clinical Measurements Ontology + 'DATA' : 'http://edamontology.org/data_' # EDAM: Data and Methods Ontology (data artifacts) + 'DC' : 'http://purl.obolibrary.org/obo/DC_' # TODO + 'DECIPHER' : 'http://purl.obolibrary.org/obo/DECIPHER_' # DECIPHER: Deciphering Developmental Disease + 'DOID': 'http://purl.obolibrary.org/obo/DOID_' # DOID: Human Disease Ontology [y] + 'ECO': 'http://purl.obolibrary.org/obo/ECO_' # ECO: Evidence Code Ontology [y] + 'EFO' : 'http://www.ebi.ac.uk/efo/EFO_' # EFO: Experimental Factor Ontology (all kinds of stuff) [y] + 'ENVO' : 'http://purl.obolibrary.org/obo/ENVO_' # ENVO: Environment Ontology + 'EOM' : 'http://purl.obolibrary.org/obo/EOM_' # elements of morphology phentoypes + 'ERO' : 'http://purl.obolibrary.org/obo/ERO_' # ERO: eagle-i resource ontology [y] + 'faldo' : 'http://biohackathon.org/resource/faldo#' # FALDO: Feature Annotation Location Description Ontology (genomic feature properties) [y] + 'FBcv' : 'http://purl.obolibrary.org/obo/FBcv_' # FBcv: flybase CV (includes phenotypes) + 'FBbt': 'http://purl.obolibrary.org/obo/FBbt_' # FBbt: flybase anatomy + 'FBdv': 'http://purl.obolibrary.org/obo/FBdv_' # FBdv: flybase developmental stages + 'GENO': 'http://purl.obolibrary.org/obo/GENO_' # GENO: Genotype Partonomy Ontology [y] + 'GO' : 'http://purl.obolibrary.org/obo/GO_' # GO: Gene Ontology [y] + 'HP': 'http://purl.obolibrary.org/obo/HP_' # HP: Human Phenotype Ontology [y] + 'IAO': 'http://purl.obolibrary.org/obo/IAO_' # IAO: Information Artifact Ontology [y] + 'KEGG-ds' : 'http://purl.obolibrary.org/KEGG-ds_' # KEGG-ds: KEGG Disease Ontology + 'LPT': 'http://purl.obolibrary.org/obo/LPT_' # LPT: Livestock Phenotypic Trait Ontology + 'MA': 'http://purl.obolibrary.org/obo/MA_' # MA: Mouse Anatomy Ontology [y] + 'MedGen' : 'http://www.ncbi.nlm.nih.gov/medgen/' # a vocabulary - should this be in purl? + 'MESH': 'http://purl.obolibrary.org/obo/MESH_' # MeSH: Medical Subject Headings (medical diseases, phenotypes, and drugs) + 'MP': 'http://purl.obolibrary.org/obo/MP_' # MP: Mammalian Phenotype Ontology [y] + 'MPATH': 'http://purl.obolibrary.org/obo/MPATH_' # MPATH: Mammalian Pathology Ontology + 'NBO': 'http://purl.obolibrary.org/obo/NBO_' # NBO: NeuroBehavior Ontology [y] + 'OBA': 'http://purl.obolibrary.org/obo/OBA_' # OBA: Ontology of Biological Attributes (traits) + 'OBAN': 'http://purl.org/oban/' # OBAN: Open Biomedical Annotation Model [y] + 'OBI': 'http://purl.obolibrary.org/obo/OBI_' # OBI: Ontology of Biomedical Investigations [y] + 'OBO': 'http://purl.obolibrary.org/obo/' # all ontologies in the OBO namespace (this is not itself an ontology) + 'OIO': 'http://www.geneontology.org/formats/oboInOwl#' # oboInOwl: obo-specific annotation properties, like synonym types + 'OMIA' : 'http://purl.obolibrary.org/obo/OMIA_' # OMIA: Online Mendelian Inheritance in Animals (animal diseases) + 'OMIM' : 'http://purl.obolibrary.org/obo/OMIM_' # OMIM: Online Mendelian Inheritance in Man (human disease and variants) + 'Orphanet' : 'http://www.orpha.net/ORDO/Orphanet_' # Orphanet: rare diseases and orphan drugs + 'PATO': 'http://purl.obolibrary.org/obo/PATO_' # PATO: Phenotypic Quality Ontology [y] + 'PCO': 'http://purl.obolibrary.org/obo/PCO_' # PCO: Population and Community Ontology [y] + 'PR': 'http://purl.obolibrary.org/obo/PR_' # PRO: protein ontology + 'PW' : 'http://purl.obolibrary.org/obo/PW_' # PW: pathway ontology + 'RO': 'http://purl.obolibrary.org/obo/RO_' # RO: Relationship Ontology [y] + 'SIO' : 'http://semanticscience.org/resource/SIO_' # SIO: SemanticScience Integrated Ontology (information artifacts) + 'SNOMED' : 'http://purl.obolibrary.org/obo/SNOMED_' # SNOMED:diseases and phenotypes + 'SO' : 'http://purl.obolibrary.org/obo/SO_' # SO: Sequence Ontology [y] + 'STATO': 'http://purl.obolibrary.org/obo/STATO_' # Statistics Ontology + 'UBERON' : 'http://purl.obolibrary.org/obo/UBERON_' # UBERON: integrated anatomy ontology (metazoans, mostly) [y] + 'UPHENO' : 'http://purl.obolibrary.org/obo/UPHENO_' # UPHENO: integrated phenotype ontology, and normal traits [y] + 'UMLS' : 'http://purl.obolibrary.org/obo/UMLS_' # UMLS: unified medical language system + 'UO' : 'http://purl.obolibrary.org/obo/UO_' # UO: units of measurements + 'VT' : 'http://purl.obolibrary.org/obo/VT_' # VT: Vertebrate Trait Ontology + 'WBPhenotype': 'http://purl.obolibrary.org/obo/WBPhenotype_' # WBPhenotype: WormBase phenotypes (nematode) [y] + 'XCO' : 'http://purl.obolibrary.org/obo/XCO_' # XCO: Experimental Conditions Ontology + 'ZFA': 'http://purl.obolibrary.org/obo/ZFA_' # ZFA: Zebrafish Anatomy Ontology [y] + 'ZFS': 'http://purl.obolibrary.org/obo/ZFS_' # ZFS: Zebrafish Staging [y] + 'ZP': 'http://purl.obolibrary.org/obo/ZP_' # ZP: Zebrafish Phenotype Ontology [y] + 'WBbt': 'http://purl.obolibrary.org/obo/WBbt_' #WBbt: C. elegans gross anatomy + 'EMAPA': 'http://purl.obolibrary.org/obo/EMAPA_' # EMAPA: Mouse gross anatomy and development, timed + 'XAO': 'http://purl.obolibrary.org/obo/XAO_' # XAO: Xenopus anatomy and development + + # publication/reference sources + 'DOI' : 'http://dx.doi.org/' + 'GeneReviews' : 'http://www.ncbi.nlm.nih.gov/books/' # diseases too + 'ISBN': 'https://monarchinitiative.org/ISBN_' + 'ISBN-10': 'https://monarchinitiative.org/ISBN10_' + 'ISBN-13': 'https://monarchinitiative.org/ISBN13_' + 'ISBN-15': 'https://monarchinitiative.org/ISBN15_' + 'J' : 'http://www.informatics.jax.org/reference/J:' # MGI-internal identifiers for pubs + 'MPD': 'http://phenome.jax.org/' + 'MPD-assay': 'http://phenome.jax.org/db/qp?rtn=views/catlines&keymeas=' + 'PMID': 'http://www.ncbi.nlm.nih.gov/pubmed/' + 'PMCID' : 'http://www.ncbi.nlm.nih.gov/pmc/' + 'AQTLPub' : 'http://www.animalgenome.org/cgi-bin/QTLdb/BT/qabstract?PUBMED_ID=' + 'GO_REF' : 'http://www.geneontology.org/cgi-bin/references.cgi#GO_REF:' + 'HPO' : 'http://human-phenotype-ontology.org/' # to be used for persons, though they don't resolve with this + + # strains, lines, or organismal reagents + 'APB': 'http://pb.apf.edu.au/phenbank/strain.html?id=' + 'CMMR': 'http://www.cmmr.ca/order.php?t=m&id=' + 'Coriell' : 'https://catalog.coriell.org/0/Sections/Search/Sample_Detail.aspx?Ref=' + 'CoriellCollection' : 'https://catalog.coriell.org/1/' + 'CoriellFamily' : 'https://catalog.coriell.org/0/Sections/BrowseCatalog/FamilyTypeSubDetail.aspx?fam=' + 'CoriellIndividual' : 'https://catalog.coriell.org/Search?q=' + 'dbSNPIndividual' : 'http://www.ncbi.nlm.nih.gov/SNP/snp_ind.cgi?ind_id=' # FIXME + 'EMMA' : 'https://www.infrafrontier.eu/search?keyword=EM:' + 'JAX' : 'http://jaxmice.jax.org/strain/' + 'MMRRC' : 'https://www.mmrrc.org/catalog/sds.php?mmrrc_id=' + 'MPD-strain': 'http://phenome.jax.org/db/q?rtn=strains/details&strainid=' + 'MUGEN': 'http://bioit.fleming.gr/mugen/Controller?workflow=ViewModel&expand_all=true&name_begins=model.block&eid=' + 'NCIMR': 'https://mouse.ncifcrf.gov/available_details.asp?ID=' + 'RBRC': 'http://www2.brc.riken.jp/lab/animal/detail.php?brc_no=RBRC' + + # organisms and genome builds (also NCBITaxon) + 'NCBIAssembly': 'http://www.ncbi.nlm.nih.gov/assembly/' + 'NCBIGenome' : 'http://www.ncbi.nlm.nih.gov/genome/' + 'NCBITaxon' : 'http://purl.obolibrary.org/obo/NCBITaxon_' + 'OMIA-breed': 'https://monarchinitiative.org/model/OMIA-breed:' + 'UCSC' : 'ftp://hgdownload.cse.ucsc.edu/goldenPath/' + + # homology + 'HOMOLOGENE' : 'http://www.ncbi.nlm.nih.gov/homologene/' + 'KEGG-ko' : 'http://www.kegg.jp/dbget-bin/www_bget?ko:' + 'PANTHER' : 'http://www.pantherdb.org/panther/family.do?clsAccession=' # protein/orthologous families + + # variants + 'AQTL' : 'http://identifiers.org/animalqtl/' # FIXME temporary # traits + 'CGD' : 'http://ohsu.edu/cgd/' # diseases, variant instances + 'ClinVar' : 'http://www.ncbi.nlm.nih.gov/clinvar/' # variant+condition + 'ClinVarVariant' : 'http://www.ncbi.nlm.nih.gov/clinvar/variation/' + 'ClinVarSubmitters' : 'http://www.ncbi.nlm.nih.gov/clinvar/submitters/' + 'COSMIC' : 'http://cancer.sanger.ac.uk/cosmic/mutation/overview?id=' + 'HGMD' : 'http://identifiers.org/hgmd/' + 'dbSNP' : 'http://www.ncbi.nlm.nih.gov/projects/SNP/snp_ref.cgi?rs=' + 'dbVar' : 'http://www.ncbi.nlm.nih.gov/dbvar/' + + # pathways + 'KEGG-path' : 'http://www.kegg.jp/dbget-bin/www_bget?path:' + 'REACT' : 'http://www.reactome.org/PathwayBrowser/#/' + + # genes (and RNAs and transcripts) + 'BIOGRID' : 'http://thebiogrid.org/' # also interactions + 'CCDS' : 'http://www.ncbi.nlm.nih.gov/CCDS/CcdsBrowse.cgi?REQUEST=CCDS&DATA=' # transcripty things + 'dictyBase' : 'http://dictybase.org/gene/' + 'EcoGene' : 'http://ecogene.org/gene/' + 'ENSEMBL' : 'http://identifiers.org/ensembl/' + 'FlyBase' : 'http://flybase.org/reports/' # also variants, pubs, genotypes, strains + 'GenBank' : 'http://www.ncbi.nlm.nih.gov/nuccore/' + 'HGNC' : 'http://identifiers.org/hgnc/HGNC:' + 'IMPC' : 'http://www.mousephenotype.org/data/genes/' # FIXME + 'KEGG-hsa' : 'http://www.kegg.jp/dbget-bin/www_bget?hsa:' + 'MGI': 'http://www.informatics.jax.org/accession/MGI:' # also variants, pubs, genotypes + 'miRBase' : 'http://identifiers.org/mirbase/' # microRNA genes + 'NCBIGene' : 'http://www.ncbi.nlm.nih.gov/gene/' + 'PomBase' : 'http://identifiers.org/PomBase:' + 'RefSeq' : 'http://www.ncbi.nlm.nih.gov/refseq/?term=' + 'RGD' : 'http://rgd.mcw.edu/rgdweb/report/gene/main.html?id=' + 'SGD' : 'http://identifiers.org/SGD:' + 'TAIR' : 'http://identifiers.org/TAIR:' + 'WormBase' : 'http://identifiers.org/wormbase/' # also variants, pubs, genotypes + 'Xenbase' : 'http://identifiers.org/xenbase/' + 'ZFIN' : 'http://zfin.org/' # also variants, pubs, genotypes + + # proteins + 'EC' : 'http://identifiers.org/ec-code/' + 'HPRD' : 'http://www.hprd.org/protein/' + 'NCBIProtein' : 'http://www.ncbi.nlm.nih.gov/protein/' + 'PDB' : 'http://identifiers.org/PDB:' + 'SwissProt' : 'http://identifiers.org/SwissProt:' + 'TrEMBL' : 'http://www.uniprot.org/uniprot/' + 'UniProtKB' : 'http://identifiers.org/uniprot/' + + # SEPIO: Scientific Evidence and Provenance Information Ontology + 'SEPIO': 'http://purl.obolibrary.org/obo/SEPIO_' + 'VIVO': 'http://vivoweb.org/ontology/core#' + + #Procedures/protocols + 'IMPRESS-procedure' : 'https://www.mousephenotype.org/impress/procedures/' + 'IMPRESS-protocol' : 'https://www.mousephenotype.org/impress/protocol/' + 'IMPRESS-parameter' : 'https://www.mousephenotype.org/impress/parameterontologies/' + + #Drugs, chemicals, compounds + 'CID' : 'http://pubchem.ncbi.nlm.nih.gov/compound/' + 'DrugBank' : 'http://www.drugbank.ca/drugs/' + 'SIO': 'http://semanticscience.org/resource/SIO_' + 'OAE': 'http://purl.obolibrary.org/obo/OAE_' + 'RXCUI': 'http://purl.bioontology.org/ontology/RXNORM/' + 'MEDDRA': 'http://purl.bioontology.org/ontology/MEDDRA/' + 'FDADrug': 'http://www.fda.gov/Drugs/InformationOnDrugs/' + 'BT': 'http://c.biothings.io/#' + 'UNII': 'http://fdasis.nlm.nih.gov/srs/unii/' + 'GINAS' : 'http://tripod.nih.gov/ginas/app/substance#'