Skip to content

Commit

Permalink
Fixes #2725
Browse files Browse the repository at this point in the history
clm-cl.owl component edits
  • Loading branch information
Caroline-99 committed Nov 15, 2024
1 parent c8fade3 commit 45fe6a3
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 35 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/qc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,7 @@ jobs:
- uses: actions/checkout@v3

- name: Run ontology QC checks
id: check
continue-on-error: true
env:
DEFAULT_BRANCH: master
run: cd src/ontology && make ROBOT_ENV='ROBOT_JAVA_ARGS=-Xmx6G' test IMP=false PAT=false MIR=false

- name: Reason over taxon constraints
id: explaintc
continue-on-error: true
if: steps.check.outcome == 'failure'
run: |
if [ -s src/ontology/reports/taxon-constraint-check.txt ]; then
robot explain -i src/ontology/tmp/cl-plus-taxon-disjoints.ofn -M unsatisfiability -u all -r ELK -e taxon-unsats.md
echo "<details>\n<summary>This PR violates some taxon constraints. Here is what the reasoner has to say:</summary>\n" > comments.md
cat taxon-unsats.md >> comment.md
echo "</details>" >> comment.md
exit 1
fi
- name: Post explanation for taxon constraint violations
if: steps.explaintc.outcome == 'failure'
uses: NejcZdovc/comment-pr@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
file: "../../comment.md"
identifier: "TAXON_CONSTRAINTS_REASONING"

# If the check failed, then the entire job should fail, even if we
# allowed it to continue so that we could post the message with
# the explanations.
- name: Fail on error
if: steps.check.outcome == 'failure'
run: exit 1

2 changes: 2 additions & 0 deletions docs/odk-workflows/RepositoryFileStructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ These are the current imports in CL
| ro | http://purl.obolibrary.org/obo/ro.owl | None |
| pato | http://purl.obolibrary.org/obo/pato.owl | None |
| ncbitaxon | http://purl.obolibrary.org/obo/ncbitaxon/subsets/taxslim.owl | None |
| ncbitaxondisjoints | http://purl.obolibrary.org/obo/ncbitaxon/subsets/taxslim-disjoint-over-in-taxon.owl | None |
| omo | http://purl.obolibrary.org/obo/omo.owl | mirror |

## Components
Expand All @@ -42,3 +43,4 @@ These are the components in CL
| general_cell_types_upper_slim.owl | None |
| kidney_upper_slim.owl | None |
| cellxgene_subset.owl | None |
| clm-cl.owl | None |
9 changes: 5 additions & 4 deletions src/ontology/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ----------------------------------------
# Makefile for cl
# Generated using ontology-development-kit
# ODK Version: v1.5.3
# ODK Version: v1.5.2
# ----------------------------------------
# IMPORTANT: DO NOT EDIT THIS FILE. To override default make goals, use cl.Makefile instead

Expand All @@ -10,7 +10,7 @@
# More information: https://github.com/INCATools/ontology-development-kit/

# Fingerprint of the configuration file when this Makefile was last generated
CONFIG_HASH= 54146b660b46ab72c0abd98ae67a46d194ff618c90da889ded7ed1b99fd74ae2
CONFIG_HASH= 24177bc2f4b321bf573ab9044ad6a53705855a9bca8bf93a02bb653ac04136b5


# ----------------------------------------
Expand Down Expand Up @@ -46,14 +46,14 @@ REPORT_PROFILE_OPTS =
OBO_FORMAT_OPTIONS =
SPARQL_VALIDATION_CHECKS = equivalent-classes owldef-self-reference nolabels pmid-not-dbxref obsolete-replaced_by obsolete-alt-id orcid-contributor illegal-annotation-property label-synonym-polysemy illegal-date def-not-only-xref
SPARQL_EXPORTS = cl_terms cl-edges cl-synonyms cl-xrefs cl-def-xrefs
ODK_VERSION_MAKEFILE = v1.5.3
ODK_VERSION_MAKEFILE = v1.5.2

TODAY ?= $(shell date +%Y-%m-%d)
OBODATE ?= $(shell date +'%d:%m:%Y %H:%M')
VERSION= $(TODAY)
ANNOTATE_ONTOLOGY_VERSION = annotate -V $(ONTBASE)/releases/$(VERSION)/$@ --annotation owl:versionInfo $(VERSION)
ANNOTATE_CONVERT_FILE = annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) convert -f ofn --output $@.tmp.owl && mv $@.tmp.owl $@
OTHER_SRC = $(PATTERNDIR)/definitions.owl $(COMPONENTSDIR)/hra_subset.owl $(COMPONENTSDIR)/mappings.owl $(COMPONENTSDIR)/blood_and_immune_upper_slim.owl $(COMPONENTSDIR)/eye_upper_slim.owl $(COMPONENTSDIR)/general_cell_types_upper_slim.owl $(COMPONENTSDIR)/kidney_upper_slim.owl $(COMPONENTSDIR)/cellxgene_subset.owl
OTHER_SRC = $(PATTERNDIR)/definitions.owl $(COMPONENTSDIR)/hra_subset.owl $(COMPONENTSDIR)/mappings.owl $(COMPONENTSDIR)/blood_and_immune_upper_slim.owl $(COMPONENTSDIR)/eye_upper_slim.owl $(COMPONENTSDIR)/general_cell_types_upper_slim.owl $(COMPONENTSDIR)/kidney_upper_slim.owl $(COMPONENTSDIR)/cellxgene_subset.owl $(COMPONENTSDIR)/clm-cl.owl
ONTOLOGYTERMS = $(TMPDIR)/ontologyterms.txt
EDIT_PREPROCESSED = $(TMPDIR)/$(ONT)-preprocess.owl
PATTERNDIR= ../patterns
Expand Down Expand Up @@ -510,6 +510,7 @@ $(COMPONENTSDIR)/cellxgene_subset.owl: $(TEMPLATEDIR)/cellxgene_subset.tsv
$(ANNOTATE_CONVERT_FILE); fi

