8: Select the preferred gene name and disease annotation of all human UniProt entries that are known to be involved in a disease

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 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 ?name ?text WHERE { ?protein a up:Protein . ?protein up:organism taxon:9606 . ?protein up:encodedBy ?gene . ?gene skos:prefLabel ?name . ?protein up:annotation ?annotation . ?annotation a up:Disease_Annotation . ?annotation rdfs:comment ?text }Use

9: Select all human UniProt entries with a sequence variant that leads to a 'loss of function'

SELECT ?protein ?text WHERE { ?protein a up:Protein . ?protein up:organism taxon:9606 . ?protein up:annotation ?annotation . ?annotation a up:Natural_Variant_Annotation . ?annotation rdfs:comment ?text . FILTER (CONTAINS(?text, 'loss of function')) }Use

9: Select all human UniProt entries with a sequence variant that leads to a 'loss of function'

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 ?text WHERE { ?protein a up:Protein . ?protein up:organism taxon:9606 . ?protein up:annotation ?annotation . ?annotation a up:Natural_Variant_Annotation . ?annotation rdfs:comment ?text . FILTER (CONTAINS(?text, 'loss of function')) }Use

10: Select all human UniProt entries with a sequence variant that leads to a tyrosine to phenylalanine substitution

SELECT ?protein ?annotation ?begin ?text WHERE { ?protein a up:Protein ; up:organism taxon:9606 ; up:annotation ?annotation . ?annotation a up:Natural_Variant_Annotation ; rdfs:comment ?text ; up:substitution ?substitution ; up:range/faldo:begin [ faldo:position ?begin ; faldo:reference ?sequence ] . ?sequence rdf:value ?value . BIND (substr(?value, ?begin, 1) as ?original) . FILTER(?original = 'Y' && ?substitution = 'F') . }Use

10: Select all human UniProt entries with a sequence variant that leads to a tyrosine to phenylalanine substitution

PREFIX faldo: <http://biohackathon.org/resource/faldo#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 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 ?annotation ?begin ?text WHERE { ?protein a up:Protein ; up:organism taxon:9606 ; up:annotation ?annotation . ?annotation a up:Natural_Variant_Annotation ; rdfs:comment ?text ; up:substitution ?substitution ; up:range/faldo:begin [ faldo:position ?begin ; faldo:reference ?sequence ] . ?sequence rdf:value ?value . BIND (substr(?value, ?begin, 1) as ?original) . FILTER(?original = 'Y' && ?substitution = 'F') . }Use

11: Select all UniProt entries with annotated transmembrane regions and the regions' begin and end coordinates on the canonical sequence

SELECT ?protein ?begin ?end WHERE { ?protein a up:Protein . ?protein up:annotation ?annotation . ?annotation a up:Transmembrane_Annotation . ?annotation up:range ?range . ?range faldo:begin/faldo:position ?begin . ?range faldo:end/faldo:position ?end }Use

11: Select all UniProt entries with annotated transmembrane regions and the regions' begin and end coordinates on the canonical sequence

PREFIX faldo: <http://biohackathon.org/resource/faldo#> PREFIX up: <http://purl.uniprot.org/core/> SELECT ?protein ?begin ?end WHERE { ?protein a up:Protein . ?protein up:annotation ?annotation . ?annotation a up:Transmembrane_Annotation . ?annotation up:range ?range . ?range faldo:begin/faldo:position ?begin . ?range faldo:end/faldo:position ?end }Use

12: Select all UniProt entries that were integrated on the 30th of November 2010

SELECT ?protein WHERE { ?protein a up:Protein . ?protein up:created '2010-11-30'^^xsd:date }Use

12: Select all UniProt entries that were integrated on the 30th of November 2010

PREFIX up: <http://purl.uniprot.org/core/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT ?protein WHERE { ?protein a up:Protein . ?protein up:created '2010-11-30'^^xsd:date }Use

13: Was any UniProt entry integrated on the 9th of January 2013

PREFIX up: <http://purl.uniprot.org/core/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> ASK WHERE { ?protein a up:Protein . ?protein up:created '2013-01-09'^^xsd:date }Use

13: Was any UniProt entry integrated on the 9th of January 2013

ASK WHERE { ?protein a up:Protein . ?protein up:created '2013-01-09'^^xsd:date }Use

14: Construct new triples of the type 'HumanProtein' from all human UniProt entries

PREFIX taxon: <http://purl.uniprot.org/taxonomy/> PREFIX up: <http://purl.uniprot.org/core/> CONSTRUCT { ?protein a up:HumanProtein . } WHERE { ?protein a up:Protein . ?protein up:organism taxon:9606 }Use

14: Construct new triples of the type 'HumanProtein' from all human UniProt entries

CONSTRUCT { ?protein a up:HumanProtein . } WHERE { ?protein a up:Protein . ?protein up:organism taxon:9606 }Use

15: Select all triples that relate to the EMBL CDS entry AA089367.1:

DESCRIBE <http://purl.uniprot.org/embl-cds/AAO89367.1>Use

15: Select all triples that relate to the EMBL CDS entry AA089367.1:

DESCRIBE <http://purl.uniprot.org/embl-cds/AAO89367.1>Use

16: Select all triples that relate to the taxon that describes Homo sapiens in the named graph for taxonomy

PREFIX taxon: <http://purl.uniprot.org/taxonomy/> DESCRIBE taxon:9606 FROM <http://sparql.uniprot.org/taxonomy>Use

16: Select all triples that relate to the taxon that describes Homo sapiens in the named graph for taxonomy

DESCRIBE taxon:9606 FROM <http://sparql.uniprot.org/taxonomy>Use

17: Select the average number of cross-references to the PDB database of UniProt entries that have at least one cross-reference to the PDB database

