Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding overrides for SWO prefixes. #91

Merged
merged 2 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
196 changes: 186 additions & 10 deletions ontologies.Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
download/upheno.owl: STAMP
curl -L -s http://purl.obolibrary.org/obo/upheno.owl > [email protected]
download/swo.owl: STAMP
curl -L -s http://purl.obolibrary.org/obo/swo.owl > [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

.PRECIOUS: download/upheno.owl
.PRECIOUS: download/swo.owl

db/upheno.owl: download/upheno.owl
db/swo.owl: download/swo.owl
robot merge -i $< -o $@


Expand All @@ -20,6 +20,39 @@ db/chiro.owl: download/chiro.owl
robot relax -i $< merge -o $@


download/pcl.owl: STAMP
curl -L -s http://purl.obolibrary.org/obo/pcl.owl > [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

.PRECIOUS: download/pcl.owl

db/pcl.owl: download/pcl.owl
cp $< $@


download/chemessence.owl: STAMP
curl -L -s https://github.com/cmungall/chemessence/releases/latest/download/chemessence.owl > [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

.PRECIOUS: download/chemessence.owl

db/chemessence.owl: download/chemessence.owl
cp $< $@


download/ogco.owl: STAMP
curl -L -s https://raw.githubusercontent.com/cmungall/chemessence/refs/heads/main/src/ontology/components/ogco.owl > [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

.PRECIOUS: download/ogco.owl

db/ogco.owl: download/ogco.owl
cp $< $@


download/ncit.owl: STAMP
curl -L -s http://purl.obolibrary.org/obo/ncit.owl > [email protected]
sha256sum -b [email protected] > [email protected]
Expand Down Expand Up @@ -86,6 +119,17 @@ db/msio.owl: download/msio.owl
cp $< $@


download/pride.owl: STAMP
curl -L -s https://raw.githubusercontent.com/PRIDE-Archive/pride-ontology/master/pride_cv.obo > [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

.PRECIOUS: download/pride.owl

db/pride.owl: download/pride.owl
robot relax -i $< merge -o $@


download/modl.owl: STAMP
curl -L -s https://raw.githubusercontent.com/Data-Semantics-Laboratory/modular-ontology-design-library/master/MODL.owl > [email protected]
sha256sum -b [email protected] > [email protected]
Expand All @@ -98,7 +142,7 @@ db/modl.owl: download/modl.owl


download/phenio.owl: STAMP
curl -L -s https://github.com/monarch-initiative/phenio/releases/latest/download/phenio.owl > [email protected]
curl -L -s https://github.com/monarch-initiative/phenio/releases/latest/download/phenio.owl.gz | gzip -dc > [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

Expand Down Expand Up @@ -163,6 +207,17 @@ db/reacto.owl: download/reacto.owl
cp $< $@


download/xsmo.owl: STAMP
curl -L -s https://download.xenbase.org/xenbase/Ontologies/XSMO/XSMO_1.1/XSMO_1.1.owl > [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

.PRECIOUS: download/xsmo.owl

db/xsmo.owl: download/xsmo.owl
cp $< $@


download/bcio.owl: STAMP
curl -L -s http://humanbehaviourchange.org/ontology/bcio.owl > [email protected]
sha256sum -b [email protected] > [email protected]
Expand Down Expand Up @@ -229,6 +284,28 @@ db/oeo.owl: download/oeo.owl
cp $< $@


download/envthes.owl: STAMP
curl -L -s https://vocabs.lter-europe.net/rest/v1/envthes/data?format=text/turtle > [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

.PRECIOUS: download/envthes.owl

db/envthes.owl: download/envthes.owl
robot query -i $< --update sparql/skos-to-owl.ru -o $@


download/wifire.owl: STAMP
curl -L -s https://raw.githubusercontent.com/WIFIRE-Lab/WIFIRE-commons-ontology/master/WIFIRE-commons-ontology-V1.owl > [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

.PRECIOUS: download/wifire.owl

db/wifire.owl: download/wifire.owl
cp $< $@


download/taxslim.owl: STAMP
curl -L -s http://purl.obolibrary.org/obo/ncbitaxon/subsets/taxslim.obo > [email protected]
sha256sum -b [email protected] > [email protected]
Expand Down Expand Up @@ -406,7 +483,7 @@ db/bao.owl: download/bao.owl


download/orcid.owl: STAMP
curl -L -s https://raw.githubusercontent.com/cthoyt/wikidata-orcid-ontology/main/orcid.owl > [email protected]
curl -L -s https://w3id.org/orcidio/orcidio.owl > [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

