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.

 
1
PREFIX faldo: <http://biohackathon.org/resource/faldo#>
2
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
3
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
4
PREFIX up: <http://purl.uniprot.org/core/>
5
SELECT
6
  DISTINCT
7
   ?disease
8
WHERE {
9
  ?protein a up:Protein ;
10
    up:organism taxon:9606 ;
11
    up:annotation ?disease_annotation, ?active_site_annotation, ?natural_variant_annotation .
12
  {
13
    ?protein up:enzyme [] .
14
  } UNION {
15
  ?protein up:annotation/a up:Catalytic_Activity_Annotation .
16
  }
17
  ?disease_annotation a up:Disease_Annotation ;
18
  up:disease ?disease .
19
  ?active_site_annotation a up:Active_Site_Annotation ;
20
  up:range ?active_site_range .
21
  ?active_site_range faldo:begin ?active_site_begin .
22
  ?active_site_begin faldo:position ?active_site_position ;
23
                     faldo:reference ?sequence .
24
  ?natural_variant_annotation a up:Natural_Variant_Annotation ;
25
  up:range ?natural_variant_range ;
26
  skos:related ?disease .
27
  ?natural_variant_range faldo:begin ?natural_variant_begin ;
28
                         faldo:end ?natural_variant_end .
29
  ?natural_variant_begin faldo:position ?natural_variant_begin_position .
30
  ?natural_variant_end faldo:position ?natural_variant_end_position ;
31
                       faldo:reference ?sequence .
32
  FILTER(?natural_variant_begin_position >= ?active_site_position && ?active_site_position <= ?natural_variant_end_position)
33
}
Use

65_distinct_extinct_organisms_in_uniprotkb: How many distinct extinct organisms are represented in UniProtKB

xxxxxxxxxx
15
 
1
PREFIX keywords: <http://purl.uniprot.org/keywords/>
2
PREFIX up: <http://purl.uniprot.org/core/>
3
SELECT 
4
  ?taxon
5
  (SAMPLE(?name) AS ?anName)
6
  (COUNT(DISTINCT ?protein) AS ?entriesPerExtinctTaxon)
7
WHERE
8
{
9
  GRAPH<http://sparql.uniprot.org/taxonomy>{
10
    ?taxon a up:Taxon ;
11
           up:scientificName ?name .
12
  }
13
  ?protein up:organism ?taxon ;
14
           up:classifiedWith keywords:952 .
15
} GROUP BY ?taxon ORDER BY ?taxon
Use

66_distinct_rhea_transport_in_reviewed_uniprot: Count number of unique Rhea transport reactions annotated in reviewed UniProtKB entries.

xxxxxxxxxx
13
 
1
PREFIX rh: <http://rdf.rhea-db.org/>
2
PREFIX up: <http://purl.uniprot.org/core/>
3
SELECT
4
(COUNT(DISTINCT ?rhea) AS ?distinctRheaTransportInUniProt)
5
WHERE
6
{
7
  GRAPH <https://sparql.rhea-db.org/rhea> {
8
    ?rhea rh:isTransport true .
9
  }
10
  ?protein up:annotation ?ann .
11
  ?ann up:catalyticActivity ?ca .
12
  ?ca up:catalyzedReaction ?rhea .
13
}
Use

67_draft_human_metabolome: Generate a draft human metabolome

xxxxxxxxxx
18
 
1
PREFIX chebislash: <http://purl.obolibrary.org/obo/chebi/>
2
PREFIX rh: <http://rdf.rhea-db.org/>
3
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
4
PREFIX up: <http://purl.uniprot.org/core/>
5
SELECT
6
?uniprot ?mnemonic ?rhea ?chebi ?smiles ?inchiKey
7
WHERE
8
{
9
  ?uniprot up:annotation/up:catalyticActivity/up:catalyzedReaction ?rhea ;
10
        up:organism taxon:9606 ;
11
        up:mnemonic ?mnemonic .
12
  SERVICE <https://sparql.rhea-db.org/sparql> {
13
    ?rhea rh:side/rh:contains/rh:compound ?compound .
14
    ?compound (rh:chebi|(rh:reactivePart/rh:chebi)|(rh:underlyingChebi/rh:chebi)) ?chebi .
15
   }
