SPARQL example query
51: Find all proteins linked to arachidonate (CHEBI:32395)
PREFIX CHEBI: <http://purl.obolibrary.org/obo/CHEBI_>
PREFIX rh: <http://rdf.rhea-db.org/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
DISTINCT
?uniprot
?uniprotID
?recname
?gene
?chebi
?uniprotName
WHERE {
SERVICE <https://sparql.rhea-db.org/sparql> {
VALUES (?chebi) { (CHEBI:32395) }
?rhea rh:side/rh:contains/rh:compound ?compound .
?compound rh:chebi ?chebi .
?chebi up:name ?uniprotName .
}
?uniprot up:annotation/up:catalyticActivity/up:catalyzedReaction ?rhea .
?uniprot up:mnemonic ?uniprotID .
?uniprot up:recommendedName/up:fullName ?recname .
OPTIONAL {?uniprot up:encodedBy/skos:prefLabel ?gene .}
}
52: Retrieve drugs that target human enzymes involved in sterol metabolism (federated query with Rhea and ChEMBL via IDSM/Elixir czech republic).
xxxxxxxxxx
PREFIX CHEBI: <http://purl.obolibrary.org/obo/CHEBI_>
PREFIX cco: <http://rdf.ebi.ac.uk/terms/chembl#>
PREFIX chebihash: <http://purl.obolibrary.org/obo/chebi#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rh: <http://rdf.rhea-db.org/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
DISTINCT
?protein
?proteinFullName
?activityType
?standardActivityValue
?standardActivityUnit
?chemblMolecule
?chemlbMoleculePrefLabel
WHERE
{
# ChEBI: retrieve members of the ChEBI class ChEBI:15889 (sterol)
# Rhea: retrieve the reactions involving these ChEBI as participants
SERVICE <https://sparql.rhea-db.org/sparql> {
?reaction rdfs:subClassOf rh:Reaction ;
rh:status rh:Approved ;
rh:side ?reactionSide .
?reactionSide
rh:contains ?participant .
?participant rh:compound ?compound
{
?compound rh:chebi ?chebi .
?chebi (rdfs:subClassOf)+ CHEBI:15889
} UNION {
?compound rh:chebi ?chebi .
?chebi2 rdfs:subClassOf ?chebiRestriction .
?chebiRestriction
a owl:Restriction ;
owl:onProperty chebihash:has_major_microspecies_at_pH_7_3 ;
owl:someValuesFrom ?chebi .
?chebi2 (rdfs:subClassOf)+ CHEBI:15889
}
}
# UniProt: retrieve the human (taxid:9606) enzymes catalyzing these Rhea reactions
?ca up:catalyzedReaction ?reaction .
?a up:catalyticActivity ?ca .
?protein up:annotation ?a ;
up:organism taxon:9606 ;
up:recommendedName ?proteinRecName .
?proteinRecName
up:fullName ?proteinFullName .
# Find drugs in wikidata that interact with the UniProt Proteins
# ChEMBL: retrieve the corresponding targets and with drugs in clinical phase 4
# Via https://idsm.elixir-czech.cz/sparql/
SERVICE <https://idsm.elixir-czech.cz/sparql/endpoint/idsm> {
?activity a cco:Activity ;
cco:hasMolecule ?chemblMolecule ;
cco:hasAssay ?assay ;
cco:standardType ?activityType ;
cco:standardValue ?standardActivityValue ;
cco:standardUnits ?standardActivityUnit .
?chemblMolecule cco:highestDevelopmentPhase ?highestDevelopmentPhase ;
rdfs:label ?chemblMoleculeLabel ;
skos:prefLabel ?chemlbMoleculePrefLabel .
FILTER (?highestDevelopmentPhase > 3)
?assay cco:hasTarget ?target .
?target cco:hasTargetComponent/cco:targetCmptXref ?protein .
?protein a cco:UniprotRef .
}
}
53: Find mouse homologs in OMABrowser of human enzymes that catalyze reactions involving sterols (CHEBI:15889). Federating with Rhea and OMABrowser.
xxxxxxxxxx
PREFIX CHEBI: <http://purl.obolibrary.org/obo/CHEBI_>
PREFIX lscr: <http://purl.org/lscr#>
PREFIX orth: <http://purl.org/net/orth#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rh: <http://rdf.rhea-db.org/>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
DISTINCT
?chebi
?reaction
?humanProtein
?mouseProtein
?cluster
WHERE {
SERVICE <https://sparql.rhea-db.org/sparql> {
?reaction rdfs:subClassOf rh:Reaction .
?reaction rh:side/rh:contains/rh:compound ?compound .
?compound rh:chebi ?chebi .
?chebi rdfs:subClassOf* CHEBI:15889
}
?humanProtein up:organism taxon:9606 .
?humanProtein up:annotation ?a .
?a a up:Catalytic_Activity_Annotation .
?a up:catalyticActivity ?ca .
?ca up:catalyzedReaction ?reaction .
SERVICE <https://sparql.omabrowser.org/sparql> {
?cluster a orth:ParalogsCluster .
?cluster orth:hasHomologousMember ?node1 , ?node2 .
?node1 orth:hasHomologousMember* ?orthoProtein1 .
?node2 orth:hasHomologousMember* ?orthoProtein2 .
?orthoProtein1 lscr:xrefUniprot ?mouseProtein .
?orthoProtein2 lscr:xrefUniprot ?humanProtein .
# inTaxon mouse
?orthoProtein1 orth:organism/<http://purl.obolibrary.org/obo/RO_0002162> taxon:10090 .
}
}
54: Proteins with binding sites for ligands similar to heme
xxxxxxxxxx
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sachem: <http://bioinfo.uochb.cas.cz/rdf/v1.0/sachem#>
PREFIX up: <http://purl.uniprot.org/core/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT
?protein
?mnemonic
?proteinName
?ligandSimilarityScore
?ligand
WHERE {
SERVICE <https://idsm.elixir-czech.cz/sparql/endpoint/chebi> {
?ssc sachem:compound ?ligand;
sachem:score ?ligandSimilarityScore ;
sachem:similaritySearch ?sss .
# Smiles of Heme
?sss sachem:query "CC1=C(CCC([O-])=O)C2=[N+]3C1=Cc1c(C)c(C=C)c4C=C5C(C)=C(C=C)C6=[N+]5[Fe-]3(n14)n1c(=C6)c(C)c(CCC([O-])=O)c1=C2";
sachem:cutoff "8e-1"^^xsd:double ;
sachem:aromaticityMode sachem:aromaticityDetect ;
sachem:similarityRadius 1 ;
sachem:tautomerMode sachem:ignoreTautomers .
}
?protein up:mnemonic ?mnemonic ;
up:recommendedName/up:fullName ?proteinName ;
up:annotation ?annotation .
?annotation a up:Binding_Site_Annotation ;
up:ligand/rdfs:subClassOf ?ligand .
}
ORDER BY DESC(?ligandSimilarityScore)
55: Number of proteins with binding sites for metals or metal sulfur clusters (and experimental evidence for the binding)
xxxxxxxxxx
PREFIX CHEBI: <http://purl.obolibrary.org/obo/CHEBI_>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
?ligand
?ligandName
(COUNT(DISTINCT ?protein) as ?entries)
WHERE {
?protein up:annotation ?annotation .
VALUES ?evs { obo:ECO_0000269 obo:ECO_0007744 } .
VALUES ?chebids { CHEBI:25213 CHEBI:25214 } .
?st rdf:subject ?protein ;
rdf:predicate up:annotation ;
rdf:object ?annotation ;
up:attribution/up:evidence ?evs .
?annotation up:ligand/rdfs:subClassOf ?ligand .
?ligand rdfs:subClassOf+ ?chebids ;
rdfs:label ?ligandName .
}
GROUP BY ?ligand ?ligandName
ORDER BY DESC(?entries)
56: Select enzymes that have ligands known to have an allosteric effect
xxxxxxxxxx
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
?protein
?ligandName
?ligandNote
?chebi
WHERE {
?protein up:annotation ?annotation .
?annotation a up:Binding_Site_Annotation .
?annotation up:ligand ?ligand .
?ligand rdfs:comment ?ligandNote ;
rdfs:subClassOf ?chebi ;
rdfs:label ?ligandName .
FILTER(REGEX(?ligandNote, "allosteric", "i"))
}
57: Map a selection of PDB identifiers plus chains to UniProtKB
xxxxxxxxxx
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
?pdbId ?chain ?pdbChain ?uniprot
WHERE
{
# A space separated list of pairs of PDB identifiers and the chain code.
VALUES(?pdbId ?pdbChain) { ('6VXC' 'A') ('1BG3' 'B') }
# Make an IRI out of the pdbId
BIND(iri(concat('http://rdf.wwpdb.org/pdb/', ?pdbId)) AS ?pdb)
# Map to UniProt entries
?uniprot rdfs:seeAlso ?pdb .
?pdb up:database <http://purl.uniprot.org/database/PDB> ;
up:chainSequenceMapping ?chainSm .
?chainSm up:chain ?chainsPlusRange .
# Extract the list of chains from the text representation.
BIND(STRBEFORE(?chainsPlusRange, '=') AS ?chain)
# Filter those that match.
FILTER(CONTAINS(?chain, ?pdbChain))
}
58: Map a selection of UniProtKB accession numbers (ACs) to HGNC identifiers and symbols
xxxxxxxxxx
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX uniprotkb: <http://purl.uniprot.org/uniprot/>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
?uniprot
?hgnc
?hgncSymbol
WHERE
{
# A space separated list of UniProt primary accessions.
VALUES (?acc) {('P05067') ('P00750')}
BIND(iri(concat(str(uniprotkb:), ?acc)) AS ?uniprot)
?uniprot rdfs:seeAlso ?hgnc .
?hgnc up:database <http://purl.uniprot.org/database/HGNC> ;
rdfs:comment ?hgncSymbol .
}
59: Count all isoforms for a given proteome
xxxxxxxxxx
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX up: <http://purl.uniprot.org/core/>
PREFIX proteome:<http://purl.uniprot.org/proteomes/>
SELECT
(COUNT(DISTINCT ?sequence) AS ?allIsoforms)
WHERE
{
?protein up:reviewed true .
?protein up:organism taxon:9606 .
?protein up:sequence ?sequence .
?protein up:proteome/^skos:narrower proteome:UP000005640 .
}
60: Find human proteins that catalyze reactions where substrates or product have a Cholestane skeleton
xxxxxxxxxx
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rh: <http://rdf.rhea-db.org/>
PREFIX sachem: <http://bioinfo.uochb.cas.cz/rdf/v1.0/sachem#>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
DISTINCT
?protein
?disease
?rhea
?chebi
?omim
WHERE {
# Find complete ChEBIs with a Cholestane skeleton, via the Czech Elixir node IDSM Sachem chemical substructure search.
SERVICE <https://idsm.elixir-czech.cz/sparql/endpoint/chebi> {
?chebi sachem:substructureSearch [
sachem:query
"[C@]12(CCC3CCCC[C@]3(C)[C@@]1([H])CC[C@]1(C)[C@@]([H])([C@@](C)([H])CCCC(C)C)CC[C@@]21[H])[H]"
].
}
# Use the fact that UniProt catalytic activities are annotated using Rhea
# Mapping the found ChEBIs to Rhea reactions
SERVICE <https://sparql.rhea-db.org/sparql>{
?rhea rh:side/rh:contains/rh:compound/rdfs:subClassOf ?chebi .
}
# Match the found Rhea reactions with human UniProtKB proteins
?protein up:annotation/up:catalyticActivity/up:catalyzedReaction ?rhea .
?protein up:organism taxon:9606 .
# Find only those human entries that have an annotated related disease, and optionaly map these to OMIM
?protein up:annotation/up:disease ?disease .
OPTIONAL {
?disease rdfs:seeAlso ?omim .
?omim up:database <http://purl.uniprot.org/database/MIM>
}
}
61: Select the Gene Protein Reaction sets for Human (Ensembl Gene, Human UniProtKB, Catalyzed Rhea reactions)
xxxxxxxxxx
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
?ensemblGene ?protein ?rhea
WHERE {
?protein up:reviewed true ;
up:organism taxon:9606 .
?protein up:annotation ?caa ;
rdfs:seeAlso ?ensemblTranscript .
?ensemblTranscript up:database <http://purl.uniprot.org/database/Ensembl> .
?caa up:catalyticActivity ?ca .
?ca up:catalyzedReaction ?rhea .
?ensemblTranscript up:transcribedFrom ?ensemblGene
}
100_uniprot_organelles_or_plasmids: List the proteins encoded by a gene that is located in an organelle other than the nucleus, or on a plasmid rather than a chromosome. In these cases the gene location is stored with encodedIn properties. Note that if a plasmid has several names, they are listed as multiple rdfs:label properties.
xxxxxxxxxx
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
?protein
?plasmidOrOrganelle
?label
WHERE {
?protein a up:Protein ;
up:encodedIn ?plasmidOrOrganelle .
OPTIONAL {
?plasmidOrOrganelle rdfs:label ?label .
}
}
101_uniprot_potential_isoforms: List all human UniProtKB entries and their computationaly mapped potential isoforms.
xxxxxxxxxx
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT ?entry ?sequence ?isCanonical
WHERE {
# We don't want to look into the UniParc graph which will
# confuse matters
GRAPH <http://sparql.uniprot.org/uniprot> {
# we need the UniProt entries that are human
?entry a up:Protein ;
up:organism taxon:9606 ;
# and we select the computationally mapped sequences
up:potentialSequence ?sequence .
}
}
102_uniprot_primary_accession: Extracting an UniProtKB primary accession from our IRIs. Is done with a bit of string manipulation. While UniProt primary accession are unique within UniProtKB they may be reused by accident or itentionally by other data sources. If we provided them as strings (not IRI) and if you used them in a query that way, you might accidentaly retrieve completely wrong records.
xxxxxxxxxx
PREFIX uniprotkb: <http://purl.uniprot.org/uniprot/>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
?primaryAccession
?protein
WHERE {
?protein a up:Protein .
BIND(substr(str(?protein), strlen(str(uniprotkb:))+1) AS ?primaryAccession)
}
103_uniprot_proteome_location_of_gene: List UniProtKB proteins with genetic replicon that they are encoded on using the Proteome data.
xxxxxxxxxx
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
DISTINCT
?proteomeData
?replicon
?proteome
WHERE {
# reviewed entries (UniProtKB/Swiss-Prot)
?protein up:reviewed true .
# restricted to Human taxid
?uniprot up:organism taxon:9606 .
?uniprot up:proteome ?proteomeData .
BIND( strbefore( str(?proteomeData), "#" ) as ?proteome )
BIND( strafter( str(?proteomeData), "#" ) as ?replicon )
}
104_uniprot_recomended_protein_full_name: The recommended protein full names for UniProtKB entries
xxxxxxxxxx
PREFIX up: <http://purl.uniprot.org/core/>
SELECT ?protein
?fullName
WHERE {
?protein a up:Protein ;
up:recommendedName ?recommendedName .
?recommendedName up:fullName ?fullName .
}
105_uniprot_recomended_protein_short_name: The recommended protein short names for UniProtKB entries
xxxxxxxxxx
PREFIX up: <http://purl.uniprot.org/core/>
SELECT ?protein
?fullName
WHERE {
?protein a up:Protein ;
up:recommendedName ?recommendedName .
?recommendedName up:shortName ?fullName .
}
106_uniprot_reviewed_or_not: List all UniProtKB proteins and if they are reviewed (Swiss-Prot) or unreviewed (TrEMBL)
xxxxxxxxxx
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
?protein
?reviewed
WHERE {
?protein a up:Protein .
?protein up:reviewed ?reviewed .
}
107_uniprot_sequences_and_mark_which_is_cannonical_for_human: List all human UniProtKB entries and their sequences, marking if the sequence listed is the cannonical sequence of the matching entry.
xxxxxxxxxx
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT ?entry ?sequence ?isCanonical
WHERE {
# We don't want to look into the UniParc graph which will
# confuse matters
GRAPH <http://sparql.uniprot.org/uniprot> {
# we need the UniProt entries that are human
?entry a up:Protein ;
up:organism taxon:9606 ;
up:sequence ?sequence .
# If the sequence is a "Simple_Sequence" it is likely to be the
# cannonical sequence
OPTIONAL {
?sequence a up:Simple_Sequence .
BIND(true AS ?likelyIsCanonical)
}
# unless we are dealing with an external isoform
# see https://www.uniprot.org/help/canonical_and_isoforms
OPTIONAL {
FILTER(?likelyIsCanonical)
?sequence a up:External_Sequence .
BIND(true AS ?isComplicated)
}
# If it is an external isoform it's id would not match the
# entry primary accession
BIND(IF(?isComplicated, STRENDS(STR(?entry), STRBEFORE(SUBSTR(STR(?sequence), 34),'-')),?likelyIsCanonical) AS ?isCanonical)
}
}
108_uniprot_signature_match_start_end: List all InterPro member database signature match start and end for a specific UniProtKB protein.
xxxxxxxxxx
PREFIX faldo: <http://biohackathon.org/resource/faldo#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
?protein ?interproMemberDatabaseXref ?matchStart ?matchEnd
WHERE{
GRAPH <http://sparql.uniprot.org/uniprot> {
VALUES ?protein {<http://purl.uniprot.org/uniprot/P05067>} .
?protein rdfs:seeAlso ?sa .
}
GRAPH <http://sparql.uniprot.org/uniparc> {
?uniparc up:sequenceFor ?protein ;
rdfs:seeAlso ?interproMemberDatabaseXref .
?interproDatabaseXref up:signatureSequenceMatch ?sam .
?sam faldo:begin ?sab ;
faldo:end ?sae .
?sab faldo:position ?matchStart ;
faldo:reference ?uniparc .
?sae faldo:position ?matchEnd ;
faldo:reference ?uniparc .
}
}
109_uniprot_transporter_in_liver: Find human transporter proteins in reviewed UniProtKB/Swiss-Prot, that are expressed in the liver (Uses Bgee and UBERON).
xxxxxxxxxx
PREFIX genex: <http://purl.org/genex#>
PREFIX lscr: <http://purl.org/lscr#>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX orth: <http://purl.org/net/orth#>
PREFIX rh: <http://rdf.rhea-db.org/>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX uberon: <http://purl.obolibrary.org/obo/uo#>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
?rhea
?protein
?anat
WHERE
{
GRAPH <https://sparql.rhea-db.org/rhea> {
?rhea rh:isTransport true .
}
?protein up:annotation ?ann .
?protein up:organism taxon:9606 .
?ann up:catalyticActivity ?ca .
?ca up:catalyzedReaction ?rhea .
BIND(uberon:0002107 AS ?anat)
SERVICE <https://www.bgee.org/sparql> {
?seq genex:isExpressedIn ?anat .
?seq lscr:xrefUniprot ?protein .
?seq orth:organism ?organism .
?organism obo:RO_0002162 taxon:9606 .
}
}
110_uniprot_unamed_plasmids: Sometimes it is known that a gene encoding a protein UniProtKB is located on a plasmid or an organelle, but the name of the plasmid is unknown.
xxxxxxxxxx
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
?protein
?plasmidOrOrganelle
?label
WHERE {
?protein a up:Protein ;
up:encodedIn ?plasmidOrOrganelle .
OPTIONAL {
?plasmidOrOrganelle rdfs:label ?label .
}
}
111_uniprot_make_chain_sequence_fasta: Given an UniProt chain identifier, generate the matching sequence as a FASTA
xxxxxxxxxx
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX up: <http://purl.uniprot.org/core/>
PREFIX faldo: <http://biohackathon.org/resource/faldo#>
SELECT (CONCAT('>', ?chainSeqId, '\n', (SUBSTR(?iupacAA, ?begin, (?end-?begin+1)))) AS ?chainFasta)
WHERE {
BIND("PRO_0000268053" AS ?chainSeqId)
BIND(IRI(CONCAT("http://purl.uniprot.org/annotation/", ?chainSeqId)) AS ?annId)
?annId up:range ?range .
?range faldo:begin [ faldo:reference ?reference ; faldo:position ?begin ] ;
faldo:end [ faldo:position ?end ] .
?reference rdf:value ?iupacAA .
}
62_diseases_involving_enzymes: Find diseases that are thought to be related to enzymes
xxxxxxxxxx
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
?disease ?diseaseLabel
WHERE {
?protein up:enzyme|up:annotation/up:catalyticActivity/up:enzymeClass ?enzyme ;
up:annotation ?diseaseAnnotation .
?diseaseAnnotation a up:Disease_Annotation ;
up:disease ?disease .
?disease skos:prefLabel ?diseaseLabel .
}
63_diseases_involving_enzymes_located_in_mitochondrion: Find (Human genetic) diseases that are thought to be related to Enzymes, known to be located in the Mitochondrion
xxxxxxxxxx
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
DISTINCT
?disease
WHERE {
?protein a up:Protein ;
up:organism taxon:9606 ;
up:annotation ?disease_annotation ,
?subcellularLocation .
{
?protein up:enzyme [] .
} UNION {
?protein up:annotation/a up:Catalytic_Activity_Annotation .
}
?disease_annotation a up:Disease_Annotation ;
up:disease ?disease .
?subcellularLocation a up:Subcellular_Location_Annotation ;
up:locatedIn ?location .
?location up:cellularComponent ?component .
?component up:partOf* <http://purl.uniprot.org/locations/173> .
}
64_diseases_related_to_mutation_in_active_site: Find (Human Genetic) diseases, that are related to a natural variant on the active site of an enzyme.
xxxxxxxxxx
PREFIX faldo: <http://biohackathon.org/resource/faldo#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
DISTINCT
?disease
WHERE {
?protein a up:Protein ;
up:organism taxon:9606 ;
up:annotation ?disease_annotation, ?active_site_annotation, ?natural_variant_annotation .
{
?protein up:enzyme [] .
} UNION {
?protein up:annotation/a up:Catalytic_Activity_Annotation .
}
?disease_annotation a up:Disease_Annotation ;
up:disease ?disease .
?active_site_annotation a up:Active_Site_Annotation ;
up:range ?active_site_range .
?active_site_range faldo:begin ?active_site_begin .
?active_site_begin faldo:position ?active_site_position ;
faldo:reference ?sequence .
?natural_variant_annotation a up:Natural_Variant_Annotation ;
up:range ?natural_variant_range ;
skos:related ?disease .
?natural_variant_range faldo:begin ?natural_variant_begin ;
faldo:end ?natural_variant_end .
?natural_variant_begin faldo:position ?natural_variant_begin_position .
?natural_variant_end faldo:position ?natural_variant_end_position ;
faldo:reference ?sequence .
FILTER(?natural_variant_begin_position >= ?active_site_position && ?active_site_position <= ?natural_variant_end_position)
}