Expand Down Expand Up @@ -482,6 +559,28 @@ db/ito.owl: download/ito.owl
cp $< $@


download/chemont.owl: STAMP
curl -L -s http://classyfire.wishartlab.com/system/downloads/1_0/chemont/ChemOnt_2_1.obo.zip > [email protected] && unzip -p [email protected] ChemOnt_2_1.obo > [email protected] && rm [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

.PRECIOUS: download/chemont.owl

db/chemont.owl: download/chemont.owl
robot convert -i $< -o $@


download/molgenie.owl: STAMP
curl -L -s https://github.com/MolGenie/ontology/blob/main/mol_classes_ext_2024-11-20.obo > [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

.PRECIOUS: download/molgenie.owl

db/molgenie.owl: download/molgenie.owl
robot convert -i $< -o $@


download/cso.owl: STAMP
curl -L -s https://cso.kmi.open.ac.uk/download/version-3.3/CSO.3.3.owl.zip > [email protected] && unzip -p [email protected] CSO.3.3.owl > [email protected] && rm [email protected]
sha256sum -b [email protected] > [email protected]
Expand All @@ -504,6 +603,17 @@ db/obiws.owl: download/obiws.owl
cp $< $@


download/biopragmatics-reactome.owl: STAMP
curl -L -s https://w3id.org/biopragmatics/resources/reactome/reactome.obo > [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

.PRECIOUS: download/biopragmatics-reactome.owl

db/biopragmatics-reactome.owl: download/biopragmatics-reactome.owl
cp $< $@


download/reactome-hs.owl: STAMP
curl -L -s https://reactome.org/download/current/biopax.zip > [email protected] && unzip -p [email protected] Homo_sapiens.owl > [email protected] && rm [email protected]
sha256sum -b [email protected] > [email protected]
Expand Down Expand Up @@ -592,6 +702,28 @@ db/sweetAll.owl: download/sweetAll.owl
robot merge -i $< -o $@