16
   ?chebi chebislash:smiles ?smiles ;
17
          chebislash:inchikey ?inchiKey .
18
}
Use

70_enzymes_interacting_with_molecules_similar_to_dopamine: Look for enzymes catalyzing reactions with molecules similar to dopamine.

xxxxxxxxxx
22
 
1
PREFIX CHEBI: <http://purl.obolibrary.org/obo/CHEBI_>
2
PREFIX rh: <http://rdf.rhea-db.org/>
3
PREFIX sachem: <http://bioinfo.uochb.cas.cz/rdf/v1.0/sachem#>
4
PREFIX up: <http://purl.uniprot.org/core/>
5
SELECT
6
  ?protein
7
  ?rhea
8
  ?chebi
9
WHERE {
10
  # Use the smiles of dopamine CHEBI:18243
11
  SERVICE <https://idsm.elixir-czech.cz/sparql/endpoint/chebi>{
12
    ?chebi sachem:similarCompoundSearch [
13
      sachem:query "NCCc1ccc(O)c(O)c1" ] .
14
  }
15
  GRAPH<https://sparql.rhea-db.org/rhea>{
16
    ?rhea rh:side/rh:contains/rh:compound ?compound .
17
    ?compound (rh:chebi|(rh:reactivePart/rh:chebi)|(rh:underlyingChebi/rh:chebi)) ?chebi .
18
  }
19
  ?protein up:reviewed true ;
20
    up:annotation ?caa .
21
  ?caa up:catalyticActivity/up:catalyzedReaction ?rhea .
22
}
Use

71_enzymes_interacting_with_molecules_similar_to_dopamine_with_variants_related_to_disease: Look for enzymes catalyzing reactions with molecules similar to dopamine, with natural variants related to a disease.

xxxxxxxxxx
28
 
1
PREFIX CHEBI: <http://purl.obolibrary.org/obo/CHEBI_>
2
PREFIX rh: <http://rdf.rhea-db.org/>
3
PREFIX sachem: <http://bioinfo.uochb.cas.cz/rdf/v1.0/sachem#>
4
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
5
PREFIX up: <http://purl.uniprot.org/core/>
6
SELECT
7
  ?protein
8
  ?rhea
9
  ?chebi
10
  ?disease
11
WHERE {
12
  # Use the smiles of dopamine CHEBI:18243
13
  SERVICE <https://idsm.elixir-czech.cz/sparql/endpoint/chebi>{
14
    ?chebi sachem:similarCompoundSearch [
15
      sachem:query "NCCc1ccc(O)c(O)c1" ] .
16
  }
17
  GRAPH<https://sparql.rhea-db.org/rhea>{
18
    ?rhea rh:side/rh:contains/rh:compound ?compound .
19
    ?compound (rh:chebi|(rh:reactivePart/rh:chebi)|(rh:underlyingChebi/rh:chebi)) ?chebi .
20
  }
21
  ?protein up:reviewed true ;
22
    up:annotation ?caa, ?natural_variant_annotation, ?disease_annotation .
23
  ?caa up:catalyticActivity/up:catalyzedReaction ?rhea .
24
  ?natural_variant_annotation a up:Natural_Variant_Annotation ;
25
    skos:related ?disease .
26
  ?disease_annotation a up:Disease_Annotation ;
27
     up:disease ?disease .
28
}
Use

72_enzymes_mapping_to_PDB: Select a mapping of UniProtKB enzymes to PDB entries using the UniProtKB cross-references to the PDB database.

xxxxxxxxxx
17
 
1
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
2
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
3
PREFIX up: <http://purl.uniprot.org/core/>
4
SELECT
5
  ?protein
