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

Add taxon disjoints to subset #75

Merged
merged 7 commits into from
Jun 16, 2023
Merged
Show file tree
Hide file tree
Changes from 5 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
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: all
all: ncbitaxon.owl ncbitaxon.obo ncbitaxon.json ncbi_diff_latest_current_obo.txt
all: ncbitaxon.owl.gz ncbitaxon.obo.gz ncbitaxon.json.gz
all: ncbitaxon.owl ncbitaxon.obo ncbitaxon.json ncbi_diff_latest_current_obo.txt ncbitaxon-disjoint-over-in-taxon.owl
all: ncbitaxon.owl.gz ncbitaxon.obo.gz ncbitaxon.json.gz ncbitaxon-disjoint-over-in-taxon.owl.gz

ROBOT=robot

Expand Down Expand Up @@ -76,3 +76,9 @@ build/ncbitaxon.owl: ncbitaxon.ttl

.PHONY: test
test: build/Nov2019/ncbitaxon.diff build/Nov2019/ncbitaxon_robot.diff

ncbitaxon-disjoint-over-in-taxon.owl: ncbitaxon.owl
OWLTOOLS_MEMORY=16G owltools $< --create-taxon-disjoint-over-in-taxon --root NCBITaxon:1 --output [email protected]
robot query --input $< --format ttl --query add-taxon-disjoints.ru [email protected]
robot merge --input [email protected] --input [email protected] --output $@
rm [email protected] && rm [email protected]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ If you specifically wish to cite the OBO/OWL translation, use the URL for this p
3. `make all -B`
4. `cd ..`
2. gh release create v2021-06-10
3. gh release upload v2021-06-10 ncbitaxon.json ncbitaxon.json.gz ncbitaxon.obo ncbitaxon.obo.gz ncbitaxon.owl ncbitaxon.owl.gz subsets/taxslim-disjoint-over-in-taxon.owl subsets/taxslim.obo subsets/taxslim.owl subsets/taxslim.json
3. gh release upload v2021-06-10 ncbitaxon.json ncbitaxon.json.gz ncbitaxon.obo ncbitaxon.obo.gz ncbitaxon.owl ncbitaxon.owl.gz subsets/taxslim-disjoint-over-in-taxon.owl subsets/taxslim.obo subsets/taxslim.owl subsets/taxslim.json ncbitaxon-disjoint-over-in-taxon.owl ncbitaxon-disjoint-over-in-taxon.owl.gz

### Using Monarch Jenkins

Expand Down
5 changes: 4 additions & 1 deletion subsets/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]
robot query --input taxslim.owl --format ttl --query add-taxon-disjoints.ru [email protected]
robot merge --input [email protected] --input [email protected] --output $@
rm [email protected] && rm [email protected]

## The following should not be run as part of CI job.
## Admin for this project should run and check in results.
Expand Down
22 changes: 22 additions & 0 deletions subsets/add-taxon-disjoints.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX in_taxon: <http://purl.obolibrary.org/obo/RO_0002162>
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 .
}