SPARQL example query
89_uniparc_triples_directly_associated: Predicates and objects, for a given UniParc accession as a subject
PREFIX up: <http://purl.uniprot.org/core/> SELECT ?predicate ?object WHERE { <http://purl.uniprot.org/uniparc/UPI000012A0AD> ?predicate ?object }Use90_uniprot_affected_by_metabolic_diseases_using_MeSH: Find UniProtKB proteins involved in metabolic diseases using the MeSH concept for 'Metabolic Diseases'.
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX up: <http://purl.uniprot.org/core/> SELECT ?disease ?protein WHERE { SERVICE<https://id.nlm.nih.gov/mesh/sparql> { GRAPH <http://id.nlm.nih.gov/mesh> { # Mesh M0013493 represents the concept 'Metabolic Diseases' ?mesh <http://id.nlm.nih.gov/mesh/vocab#broaderDescriptor>* ?broader . ?broader <http://id.nlm.nih.gov/mesh/vocab#preferredConcept> <http://id.nlm.nih.gov/mesh/M0013493> . } } GRAPH <http://sparql.uniprot.org/diseases>{ ?disease a up:Disease ; rdfs:seeAlso ?mesh . ?mesh up:database <http://purl.uniprot.org/database/MeSH> . } GRAPH <http://sparql.uniprot.org/uniprot> { ?protein up:annotation/up:disease ?disease . } }Use91_uniprot_alternative_protein_full_name: Alternative protein full names for UniProtKB entries
PREFIX up: <http://purl.uniprot.org/core/> SELECT ?protein ?fullName WHERE { ?protein a up:Protein ; up:alternativeName ?recommendedName . ?recommendedName up:fullName ?fullName . }Use92_uniprot_bioregistry_iri_translation: Translate the global unique identifier for a UniProtKB record into other options using the bioregistry translating endpoint.
PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX uniprotkb: <http://purl.uniprot.org/uniprot/> PREFIX up: <http://purl.uniprot.org/core/> SELECT ?protein ?otherIdentifier WHERE { BIND(uniprotkb:P00750 AS ?protein) ?protein a up:Protein . SERVICE <https://bioregistry.io/sparql> { ?protein owl:sameAs ?otherIdentifier . } }Use93_uniprot_created_modified_updated: List the created, last modified, and last sequence update dates for UniProtKB proteins.
PREFIX up: <http://purl.uniprot.org/core/> SELECT ?protein ?created ?modified ?version WHERE { ?protein a up:Protein ; up:created ?created ; up:modified ?modified ; up:version ?version . }Use94_uniprot_encoding_gene: List UniProtKB proteins with their associated named gene
PREFIX up: <http://purl.uniprot.org/core/> SELECT ?protein ?gene WHERE { ?protein a up:Protein ; up:encodedBy ?gene . }Use96_uniprot_encoding_gene_name: List UniProtKB proteins with their associated gene and the gene's preffered name
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX up: <http://purl.uniprot.org/core/> SELECT ?protein ?gene WHERE { ?protein a up:Protein ; up:encodedBy ?gene . ?gene skos:prefLabel ?recommendedGeneName . }Use97_uniprot_encoding_gene_org_name: List UniProtKB proteins with their associated gene and the gene's ORF label
PREFIX up: <http://purl.uniprot.org/core/> SELECT ?gene ?orfName WHERE { ?protein a up:Protein ; up:encodedBy ?gene . ?gene up:orfName ?orfName . }Use98_uniprot_entries_with_more_than_two_geneid_crossrefences: Find GeneID's crosslinked to more than one human or mouse UniProtKB entry
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX up: <http://purl.uniprot.org/core/> PREFIX taxon:<http://purl.uniprot.org/taxon/> SELECT ?geneid ?organism (GROUP_CONCAT(?protein; separator=', ') AS ?entries) WHERE { VALUES ?organism {taxon:9606 taxon:10090} ?geneid up:database <http://purl.uniprot.org/database/GeneID> . ?protein rdfs:seeAlso ?geneid ; up:organism ?organism } GROUP BY ?geneid ?organism HAVING (COUNT(?protein) > 1) ORDER BY ?organism ?geneidUse99_uniprot_identifiers_org_translation: Translate a selection of UniProtKB accession numbers into other options using the identifiers.org translating endpoint.
PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX uniprotkb: <http://purl.uniprot.org/uniprot/> PREFIX up: <http://purl.uniprot.org/core/> SELECT ?protein ?otherIdentifier WHERE { VALUES (?protein) {(uniprotkb:P00750) (uniprotkb:P05067)} ?protein a up:Protein . SERVICE <https://sparql.api.identifiers.org/sparql> { ?protein owl:sameAs ?otherIdentifier . } }Usedrosophila_enzymes_derived_from_at_least_two_mRNAs: Find Drosophila proteins, that depend on more than one transcript (requires cross-references to Ensembl family of resources).
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 ?protein WHERE { ?protein up:organism taxon:7227 ; a up:Protein ; up:reviewed true ; rdfs:seeAlso ?transcript . ?transcript a up:Transcript_Resource . } GROUP BY ?protein HAVING(COUNT(?transcript) >= 2)Usedrosophila_proteins_derived_from_at_least_two_mRNAs: Find Drosophila enzymes, that depend on more than one transcript (requires cross-references to Ensembl family of resources).
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 ?protein WHERE { ?protein up:organism taxon:7227 ; a up:Protein ; up:reviewed true ; rdfs:seeAlso ?transcript . { ?protein up:annotation/a up:Catalytic_Activity_Annotation ; } UNION { ?protein up:enzyme ?enzyme . } ?transcript a up:Transcript_Resource . } GROUP BY ?protein HAVING(COUNT(?transcript) >= 2)Useenzyme_with_threonine_as_active_site: Find enzymes with a Tyrosine (Y) as an active site
PREFIX faldo: <http://biohackathon.org/resource/faldo#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX up: <http://purl.uniprot.org/core/> SELECT ?protein WHERE { ?protein up:annotation ?activeSiteAnnotation . ?activeSiteAnnotation a up:Active_Site_Annotation ; up:range ?range . ?range faldo:begin ?begin . ?begin faldo:position ?beginPosition ; faldo:reference ?sequence . ?sequence rdf:value ?sequenceVal . FILTER(SUBSTR(?sequenceVal, ?beginPosition, 1) = 'Y') }Useuniprot_encoding_gene_name_alternative_name: List UniProtKB proteins with their associated gene and the gene's names that are used in the field, but not recommended for use by UniProtKB
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX up: <http://purl.uniprot.org/core/> SELECT ?protein ?gene ?altGeneName WHERE { ?protein a up:Protein ; up:encodedBy ?gene . ?gene skos:altLabel ?altGeneName . }Use