6
  ?db
7
WHERE
8
{
9
  ?protein a up:Protein .
10
  ?protein rdfs:seeAlso ?db .
11
  ?db up:database <http://purl.uniprot.org/database/PDB> .
12
  {
13
    ?protein up:enzyme ?enzyme .
14
  } UNION {
15
    ?protein up:annotation/rdf:type up:Catalytic_Activity_Annotation .
16
  }
17
}
Use

73_enzymes_related_to_protein: Select Enzyme Classification (EC) classes that have a protein associated to them

xxxxxxxxxx
19
 
1
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
2
PREFIX up: <http://purl.uniprot.org/core/>
3
SELECT
4
  DISTINCT ?enzyme
5
WHERE {
6
  ?protein a up:Protein .
7
  {
8
    ?protein up:enzyme ?enzyme .
9
  } UNION {
10
    ?protein up:annotation ?caa .
11
    ?caa a up:Catalytic_Activity_Annotation .
12
    ?caa up:catalyticActivity ?ca .
13
    ?ca up:enzymeClass ?enzyme
14
  } UNION {
15
    ?protein up:component/up:enzyme ?enzyme .
16
  } UNION {
17
    ?protein up:domain/up:enzyme ?enzyme .
18
  }
19
}
Use

74_enzymes_with_at_least_two_transmembrane_domains: Find Hydrolases (enzymes that catalyse the hydrolysis of various bonds) that have at least two transmembrane domains

xxxxxxxxxx
10
 
1
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
2
PREFIX up: <http://purl.uniprot.org/core/>
3
SELECT
4
  ?protein
5
WHERE {
6
 ?protein up:enzyme|up:annotation/up:catalyticActivity/up:enzymeClass ?enzymeClass ;
7
                   up:annotation ?transMembraneAnnotation .
8
 ?enzymeClass rdfs:subClassOf <http://purl.uniprot.org/enzyme/3.-.-.-> .
9
 ?transMembraneAnnotation a up:Transmembrane_Annotation .
10
} GROUP BY ?protein HAVING (COUNT(DISTINCT ?transMembraneAnnotation) >= 2)
Use

75_enzymes_with_at_least_two_transmembrane_domains_PDB_xray: Find enzymes that have at least two transmembrane domains, whose 3D structure is elucidated through X-Ray analysis

xxxxxxxxxx
17
 
1
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
2
PREFIX up: <http://purl.uniprot.org/core/>
3
SELECT
4
  ?protein
5
WHERE {
6
  ?protein a up:Protein ;
7
    up:annotation ?transmembrane_annotation ;
8
    rdfs:seeAlso ?wwPDB .
9
  {
10
    ?protein up:enzyme ?enzyme .
11
  } UNION {
12
    ?protein up:annotation/a up:Catalytic_Activity_Annotation .
13
  }
14
  ?wwPDB up:database <http://purl.uniprot.org/database/PDB> ;
15
    up:method up:X-Ray_Crystallography .
16
  ?transmembrane_annotation a up:Transmembrane_Annotation .
17
} GROUP BY ?protein HAVING(COUNT(DISTINCT ?transmembrane_annotation ) >= 2)
Use

76_enzymes_with_mutagenesis_affecting_active_site: Find enzymes, where the active site is a region affected by mutagenesis and show the comment regarding mutagenesis effect.

xxxxxxxxxx
23
 
1
PREFIX faldo: <http://biohackathon.org/resource/faldo#>
2
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
3
PREFIX up: <http://purl.uniprot.org/core/>
4
SELECT
5
  ?protein ?mutagenesisBeginPosition ?activeSiteBeginPosition ?mutagenesisRangeEndPosition ?mutagenesisComment
