Skip to content

Commit

Permalink
Fix ORCID individuals import (#3257)
Browse files Browse the repository at this point in the history
* extract orcids to import

* create rule for orcidio_import.owl

* import orcidio in uberon-edit

* change recipe to use filter

* make orcidio import custom in odk

---------

Co-authored-by: Anita Caron <[email protected]>
  • Loading branch information
Anita Caron and anitacaron authored Apr 18, 2024
1 parent 911720b commit 4f36ec2
Show file tree
Hide file tree
Showing 11 changed files with 4,504 additions and 618 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,4 @@ src/ontology/subsets/*.obo
src/ontology/subsets/*.owl
src/ontology/subsets/*.tsv
src/ontology/imports/*_import.owl
!src/ontology/imports/orcidio_import.owl
2 changes: 0 additions & 2 deletions docs/odk-workflows/ManageDocumentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,3 @@ The documentation is _not_ automatically updated from the Markdown, and needs to
3. Just to double check, you can now navigate to your documentation pages (usually https://obophenotype.github.io/uberon/).
Just make sure you give GitHub 2-5 minutes to build the pages!



2 changes: 1 addition & 1 deletion docs/odk-workflows/RepositoryFileStructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ These are the current imports in UBERON
| 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 |
| nbo | http://purl.obolibrary.org/obo/nbo.owl | None |
| orcidio | https://w3id.org/orcidio/orcidio.owl | None |
| orcidio | https://w3id.org/orcidio/orcidio.owl | custom |
| omo | http://purl.obolibrary.org/obo/omo.owl | mirror |

## Components
Expand Down
6 changes: 5 additions & 1 deletion src/ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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= 16a64e727250fbc31f79a269800d3885cc70b4db1e6b69119f66415f340619fa
CONFIG_HASH= d9dd1f14c02c9157faa08c0c33d811609f31616c2917255ed4dca5559cb438ec


# ----------------------------------------
Expand Down Expand Up @@ -408,6 +408,10 @@ $(IMPORTDIR)/%_import.owl: $(MIRRORDIR)/merged.owl $(IMPORTDIR)/%_terms_combined

.PRECIOUS: $(IMPORTDIR)/%_import.owl

## Module for ontology: orcidio

$(IMPORTDIR)/orcidio_import.owl: $(MIRRORDIR)/merged.owl
echo "ERROR: You have configured your default module type to be custom; this behavior needs to be overwritten in uberon.Makefile!" && false
## Module for ontology: omo

$(IMPORTDIR)/omo_import.owl: $(MIRRORDIR)/merged.owl $(IMPORTDIR)/omo_terms_combined.txt
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 @@ -51,6 +51,7 @@
<uri name="http://purl.obolibrary.org/obo/uberon/components/mappings.owl" uri="components/mappings.owl"/>
<uri name="http://purl.obolibrary.org/obo/uberon/components/vasculature_class.owl" uri="components/vasculature_class.owl"/>
<uri name="http://purl.obolibrary.org/obo/uberon/imports/merged_import.owl" uri="imports/merged_import.owl"/>
<uri name="http://purl.obolibrary.org/obo/uberon/imports/orcidio_import.owl" uri="imports/orcidio_import.owl"/>
<uri name="http://purl.obolibrary.org/obo/uberon/patterns/definitions.owl" uri="../patterns/definitions.owl"/>
<uri name="http://purl.obolibrary.org/obo/wbbt.owl" uri="imports/local-wbbt.owl"/>
<uri name="http://purl.obolibrary.org/obo/wbls.owl" uri="imports/local-wbls.owl"/>
Expand Down
4,720 changes: 4,106 additions & 614 deletions src/ontology/imports/merged_import.owl

Large diffs are not rendered by default.

367 changes: 367 additions & 0 deletions src/ontology/imports/orcidio_import.owl

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/ontology/uberon-edit.obo
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import: http://purl.obolibrary.org/obo/uberon/components/in-subset.owl
import: http://purl.obolibrary.org/obo/uberon/components/mappings.owl
import: http://purl.obolibrary.org/obo/uberon/components/vasculature_class.owl
import: http://purl.obolibrary.org/obo/uberon/imports/merged_import.owl
import: http://purl.obolibrary.org/obo/uberon/imports/orcidio_import.owl
import: http://purl.obolibrary.org/obo/uberon/patterns/definitions.owl
ontology: uberon/core
property_value: dc-contributor https://github.com/orgs/pato-ontology/teams/pato-community
Expand Down
1 change: 1 addition & 0 deletions src/ontology/uberon-odk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ import_group:
mirror_from: https://w3id.org/orcidio/orcidio.owl
base_iris:
- https://orcid.org/
module_type: custom
- id: omo
module_type: mirror
subset_group:
Expand Down
14 changes: 14 additions & 0 deletions src/ontology/uberon.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,20 @@ all_local_imports:

endif

# ----------------------------------------
# EXTRACT ORCIDs INDIVIDUALS
# ----------------------------------------

# Extract ORCID from dcterms:contributor annotations
$(IMPORTDIR)/orcidio_terms_combined.txt: $(SRC)
$(ROBOT) query -f csv -i $< --query ../sparql/orcids.sparql $@.tmp &&\
cat $@.tmp | sort | uniq > $@

# Create orcidio_import.owl to extract individuals excluded in the merged_import.owl
$(IMPORTDIR)/orcidio_import.owl: $(MIRRORDIR)/orcidio.owl $(IMPORTDIR)/orcidio_terms_combined.txt
if [ $(IMP) = true ]; then $(ROBOT) filter -i $< -T $(IMPORTDIR)/orcidio_terms_combined.txt --trim false \
$(ANNOTATE_CONVERT_FILE); fi


# ----------------------------------------
# UNRELEASED PRODUCTS
Expand Down
7 changes: 7 additions & 0 deletions src/sparql/orcids.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix owl: <http://www.w3.org/2002/07/owl#>
SELECT DISTINCT ?orcid
WHERE {
?term <http://purl.org/dc/terms/contributor> ?orcid .
FILTER(isIRI(?term))
}

0 comments on commit 4f36ec2

Please sign in to comment.