From 26bbfaecac44d8a338909d64668cbfbc58f7ddb4 Mon Sep 17 00:00:00 2001 From: Anita Caron Date: Fri, 16 Jun 2023 18:40:49 +0100 Subject: [PATCH] Add taxon disjoints to subset (#75) * add taxon disjoints to subset * update query * update subset pipeline * new pipeline for disjoint file in ncbitaxon * update readme to include disjoint file in ncbitaxon * Revert "update readme to include disjoint file in ncbitaxon" This reverts commit 9ef80745f2868faf461a10e457c84a4ce55e79d9. * Revert "new pipeline for disjoint file in ncbitaxon" This reverts commit b6c412a66babdae4ab612e17bcc7746a57c15f09. --------- Co-authored-by: Anita Caron --- subsets/Makefile | 5 ++++- subsets/add-taxon-disjoints.ru | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 subsets/add-taxon-disjoints.ru diff --git a/subsets/Makefile b/subsets/Makefile index 181d2ed..882b453 100644 --- a/subsets/Makefile +++ b/subsets/Makefile @@ -13,7 +13,10 @@ taxslim: taxon-subset-ids.txt robot convert -i taxslim.owl -f json -o taxslim.json taxslim-disjoint-over-in-taxon.owl: taxslim - owltools taxslim.owl --create-taxon-disjoint-over-in-taxon --root NCBITaxon:1 + owltools taxslim.owl --create-taxon-disjoint-over-in-taxon --root NCBITaxon:1 --output $@.tmp.owl + robot query --input taxslim.owl --format ttl --query add-taxon-disjoints.ru $@.tmp.ttl + robot merge --input $@.tmp.owl --input $@.tmp.ttl --output $@ + rm $@.tmp.owl && rm $@.tmp.ttl ## The following should not be run as part of CI job. ## Admin for this project should run and check in results. diff --git a/subsets/add-taxon-disjoints.ru b/subsets/add-taxon-disjoints.ru new file mode 100644 index 0000000..556286e --- /dev/null +++ b/subsets/add-taxon-disjoints.ru @@ -0,0 +1,22 @@ +PREFIX rdfs: +PREFIX rdf: +PREFIX owl: +PREFIX in_taxon: +CONSTRUCT { + [ + a owl:Restriction ; + owl:onProperty in_taxon: ; + owl:someValuesFrom ?subtaxon ; + owl:disjointWith [ + a owl:Restriction ; + owl:onProperty in_taxon: ; + owl:someValuesFrom [ + a owl:Class ; + owl:complementOf ?subtaxon + ] + ] + ] . +} +WHERE { + ?subtaxon rdf:type owl:Class . +}