6
WHERE {
7
  ?protein up:annotation ?activeSiteAnnotation ,
8
      ?mutagenesisAnnotation .
9
  ?mutagenesisAnnotation a up:Mutagenesis_Annotation ;
10
     up:range ?mutagenesisRange ;
11
     rdfs:comment ?mutagenesisComment .
12
  ?activeSiteAnnotation a up:Active_Site_Annotation ;
13
    up:range ?activeSiteRange .
14
  ?activeSiteRange faldo:begin ?activeSiteBegin .
15
  ?activeSiteBegin faldo:position ?activeSiteBeginPosition ;
16
    faldo:reference ?sequence .
17
  ?mutagenesisRange faldo:begin ?mutagenesisRangeBegin ;
18
    faldo:end ?mutagenesisRangeEnd .
19
  ?mutagenesisRangeBegin faldo:position ?mutagenesisBeginPosition ;
20
    faldo:reference ?sequence .
21
  ?mutagenesisRangeEnd faldo:position ?mutagenesisRangeEndPosition .
22
  FILTER(?mutagenesisBeginPosition <= ?activeSiteBeginPosition && ?activeSiteBeginPosition <= ?mutagenesisRangeEndPosition)
23
}
Use

78_genetic_disease_related_proteins: List all UniProtKB proteins annotated to be related to a genetic disease.

xxxxxxxxxx
20
 
1
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
2
PREFIX up: <http://purl.uniprot.org/core/>
3
SELECT
4
  ?uniprot ?disease ?diseaseComment ?mim
5
WHERE
6
{
7
  GRAPH <http://sparql.uniprot.org/uniprot> {
8
    ?uniprot a up:Protein ;
9
       up:annotation ?diseaseAnnotation .
10
    ?diseaseAnnotation up:disease ?disease .
11
  }
12
  GRAPH <http://sparql.uniprot.org/diseases> {
13
    ?disease a up:Disease ;
14
             rdfs:comment ?diseaseComment .
15
    OPTIONAL {
16
      ?disease rdfs:seeAlso ?mim .
17
       ?mim up:database <http://purl.uniprot.org/database/MIM> .
18
    }
19
  }
20
}
Use

79_mnemonic_also_known_as_id: List all UniProtKB protein ID (mnemonic) for current UniProtKB entries.

xxxxxxxxxx
10
 
1
PREFIX up: <http://purl.uniprot.org/core/>
2
SELECT
3
  ?uniprot ?mnemonic 
4
WHERE
5
{
6
  GRAPH <http://sparql.uniprot.org/uniprot> {
7
        ?uniprot a up:Protein ;
8
            up:mnemonic ?mnemonic .
9
    }
10
}
Use

80_obsolete_mnemonic_also_known_as_id: List all UniProtKB protein ID (mnemonic) that where used in the past for current UniProtKB entries.

xxxxxxxxxx
10
 
1
PREFIX up: <http://purl.uniprot.org/core/>
2
SELECT
3
  ?uniprot ?obsoleteMnemonic 
4
WHERE
5
{
6
  GRAPH <http://sparql.uniprot.org/uniprot> {
7
        ?uniprot a up:Protein ;
8
            up:oldMnemonic ?obsoleteMnemonic .
9
    }
10
}
Use

81_rhea_reactions_annotated_as_experimental_and_only_small_molecules: Find all Rhea (only small molecule) that are used in UniProtKB where the annotation has a paper and is tagged having experimental evidence.

xxxxxxxxxx
31
 
1
PREFIX ECO: <http://purl.obolibrary.org/obo/ECO_>
2
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
3
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
4
PREFIX rh: <http://rdf.rhea-db.org/>
5
PREFIX up: <http://purl.uniprot.org/core/>
6
SELECT
7
  ?rhea 
8
  ?catalyzedReaction 
9
  ?source
