Skip to content

Commit

Permalink
Merge pull request #42 from obophenotype/ODK-release-April-11-2023
Browse files Browse the repository at this point in the history
ODK release (and repo update) April 11 2023
  • Loading branch information
chris-grove authored Apr 11, 2023
2 parents d451202 + 42f5ea2 commit 5386b5e
Show file tree
Hide file tree
Showing 26 changed files with 158,237 additions and 204,361 deletions.
148 changes: 104 additions & 44 deletions src/ontology/Makefile

Large diffs are not rendered by default.

5,740 changes: 1,703 additions & 4,037 deletions src/ontology/imports/ro_import.owl

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions src/ontology/non_native_classes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@ http://purl.obolibrary.org/obo/BFO_0000023
http://purl.obolibrary.org/obo/BFO_0000034
http://purl.obolibrary.org/obo/BFO_0000040
http://purl.obolibrary.org/obo/CARO_0000000
http://purl.obolibrary.org/obo/CARO_0030000
http://purl.obolibrary.org/obo/GO_0003674
http://purl.obolibrary.org/obo/GO_0003824
http://purl.obolibrary.org/obo/GO_0008150
http://purl.obolibrary.org/obo/GO_0016301
http://purl.obolibrary.org/obo/GO_0016740
http://purl.obolibrary.org/obo/GO_0016772
http://purl.obolibrary.org/obo/PATO_0000001
term
51 changes: 48 additions & 3 deletions src/ontology/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,36 @@
# The assumption is that you are working in the src/ontology folder;
# we therefore map the whole repo (../..) to a docker volume.
#
# To use singularity instead of docker, please issue
# export USE_SINGULARITY=<any-value>
# before running this script.
#
# See README-editors.md for more details.

IMAGE=${IMAGE:-odkfull}
ODK_JAVA_OPTS=-Xmx8G
if [ -f run.sh.conf ]; then
. ./run.sh.conf
fi

# Look for a GitHub token
if [ -n "$GH_TOKEN" ]; then
:
elif [ -f ../../.github/token.txt ]; then
GH_TOKEN=$(cat ../../.github/token.txt)
elif [ -f $XDG_CONFIG_HOME/ontology-development-kit/github/token ]; then
GH_TOKEN=$(cat $XDG_CONFIG_HOME/ontology-development-kit/github/token)
elif [ -f "$HOME/Library/Application Support/ontology-development-kit/github/token" ]; then
GH_TOKEN=$(cat "$HOME/Library/Application Support/ontology-development-kit/github/token")
fi

ODK_IMAGE=${ODK_IMAGE:-odkfull}
TAG_IN_IMAGE=$(echo $ODK_IMAGE | awk -F':' '{ print $2 }')
if [ -n "$TAG_IN_IMAGE" ]; then
# Override ODK_TAG env var if IMAGE already includes a tag
ODK_TAG=$TAG_IN_IMAGE
ODK_IMAGE=$(echo $ODK_IMAGE | awk -F':' '{ print $1 }')
fi
ODK_TAG=${ODK_TAG:-latest}
ODK_JAVA_OPTS=${ODK_JAVA_OPTS:--Xmx8G}
ODK_DEBUG=${ODK_DEBUG:-no}

TIMECMD=
Expand All @@ -23,7 +49,26 @@ if [ x$ODK_DEBUG = xyes ]; then
TIMECMD="/usr/bin/time -f ### DEBUG STATS ###\nElapsed time: %E\nPeak memory: %M kb"
fi

docker run -v $PWD/../../:/work -w /work/src/ontology -e ROBOT_JAVA_ARGS="$ODK_JAVA_OPTS" -e JAVA_OPTS="$ODK_JAVA_OPTS" --rm -ti obolibrary/$IMAGE $TIMECMD "$@"
VOLUME_BIND=$PWD/../../:/work
WORK_DIR=/work/src/ontology

if [ -n "$ODK_BINDS" ]; then
VOLUME_BIND="$VOLUME_BIND,$ODK_BINDS"
fi

if [ -n "$USE_SINGULARITY" ]; then

singularity exec --cleanenv $ODK_SINGULARITY_OPTIONS \
--env "ROBOT_JAVA_ARGS=$ODK_JAVA_OPTS,JAVA_OPTS=$ODK_JAVA_OPTS" \
--bind $VOLUME_BIND \
-W $WORK_DIR \
docker://obolibrary/$ODK_IMAGE:$ODK_TAG $TIMECMD "$@"
else
BIND_OPTIONS="-v $(echo $VOLUME_BIND | sed 's/,/ -v /')"
docker run $ODK_DOCKER_OPTIONS $BIND_OPTIONS -w $WORK_DIR \
-e ROBOT_JAVA_ARGS="$ODK_JAVA_OPTS" -e JAVA_OPTS="$ODK_JAVA_OPTS" \
--rm -ti obolibrary/$ODK_IMAGE:$ODK_TAG $TIMECMD "$@"
fi