SELECT (AVG(?linksToPdbPerEntry) AS ?avgLinksToPdbPerEntry) WHERE { SELECT ?protein (COUNT(DISTINCT ?db) AS ?linksToPdbPerEntry) WHERE { ?protein a up:Protein . ?protein rdfs:seeAlso ?db . ?db up:database <http://purl.uniprot.org/database/PDB> . } GROUP BY ?protein ORDER BY DESC(?linksToPdbPerEntry) }Use

17: Select the average number of cross-references to the PDB database of UniProt entries that have at least one cross-reference to the PDB database

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX up: <http://purl.uniprot.org/core/> SELECT (AVG(?linksToPdbPerEntry) AS ?avgLinksToPdbPerEntry) WHERE { SELECT ?protein (COUNT(DISTINCT ?db) AS ?linksToPdbPerEntry) WHERE { ?protein a up:Protein . ?protein rdfs:seeAlso ?db . ?db up:database <http://purl.uniprot.org/database/PDB> . } GROUP BY ?protein ORDER BY DESC(?linksToPdbPerEntry) }Use

18: Select the number of UniProt entries for each of the EC (Enzyme Commission) top level categories

SELECT ?ecClass (COUNT(?protein) as ?size) WHERE { VALUES (?ecClass) {(ec:1.-.-.-) (ec:2.-.-.-) (ec:3.-.-.-) (ec:4.-.-.-) (ec:5.-.-.-) (ec:6.-.-.-) (ec:7.-.-.-)} . ?protein ( up:enzyme | up:domain/up:enzyme | up:component/up:enzyme ) ?enzyme . # Enzyme subclasses are materialized, do not use rdfs:subClassOf+ ?enzyme rdfs:subClassOf ?ecClass . } GROUP BY ?ecClass ORDER BY ?ecClassUse

18: Select the number of UniProt entries for each of the EC (Enzyme Commission) top level categories

PREFIX ec: <http://purl.uniprot.org/enzyme/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX up: <http://purl.uniprot.org/core/> SELECT ?ecClass (COUNT(?protein) as ?size) WHERE { VALUES (?ecClass) {(ec:1.-.-.-) (ec:2.-.-.-) (ec:3.-.-.-) (ec:4.-.-.-) (ec:5.-.-.-) (ec:6.-.-.-) (ec:7.-.-.-)} . ?protein ( up:enzyme | up:domain/up:enzyme | up:component/up:enzyme ) ?enzyme . # Enzyme subclasses are materialized, do not use rdfs:subClassOf+ ?enzyme rdfs:subClassOf ?ecClass . } GROUP BY ?ecClass ORDER BY ?ecClassUse

19: Find all Natural Variant Annotations if associated via an evidence tag to an article with a pubmed identifier

SELECT ?accession ?annotation_acc ?pubmed WHERE { ?protein a up:Protein ; up:annotation ?annotation . ?annotation a up:Natural_Variant_Annotation . ?linkToEvidence rdf:object ?annotation ; up:attribution ?attribution . ?attribution up:source ?source . ?source a up:Journal_Citation . BIND(SUBSTR(STR(?protein),33) AS ?accession) BIND(IF(CONTAINS(STR(?annotation), "#SIP"), SUBSTR(STR(?annotation),33), SUBSTR(STR(?annotation),36))AS?annotation_acc) BIND(SUBSTR(STR(?source),35) AS ?pubmed) }Use

19: Find all Natural Variant Annotations if associated via an evidence tag to an article with a pubmed identifier

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX up: <http://purl.uniprot.org/core/> SELECT ?accession ?annotation_acc ?pubmed WHERE { ?protein a up:Protein ; up:annotation ?annotation . ?annotation a up:Natural_Variant_Annotation . ?linkToEvidence rdf:object ?annotation ; up:attribution ?attribution . ?attribution up:source ?source . ?source a up:Journal_Citation . BIND(SUBSTR(STR(?protein),33) AS ?accession) BIND(IF(CONTAINS(STR(?annotation), "#SIP"), SUBSTR(STR(?annotation),33), SUBSTR(STR(?annotation),36))AS?annotation_acc) BIND(SUBSTR(STR(?source),35) AS ?pubmed) }Use

20: Find how often an article in pubmed was used in an evidence tag in a human protein (ordered by most used to least)

SELECT ?source (COUNT(?attribution) AS ?attribitions) WHERE { ?protein a up:Protein ; up:organism taxon:9606 ; up:annotation ?annotation . ?linkToEvidence rdf:object ?annotation ; up:attribution ?attribution . ?attribution up:source ?source . ?source a up:Journal_Citation . } GROUP BY ?source ORDER BY DESC(COUNT(?attribution))Use

20: Find how often an article in pubmed was used in an evidence tag in a human protein (ordered by most used to least)

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX taxon: <http://purl.uniprot.org/taxonomy/> PREFIX up: <http://purl.uniprot.org/core/> SELECT ?source (COUNT(?attribution) AS ?attribitions) WHERE { ?protein a up:Protein ; up:organism taxon:9606 ; up:annotation ?annotation . ?linkToEvidence rdf:object ?annotation ; up:attribution ?attribution . ?attribution up:source ?source . ?source a up:Journal_Citation . } GROUP BY ?source ORDER BY DESC(COUNT(?attribution))Use

21: Find where disease related proteins are known to be located in the cell

SELECT ?protein ?disease ?location_inside_cell ?cellcmpt WHERE { ?protein up:annotation ?diseaseAnnotation , ?subcellAnnotation . ?diseaseAnnotation up:disease/skos:prefLabel ?disease . ?subcellAnnotation up:locatedIn/up:cellularComponent ?cellcmpt . ?cellcmpt skos:prefLabel ?location_inside_cell . }Use