10
WHERE {
11
  {  
12
    SELECT 
13
      DISTINCT 
14
        ?rhea
15
      WHERE {
16
        GRAPh<https://sparql.rhea-db.org/rhea> {
17
          ?rhea rdfs:subClassOf rh:Reaction .
18
          ?rhea rh:side/rh:contains/rh:compound ?compound2 . 
19
          ?uc rdfs:subClassOf rh:Compound .
20
        }
21
        ?compound2 rdfs:subClassOf ?uc . 
22
        BIND(IF(?uc = rh:SmallMolecule, 0, 1) AS ?c)  
23
     } GROUP BY ?rhea  HAVING (SUM(?c) = 0)
24
  }
25
  ?catalyzedReaction up:catalyzedReaction ?rhea .
26
  ?reif rdf:object ?catalyzedReaction ;
27
        up:attribution ?attr .
28
  ?attr up:evidence ECO:0000269 ;
29
        up:source ?source .
30
  ?source a up:Citation .
31
}
Use

82_rhea_reactions_associated_with_ec_in_uniprotkb: List Rhea reactions associated with an EC (enzyme classification).

xxxxxxxxxx
8
 
1
PREFIX up: <http://purl.uniprot.org/core/>
2
SELECT 
3
  ?rhea 
4
  ?EC 
5
WHERE {
6
  ?CatalyticActivity  up:catalyzedReaction   ?rhea ;
7
    up:enzymeClass         ?EC .
8
}
Use

83_rhea_reactions_not_associated_with_ec_in_uniprotkb: List Rhea reactions that are not associated with an EC (enzyme classification).

xxxxxxxxxx
10
 
1
PREFIX up: <http://purl.uniprot.org/core/>
2
SELECT 
3
  ?rhea 
4
  ?EC 
5
WHERE {
6
  ?CatalyticActivity up:catalyzedReaction ?rhea .
7
  MINUS {
8
    ?CatalyticActivity up:enzymeClass ?EC .
9
  }
10
}
Use

84_taxonomy_hierarchy: Find all taxonomic records that describe species of the genus Homo.

xxxxxxxxxx
14
 
1
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
2
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
3
PREFIX up: <http://purl.uniprot.org/core/>
4
SELECT 
5
  ?species 
6
  ?genus 
7
WHERE {
8
  BIND(taxon:9605 AS ?genus)
9
  ?species a up:Taxon ;
10
           up:rank up:Species ;
11
           rdfs:subClassOf ?genus .
12
  ?genus a up:Taxon ;
13
         up:rank up:Genus .
14
}
Use

85_taxonomy_host: Find taxon records that are known to have part of their life cycle in other organisms (e.g. parasite, symbiont, infection)

xxxxxxxxxx
7
 
1
PREFIX up: <http://purl.uniprot.org/core/>
2
SELECT 
3
  ?virus 
4
  ?host 
5
WHERE {
6
    ?virus up:host ?host .
7
}
Use

86_taxonomy_rank_and_scientific_name: Retrieve the rank and the scientific name of an taxonomic record. Not all taxonomic records have a rank associated with them.

xxxxxxxxxx
12
 
1
PREFIX up: <http://purl.uniprot.org/core/>
2
SELECT
3
  ?taxon 
4
  ?scientificName
5
  ?rank
6
WHERE {
7
  ?taxon a up:Taxon ;
8
         up:scientificName ?scientificName .
9
  OPTIONAL {
10
    ?taxon up:rank ?rank
11
  }
12
}
Use

87_taxonomy_with_at_least_one_swissprot: Find taxon records for which one reviewed UniProtKB/Swiss-Prot entry exists. We might expect species, strains, subspecies and isolates in the taxon list.

xxxxxxxxxx
23
 
1
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
2
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
3
PREFIX up: <http://purl.uniprot.org/core/>
4
SELECT
5
    DISTINCT
6
         ?taxid
7
         ?scientificName
8
         ?domain
9
         ?domainName
10
WHERE {
11
  ?uniprot a up:Protein .
12
  # reviewed entries
13
  ?uniprot up:reviewed true .
14
  ?uniprot up:organism ?taxid . 
15
  ?taxid up:scientificName ?scientificName .
16
    
17
  VALUES ?domain { taxon:2 # bacteria
18
                   taxon:2157 # archaea
19
                   taxon:2759 # eukaryota
20
                   taxon:10239 #viruses
21
                 } .
22
  ?taxid rdfs:subClassOf ?domain .
23
}
Use

