Skip to content

Commit

Permalink
Add an example to get UniProt annotated diseases and omim
Browse files Browse the repository at this point in the history
  • Loading branch information
JervenBolleman committed May 24, 2024
1 parent 94a583d commit 53d770b
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions uniprot/genetic_disease_related_proteins.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
prefix ex: <https://sparql.uniprot.org/.well-known/sparql-examples/>
prefix up: <http://purl.uniprot.org/core/>
prefix sh: <http://www.w3.org/ns/shacl#>
prefix schema:<https://schema.org/>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix faldo:<http://biohackathon.org/resource/faldo#>
prefix rdfs:<http://www.w3.org/2000/01/rdf-schema#>

ex:genetic_disease_related_proteins
a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ;
sh:prefixes _:sparql_examples_prefixes ;
schema:target <https://sparql.uniprot.org/sparql/> ;
rdfs:comment """List all UniProt proteins annotated to be related to a genetic disease.""" ;
sh:select """SELECT
?uniprot ?disease ?diseaseComment ?mim
WHERE
{
GRAPH <http://sparql.uniprot.org/uniprot> {
?uniprot a up:Protein ;
up:annotation ?diseaseAnnotation .
?diseaseAnnotation up:disease ?disease .
}
GRAPH <http://sparql.uniprot.org/diseases> {
?disease a up:Disease ;
rdfs:comment ?diseaseComment .
OPTIONAL {
?disease rdfs:seeAlso ?mim .
?mim up:database <http://purl.uniprot.org/database/MIM> .
}
}
}""" .

0 comments on commit 53d770b

Please sign in to comment.