-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from INCATools/registry
registry
- Loading branch information
Showing
9 changed files
with
518 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
db/phenio.owl: STAMP | ||
curl -L -s https://github.com/monarch-initiative/phenio/releases/download/latest/phenio.owl > $@.tmp && mv $@.tmp $@ | ||
|
||
db/bero.owl: STAMP | ||
curl -L -s https://github.com/berkeleybop/bero/releases/download/2022-05-26/bero.owl > $@.tmp && mv $@.tmp $@ | ||
|
||
db/aio.owl: STAMP | ||
curl -L -s https://raw.githubusercontent.com/berkeleybop/artificial-intelligence-ontology/main/aio.owl > $@.tmp && mv $@.tmp $@ | ||
|
||
db/reacto.owl: STAMP | ||
curl -L -s http://purl.obolibrary.org/obo/go/extensions/reacto.owl > $@.tmp && mv $@.tmp $@ | ||
|
||
db/go-lego.owl: STAMP | ||
curl -L -s http://purl.obolibrary.org/obo/go/extensions/go-lego.owl > $@.tmp && mv $@.tmp $@ | ||
|
||
db/bao.owl: STAMP | ||
robot merge -I http://www.bioassayontology.org/bao/bao_complete.owl -o $@ | ||
|
||
db/biolink.owl: STAMP | ||
robot merge -I https://w3id.org/biolink/biolink-model.owl.ttl -o $@ | ||
|
||
db/biopax.owl: STAMP | ||
curl -L -s http://www.biopax.org/release/biopax-level3.owl > $@.tmp && mv $@.tmp $@ | ||
|
||
db/enanomapper.owl: STAMP | ||
robot merge -I http://enanomapper.github.io/ontologies/enanomapper.owl -o $@ | ||
|
||
db/efo.owl: STAMP | ||
robot merge -I http://www.ebi.ac.uk/efo/efo.owl -o $@ | ||
|
||
db/edam.owl: STAMP | ||
curl -L -s http://edamontology.org/EDAM.owl > $@.tmp && mv $@.tmp $@ | ||
|
||
db/sweetAll.owl: STAMP | ||
robot merge -I http://sweetontology.net/sweetAll -o $@ | ||
|
||
db/lov.owl: STAMP | ||
robot merge -I https://lov.linkeddata.es/lov.n3.gz -o $@ | ||
|
||
db/schema-dot-org.owl: STAMP | ||
curl -L -s https://schema.org/version/latest/schemaorg-current-https.rdf > $@.tmp && mv $@.tmp $@ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,12 @@ | |
from typing import Optional | ||
|
||
import requests | ||
from linkml_runtime.loaders import yaml_loader | ||
from sqlalchemy import create_engine | ||
from sqlalchemy.orm import sessionmaker | ||
|
||
from semsql.builder.registry import registry_schema | ||
|
||
this_path = Path(__file__).parent | ||
|
||
|
||
|
@@ -103,3 +106,27 @@ def connect(owl_file: str): | |
Session = sessionmaker(bind=engine) | ||
session = Session() | ||
return session | ||
|
||
def compile_registry(registry_path: str) -> str: | ||
""" | ||
Generate makefile content from registry | ||
:param registry_path: | ||
:return: | ||
""" | ||
registry: registry_schema.Registry | ||
registry = yaml_loader.load(registry_path, target_class=registry_schema.Registry) | ||
mkfile = "" | ||
onts = [] | ||
for ont in registry.ontologies.values(): | ||
target = f"db/{ont.id}.owl" | ||
dependencies = ["STAMP"] | ||
if ont.has_imports or (ont.format and ont.format != 'rdfxml'): | ||
command = f"robot merge -I {ont.url} -o $@" | ||
else: | ||
command = f"curl -L -s {ont.url} > [email protected] && mv [email protected] $@" | ||
dependencies_str = " ".join(dependencies) | ||
mkfile += f"{target}: {dependencies_str}\n\t{command}\n\n" | ||
onts.append(ont.id) | ||
mkfile += f"EXTRA_ONTOLOGIES = {' '.join(onts)}" | ||
return mkfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
id: semantic-sql-registry | ||
description: Registry overlap for Semantic-SQL designed to supplement OBO vocabularies | ||
license: CC0 | ||
ontologies: | ||
phenio: | ||
description: Monarch Phenomics Integrated Ontology | ||
url: https://github.com/monarch-initiative/phenio/releases/download/latest/phenio.owl | ||
bero: | ||
url: https://github.com/berkeleybop/bero/releases/download/2022-05-26/bero.owl | ||
aio: | ||
url: https://raw.githubusercontent.com/berkeleybop/artificial-intelligence-ontology/main/aio.owl | ||
reacto: | ||
url: http://purl.obolibrary.org/obo/go/extensions/reacto.owl | ||
go-lego: | ||
url: http://purl.obolibrary.org/obo/go/extensions/go-lego.owl | ||
bao: | ||
url: http://www.bioassayontology.org/bao/bao_complete.owl | ||
has_imports: true | ||
biolink: | ||
url: https://w3id.org/biolink/biolink-model.owl.ttl | ||
jsonld_context: https://biolink.github.io/biolink-model/context.jsonld | ||
format: turtle | ||
# | ||
biopax: | ||
url: http://www.biopax.org/release/biopax-level3.owl | ||
enanomapper: | ||
url: http://enanomapper.github.io/ontologies/enanomapper.owl | ||
has_imports: true | ||
prefixmap: | ||
evs.ncit: http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl# | ||
fix: http://purl.org/obo/owl/FIX# | ||
efo: | ||
url: http://www.ebi.ac.uk/efo/efo.owl | ||
has_imports: true | ||
edam: | ||
url: http://edamontology.org/EDAM.owl | ||
sweetAll: | ||
url: http://sweetontology.net/sweetAll | ||
has_imports: true | ||
named_prefixmaps: | ||
- sweet | ||
- prefixcc | ||
lov: | ||
url: https://lov.linkeddata.es/lov.n3.gz | ||
format: n3 | ||
compression: gzip | ||
schema-dot-org: | ||
url: https://schema.org/version/latest/schemaorg-current-https.rdf |
Oops, something went wrong.