case "$@" in
*update_repo*|*release*)
Expand Down
1 change: 0 additions & 1 deletion src/sparql/edges.sparql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
prefix obo: <http://purl.obolibrary.org/obo/>
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
Expand Down
2 changes: 1 addition & 1 deletion src/sparql/inject-subset-declaration.ru
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ INSERT { ?y rdfs:subPropertyOf <http://www.geneontology.org/formats/oboInOwl#Sub
WHERE {
?x <http://www.geneontology.org/formats/oboInOwl#inSubset> ?y .
FILTER(isIRI(?y))
FILTER(regex(str(?y),"^(http://purl.obolibrary.org/obo/)") || regex(str(?y),"^(http://www.ebi.ac.uk/efo/)") || regex(str(?y),"^(https://w3id.org/biolink/)"))
FILTER(regex(str(?y),"^(http://purl.obolibrary.org/obo/)") || regex(str(?y),"^(http://www.ebi.ac.uk/efo/)") || regex(str(?y),"^(https://w3id.org/biolink/)") || regex(str(?y),"^(http://purl.obolibrary.org/obo)"))
}
2 changes: 1 addition & 1 deletion src/sparql/inject-synonymtype-declaration.ru
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ INSERT { ?y rdfs:subPropertyOf <http://www.geneontology.org/formats/oboInOwl#Syn
WHERE {
?x <http://www.geneontology.org/formats/oboInOwl#hasSynonymType> ?y .
FILTER(isIRI(?y))
FILTER(regex(str(?y),"^(http://purl.obolibrary.org/obo/)") || regex(str(?y),"^(http://www.ebi.ac.uk/efo/)") || regex(str(?y),"^(https://w3id.org/biolink/)"))
FILTER(regex(str(?y),"^(http://purl.obolibrary.org/obo/)") || regex(str(?y),"^(http://www.ebi.ac.uk/efo/)") || regex(str(?y),"^(https://w3id.org/biolink/)") || regex(str(?y),"^(http://purl.obolibrary.org/obo)"))
}
2 changes: 1 addition & 1 deletion src/sparql/iri-range-violation.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ WHERE {
oboInOwl:inSubset
dcterms:contributor }
?term ?property ?value .
FILTER(isIRI(?term) && (STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/WBLS_") || STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/WBls_")))
FILTER(isIRI(?term) && (STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/WBls_")))
FILTER (!isIRI(?value))
}

2 changes: 1 addition & 1 deletion src/sparql/label-with-iri-violation.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ SELECT ?term ?value
WHERE {
?term rdfs:label ?value .
FILTER (REGEX(?value, "http[s]?[:]"))
FILTER(isIRI(?term) && (STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/WBLS_") || STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/WBls_")))
FILTER(isIRI(?term) && (STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/WBls_")))
}

12 changes: 12 additions & 0 deletions src/sparql/multiple-replaced_by-violation.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
PREFIX replaced_by: <http://purl.obolibrary.org/obo/IAO_0100001>

SELECT DISTINCT ?entity ?property ?value WHERE {
VALUES ?property {
replaced_by:
}
?entity ?property ?value1 .
?entity ?property ?value2 .
FILTER(?value1!=?value2)
BIND(CONCAT(str(?value1), CONCAT("|", str(?value2))) as ?value)
}

2 changes: 1 addition & 1 deletion src/sparql/owldef-self-reference-violation.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ SELECT ?term WHERE {
{ ?term owl:equivalentClass [ owl:intersectionOf [ rdf:rest*/rdf:first ?term ] ] }
UNION
{ ?term owl:equivalentClass [ owl:intersectionOf [ rdf:rest*/rdf:first [ owl:someValuesFrom ?term ] ] ] }
FILTER(isIRI(?term) && (STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/WBLS_") || STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/WBls_")))
FILTER(isIRI(?term) && (STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/WBls_")))
}

1 change: 0 additions & 1 deletion src/sparql/simple-seed.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix obo: <http://purl.obolibrary.org/obo/>

SELECT DISTINCT ?cls WHERE
{
Expand Down
1 change: 0 additions & 1 deletion src/sparql/subsets-labeled.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
prefix oio: <http://www.geneontology.org/formats/oboInOwl#>
prefix def: <http://purl.obolibrary.org/obo/IAO_0000115>
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix inSubset: <http://www.geneontology.org/formats/oboInOwl#inSubset>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
Expand Down
2 changes: 1 addition & 1 deletion src/sparql/wbls_terms.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ WHERE {
{ ?s1 ?p1 ?term . }
UNION
{ ?term ?p2 ?o2 . }
FILTER(isIRI(?term) && (STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/WBLS_") || STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/WBls_")))
FILTER(isIRI(?term) && (STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/WBls_")))
}
Loading

0 comments on commit 5386b5e

Please sign in to comment.