88_uniparc_linked_to_active_uniprot: Show for a given UniParc accessions which active UniProtKB entries have the same amino acid sequence

xxxxxxxxxx
13
 
1
PREFIX up: <http://purl.uniprot.org/core/>
2
SELECT 
3
  ?uniparc
4
  ?uniprot
5
WHERE {
6
  GRAPH <http://sparql.uniprot.org/uniparc>{
7
    BIND(<http://purl.uniprot.org/uniparc/UPI000002DB1C> AS ?uniparc) 
8
    ?uniparc up:sequenceFor ?uniprot .
9
  }
10
  GRAPH <http://sparql.uniprot.org/uniprot> {
11
    ?uniprot a up:Protein .
12
  }
13
}
Use

89_uniparc_triples_directly_associated: Predicates and objects, for a given UniParc accession as a subject

xxxxxxxxxx
7
 
1
PREFIX up: <http://purl.uniprot.org/core/>
2
SELECT 
3
  ?predicate 
4
  ?object 
5
WHERE { 
6
  <http://purl.uniprot.org/uniparc/UPI000012A0AD> ?predicate ?object
7
}
Use

90_uniprot_affected_by_metabolic_diseases_using_MeSH: Proteins involved in metabolic diseases in UniProtKB. Using the MeSH concept as a root to find metabolic diseases in UniProt.

xxxxxxxxxx
21
 
1
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
2
PREFIX up: <http://purl.uniprot.org/core/>
3
SELECT
4
 ?disease ?protein
5
WHERE {
6
  SERVICE<https://id.nlm.nih.gov/mesh/sparql> {
7
    GRAPH <http://id.nlm.nih.gov/mesh> {
8
      # Mesh M0013493 is a meaningless gathering about the concept 'Metabolic Diseases'
9
      ?mesh <http://id.nlm.nih.gov/mesh/vocab#broaderDescriptor>* ?broader .
10
      ?broader <http://id.nlm.nih.gov/mesh/vocab#preferredConcept> <http://id.nlm.nih.gov/mesh/M0013493> .
11
    }
12
  }
13
  GRAPH <http://sparql.uniprot.org/diseases>{
14
    ?disease a up:Disease ;
15
        rdfs:seeAlso ?mesh .
16
    ?mesh up:database <http://purl.uniprot.org/database/MeSH> .
17
  }
18
  GRAPH <http://sparql.uniprot.org/uniprot> {
19
     ?protein up:annotation/up:disease ?disease . 
20
  }
21
}
Use

91_uniprot_alternative_protein_full_name: Alternative protein full names for UniProtKB entries

xxxxxxxxxx
8
 
1
PREFIX up: <http://purl.uniprot.org/core/>
2
SELECT ?protein 
3
  ?fullName
4
WHERE {
5
  ?protein a up:Protein ;
6
           up:alternativeName ?recommendedName .
7
  ?recommendedName up:fullName ?fullName .
8
}
Use

92_uniprot_bioregistry_iri_translation: Translate the global unique identifier for a UniProtKB record into other options using the bioregistry translating endpoint.

xxxxxxxxxx
13
 
1
PREFIX owl: <http://www.w3.org/2002/07/owl#>
2
PREFIX uniprotkb: <http://purl.uniprot.org/uniprot/>
3
PREFIX up: <http://purl.uniprot.org/core/>
4
SELECT 
5
    ?protein 
6
    ?otherIdentifier
7
WHERE {
8
    BIND(uniprotkb:P00750 AS ?protein)
9
    ?protein a up:Protein .
10
    SERVICE <https://bioregistry.io/sparql> {
11
        ?protein owl:sameAs ?otherIdentifier .
12
    }
13
}
Use