download/oboe-core.owl: STAMP
curl -L -s http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl > [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

.PRECIOUS: download/oboe-core.owl

db/oboe-core.owl: download/oboe-core.owl
cp $< $@


download/oboe-standards.owl: STAMP
curl -L -s http://ecoinformatics.org/oboe/oboe.1.0/oboe-standards.owl > [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

.PRECIOUS: download/oboe-standards.owl

db/oboe-standards.owl: download/oboe-standards.owl
cp $< $@


download/lov.owl: STAMP
curl -L -s https://lov.linkeddata.es/lov.n3.gz | gzip -dc > [email protected]
sha256sum -b [email protected] > [email protected]
Expand Down Expand Up @@ -735,6 +867,17 @@ db/icd10cm.owl: download/icd10cm.owl
cp $< $@


download/omim.owl: STAMP
curl -L -s https://github.com/monarch-initiative/mondo-ingest/releases/latest/download/omim.owl > [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

.PRECIOUS: download/omim.owl

db/omim.owl: download/omim.owl
cp $< $@


download/co_324.owl: STAMP
curl -L -s https://cropontology.org/ontology/CO_324/rdf > [email protected]
sha256sum -b [email protected] > [email protected]
Expand Down Expand Up @@ -824,7 +967,7 @@ db/eccode.owl: download/eccode.owl


download/uniprot.owl: STAMP
curl -L -s https://github.com/biopragmatics/obo-db-ingest/raw/main/export/uniprot/2022_02/uniprot.owl.gz | gzip -dc > [email protected]
curl -L -s https://w3id.org/biopragmatics/resources/uniprot/2022_02/uniprot.owl.gz | gzip -dc > [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

Expand All @@ -835,14 +978,14 @@ db/uniprot.owl: download/uniprot.owl


download/rhea.owl: STAMP
curl -L -s https://w3id.org/biopragmatics/resources/rhea/rhea.owl > [email protected]
curl -L -s https://w3id.org/biopragmatics/resources/rhea/rhea.obo > [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

.PRECIOUS: download/rhea.owl

db/rhea.owl: download/rhea.owl
cp $< $@
robot merge -i $< -o $@


download/swisslipid.owl: STAMP
Expand Down Expand Up @@ -900,6 +1043,28 @@ db/wikipathways.owl: download/wikipathways.owl
cp $< $@


download/pathbank.owl: STAMP
curl -L -s https://w3id.org/biopragmatics/resources/pathbank/pathbank.obo.gz | gzip -dc > [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

.PRECIOUS: download/pathbank.owl

db/pathbank.owl: download/pathbank.owl
cp $< $@


download/kegg.genome.owl: STAMP
curl -L -s https://w3id.org/biopragmatics/resources/kegg.genome/kegg.genome.obo > [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

.PRECIOUS: download/kegg.genome.owl

db/kegg.genome.owl: download/kegg.genome.owl
cp $< $@


download/drugmechdb.owl: STAMP
curl -L -s None > [email protected]
sha256sum -b [email protected] > [email protected]
Expand Down Expand Up @@ -1021,6 +1186,17 @@ db/mixs.owl: download/mixs.owl
robot merge -i $< reason -o $@


download/kgcl.owl: STAMP
curl -L -s https://w3id.org/kgcl/kgcl.owl.ttl > [email protected]
sha256sum -b [email protected] > [email protected]
mv [email protected] $@

.PRECIOUS: download/kgcl.owl

db/kgcl.owl: download/kgcl.owl
robot merge -i $< reason -o $@


download/fibo.owl: STAMP
curl -L -s https://spec.edmcouncil.org/fibo/ontology/AboutFIBOProd/ > [email protected]
sha256sum -b [email protected] > [email protected]
Expand Down Expand Up @@ -1086,4 +1262,4 @@ download/%.owl: STAMP
db/%.owl: download/%.owl
robot merge -i $< -o $@

EXTRA_ONTOLOGIES = upheno chiro ncit fma maxo foodon chebiplus msio modl phenio phenio_test comploinc bero aio reacto bcio icd10who ordo gard mondo-ingest oeo taxslim goldterms sdgio kin biovoices omop comet cco occo iof upa go go-lego go-amigo neo bao orcid cpont biolink biopax enanomapper mlo ito cso obiws reactome-hs reactome-mm efo hcao hpinternational edam chr sweetAll lov schema-dot-org prov dtype vaem qudtunit quantitykind cellosaurus cosmo fhkb dbpendiaont uberoncm icd10cm co_324 ppeo interpro hgnc.genegroup hgnc sgd dictybase eccode uniprot rhea swisslipid drugbank drugcentral complexportal wikipathways drugmechdb rxnorm vccf ontobiotope nando ecso enigma_context ontie ecosim nmdc_schema mixs fibo bfo2020 bfo2020_core bfo2020_notime bfo2020_time
EXTRA_ONTOLOGIES = swo chiro pcl chemessence ogco ncit fma maxo foodon chebiplus msio pride modl phenio phenio_test comploinc bero aio reacto xsmo bcio icd10who ordo gard mondo-ingest oeo envthes wifire taxslim goldterms sdgio kin biovoices omop comet cco occo iof upa go go-lego go-amigo neo bao orcid cpont biolink biopax enanomapper mlo ito chemont molgenie cso obiws biopragmatics-reactome reactome-hs reactome-mm efo hcao hpinternational edam chr sweetAll oboe-core oboe-standards lov schema-dot-org prov dtype vaem qudtunit quantitykind cellosaurus cosmo fhkb dbpendiaont uberoncm icd10cm omim co_324 ppeo interpro hgnc.genegroup hgnc sgd dictybase eccode uniprot rhea swisslipid drugbank drugcentral complexportal wikipathways pathbank kegg.genome drugmechdb rxnorm vccf ontobiotope nando ecso enigma_context ontie ecosim nmdc_schema mixs kgcl fibo bfo2020 bfo2020_core bfo2020_notime bfo2020_time
61 changes: 61 additions & 0 deletions sparql/skos-to-owl.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX IAO: <http://purl.obolibrary.org/obo/IAO_>

# Transform broader to subClassOf
DELETE {
?concept skos:broader ?broaderConcept .
}
INSERT {
?concept rdf:type owl:Class .
?broaderConcept rdf:type owl:Class .
?concept rdfs:subClassOf ?broaderConcept .
}
WHERE {
?concept skos:broader ?broaderConcept .
};

# Transform prefLabel to rdfs:label
DELETE {
?concept skos:prefLabel ?label .
}
INSERT {
?concept rdfs:label ?label .
}
WHERE {
?concept skos:prefLabel ?label .
};

# Transform SKOS definition to IAO definition
DELETE {
?concept skos:definition ?definition .
}
INSERT {
?concept IAO:0000115 ?definition .
}
WHERE {
?concept skos:definition ?definition .
};


DELETE {
?concept rdf:type skos:Concept .
}
INSERT {
?concept rdf:type owl:Class .
}
WHERE {
?concept rdf:type skos:Concept .
};


DELETE {
?concept rdf:type owl:NamedIndividual .
}
WHERE {
?concept rdf:type owl:Class .
};


Loading