.PRECIOUS: $(COMPONENTSDIR)/cellxgene_subset.owl

# ----------------------------------------
# Mirroring upstream ontologies
# ----------------------------------------
Expand Down
1 change: 1 addition & 0 deletions src/ontology/catalog-v001.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<uri id="User Entered Import Resolution" name="http://ontology.neuinfo.org/NIF/BiomaterialEntities/NIF-Cell.owl" uri="mirror/NIF-Cell.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/cl/patterns/definitions.owl" uri="../patterns/definitions.owl"/>
<uri name="http://purl.obolibrary.org/obo/cl/components/hra_subset.owl" uri="components/hra_subset.owl"/>
<uri name="http://purl.obolibrary.org/obo/cl/components/clm-cl.owl" uri="components/clm-cl.owl"/>
<uri name="http://purl.obolibrary.org/obo/cl/components/mappings.owl" uri="components/mappings.owl"/>
<uri name="http://purl.obolibrary.org/obo/cl/components/blood_and_immune_upper_slim.owl" uri="components/blood_and_immune_upper_slim.owl"/>
<uri name="http://purl.obolibrary.org/obo/cl/components/eye_upper_slim.owl" uri="components/eye_upper_slim.owl"/>
Expand Down
2 changes: 2 additions & 0 deletions src/ontology/cl-edit.owl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Import(<http://purl.obolibrary.org/obo/cl/components/kidney_upper_slim.owl>)
Import(<http://purl.obolibrary.org/obo/cl/components/mappings.owl>)
Import(<http://purl.obolibrary.org/obo/cl/imports/merged_import.owl>)
Import(<http://purl.obolibrary.org/obo/cl/patterns/definitions.owl>)
Import(<http://purl.obolibrary.org/obo/cl/components/clm-cl.owl>)

Annotation(obo:IAO_0000700 obo:CL_0000000)
Annotation(dc:description "An ontology of cell types.")
Annotation(dc:title "Cell Ontology")
Expand Down
1 change: 1 addition & 0 deletions src/ontology/cl-odk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,5 @@ components:
use_template: True
templates:
- cellxgene_subset.tsv
- filename: clm-cl.owl

8 changes: 8 additions & 0 deletions src/ontology/cl.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,14 @@ CELLXGENE_SUBSET_URL="https://raw.githubusercontent.com/hkir-dev/cellxgene-cell-
$(TEMPLATEDIR)/cellxgene_subset.tsv:
wget $(CELLXGENE_SUBSET_URL) -O $@

# CellMark reference subset
CLM_CL_URL="https://raw.githubusercontent.com/Cellular-Semantics/CellMark/main/clm-cl.owl"
$(TMPDIR)/clm-cl.owl:
wget $(CLM_CL_URL) -O $@

$(COMPONENTSDIR)/clm-cl.owl: $(TMPDIR)/clm-cl.owl
$(ROBOT) merge -i $< annotate --ontology-iri $(ONTBASE)/$@ --output $@


# ----------------------------------------
# RELEASE DEPLOYMENT
Expand Down
14 changes: 14 additions & 0 deletions src/ontology/components/clm-cl.owl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<rdf:RDF
xml:base="http://purl.obolibrary.org/obo/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:oboInOwl="http://www.geneontology.org/formats/oboInOwl#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:obo="http://purl.obolibrary.org/obo/">
<owl:Ontology rdf:about="http://purl.obolibrary.org/obo/cl/components/clm-cl.owl"/>

<!-- This is a placeholder, it will be regenerated when makefile is first executed -->
</rdf:RDF>
2 changes: 1 addition & 1 deletion src/sparql/class-count-by-prefix.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ SELECT ?prefix (COUNT(DISTINCT ?cls) AS ?numberOfClasses) WHERE
FILTER (!isBlank(?cls))
BIND( STRBEFORE(STRAFTER(str(?cls),"http://purl.obolibrary.org/obo/"), "_") AS ?prefix)
}
GROUP BY ?prefix
GROUP BY ?prefix

0 comments on commit 45fe6a3

Please sign in to comment.