SPARQL example query
93_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