Skip to content

Commit 726f5c0

Browse files
authored
add check for omim gene entries used as xrefs (#8020)
1 parent 01e178c commit 726f5c0

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

src/ontology/mondo.Makefile

+22
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,28 @@ mappings_fast:
600600
$(MAKE) clean_mappings -B
601601
$(MAKE) mappings IMP=false MIR=false PAT=false -B
602602

603+
###### OMIM Genes #########
604+
605+
tmp/omim.owl:
606+
$(ROBOT) merge -I "https://github.com/monarch-initiative/omim/releases/latest/download/omim.owl" convert -o $@
607+
608+
tmp/omim-genes.tsv: tmp/omim.owl
609+
$(ROBOT) query --use-graphs true -i tmp/omim.owl -f tsv --tdb true --query $(SPARQLDIR)/reports/omim-genes.sparql $@
610+
sed -i 's/[?]//g' $@
611+
sed -i 's/[<]https[:][/][/]omim[.]org[/]entry[/]/OMIM:/g' $@
612+
sed -i 's/>//g' $@
613+
tail -n +2 $@ > output_file && mv output_file $@
614+
615+
# Check for occurrences of OMIM genes in MONDO,
616+
# Then narrow down to only xrefs
617+
tmp/omim-gene-matches.txt: tmp/omim-genes.tsv
618+
grep -Ff $< mondo-edit.obo | grep '^xref' > $@ || true
619+
if [ -s $@ ]; then \
620+
echo "FAIL: OMIM gene entry used in xref (matches found in $@)"; \
621+
exit 1; \
622+
fi
623+
624+
test: tmp/omim-gene-matches.txt
603625

604626
##### RELEASE Report ######
605627

src/sparql/reports/omim-genes.sparql

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
2+
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
3+
SELECT DISTINCT ?gene WHERE {
4+
?gene rdfs:subClassOf+ <http://purl.obolibrary.org/obo/SO_0000704> .
5+
}

0 commit comments

Comments
 (0)