diff --git a/examples/uniprot/obsolete_mnemonic_also_known_as_id.ttl b/examples/uniprot/obsolete_mnemonic_also_known_as_id.ttl new file mode 100644 index 000000000..ad88471bb --- /dev/null +++ b/examples/uniprot/obsolete_mnemonic_also_known_as_id.ttl @@ -0,0 +1,22 @@ +prefix ex: +prefix up: +prefix sh: +prefix schema: +prefix rdf: +prefix faldo: +prefix rdfs: + +ex:obsolete_mnemonic_also_known_as_id + a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + sh:prefixes _:sparql_examples_prefixes ; + schema:target ; + rdfs:comment """List all UniProt protein ID (mnemonic) that where used in the past for current UniProt entries.""" ; + sh:select """SELECT + ?uniprot ?obsoleteMnemonic +WHERE +{ + GRAPH { + ?uniprot a up:Protein ; + up:oldMnemonic ?obsoleteMnemonic . + } +}""" . diff --git a/examples/uniprot/taxonomy_hierarchy.ttl b/examples/uniprot/taxonomy_hierarchy.ttl new file mode 100644 index 000000000..94267a193 --- /dev/null +++ b/examples/uniprot/taxonomy_hierarchy.ttl @@ -0,0 +1,24 @@ +prefix ex: +prefix up: +prefix sh: +prefix schema: +prefix rdf: +prefix faldo: +prefix rdfs: + +ex:taxonomy_hierarchy + a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + sh:prefixes _:sparql_examples_prefixes ; + schema:target ; + rdfs:comment """Find all taxonomic records that describe species of the genus Homo."""^^rdf:HTML ; + sh:select """SELECT + ?species + ?genus +WHERE { + BIND(taxon:9605 AS ?genus) + ?species a up:Taxon ; + up:rank up:Species ; + rdfs:subClassOf ?genus . + ?genus a up:Taxon ; + up:rank up:Genus . +}""" . diff --git a/examples/uniprot/taxonomy_host.ttl b/examples/uniprot/taxonomy_host.ttl new file mode 100644 index 000000000..4b4a36b6c --- /dev/null +++ b/examples/uniprot/taxonomy_host.ttl @@ -0,0 +1,19 @@ +prefix ex: +prefix up: +prefix sh: +prefix schema: +prefix rdf: +prefix faldo: +prefix rdfs: + +ex:taxonomy_host + a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + sh:prefixes _:sparql_examples_prefixes ; + schema:target ; + rdfs:comment """Find taxon records that are known to have part of their life cycle in other organisms (e.g. parasite, symbiont, infection)"""^^rdf:HTML ; + sh:select """SELECT + ?virus + ?host +WHERE { + ?virus up:host ?host . +}""" . diff --git a/examples/uniprot/taxonomy_rank_and_scientific_name.ttl b/examples/uniprot/taxonomy_rank_and_scientific_name.ttl new file mode 100644 index 000000000..c1ca82dfe --- /dev/null +++ b/examples/uniprot/taxonomy_rank_and_scientific_name.ttl @@ -0,0 +1,24 @@ +prefix ex: +prefix up: +prefix sh: +prefix schema: +prefix rdf: +prefix faldo: +prefix rdfs: + +ex:taxonomy_rank_and_scientific_name + a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + sh:prefixes _:sparql_examples_prefixes ; + schema:target ; + rdfs:comment """Retrieve the rank and the scientific name of an taxonomic record. Not all taxonomic records have a rank associated with them."""^^rdf:HTML ; + sh:select """SELECT + ?taxon + ?scientificName + ?rank +WHERE { + ?taxon a up:Taxon ; + up:scientificName ?scientificName . + OPTIONAL { + ?taxon up:rank ?rank + } +}""" . diff --git a/examples/uniprot/taxonomy_with_at_least_one_swissprot.ttl b/examples/uniprot/taxonomy_with_at_least_one_swissprot.ttl new file mode 100644 index 000000000..720053e03 --- /dev/null +++ b/examples/uniprot/taxonomy_with_at_least_one_swissprot.ttl @@ -0,0 +1,34 @@ +prefix ex: +prefix up: +prefix sh: +prefix schema: +prefix rdf: +prefix faldo: +prefix rdfs: + +ex:taxonomy_with_at_least_one_swissprot + a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + sh:prefixes _:sparql_examples_prefixes ; + schema:target ; + rdfs:comment """Find taxon records for which one reviewed UniProtKB (Swiss-Prot) entry exists"""^^rdf:HTML ; + sh:select """ +SELECT + DISTINCT + ?taxid + ?scientificName + ?domain + ?domainName +WHERE { + ?uniprot a up:Protein . + # reviewed entries + ?uniprot up:reviewed true . + ?uniprot up:organism ?taxid . + ?taxid up:scientificName ?scientificName . + + VALUES ?domain { taxon:2 # bacteria + taxon:2157 # archaea + taxon:2759 # eukaryota + taxon:10239 #viruses + } . + ?taxid rdfs:subClassOf ?domain . +}""" . diff --git a/examples/uniprot/uniprot_alternative_protein_full_name.ttl b/examples/uniprot/uniprot_alternative_protein_full_name.ttl new file mode 100644 index 000000000..8e44080b7 --- /dev/null +++ b/examples/uniprot/uniprot_alternative_protein_full_name.ttl @@ -0,0 +1,20 @@ +prefix ex: +prefix up: +prefix sh: +prefix schema: +prefix rdf: +prefix faldo: +prefix rdfs: + +ex:uniprot_alternative_protein_full_name + a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + sh:prefixes _:sparql_examples_prefixes ; + schema:target ; + rdfs:comment """Alternative protein full names for UniProtKB entries""" ; + sh:select """SELECT ?protein + ?fullName +WHERE { + ?protein a up:Protein ; + up:alternativeName ?recommendedName . + ?recommendedName up:fullName ?fullName . +}""" . diff --git a/examples/uniprot/uniprot_created_modified_updated.ttl b/examples/uniprot/uniprot_created_modified_updated.ttl new file mode 100644 index 000000000..c2a6e2d31 --- /dev/null +++ b/examples/uniprot/uniprot_created_modified_updated.ttl @@ -0,0 +1,24 @@ +prefix ex: +prefix up: +prefix sh: +prefix schema: +prefix rdf: +prefix faldo: +prefix rdfs: + +ex:uniprot_created_modified_updated + a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + sh:prefixes _:sparql_examples_prefixes ; + schema:target ; + rdfs:comment """List the created, last modified, and last sequence update dates for UniProtKB proteins.""" ; + sh:select """SELECT + ?protein + ?created + ?modified + ?version +WHERE { + ?protein a up:Protein ; + up:created ?created ; + up:modified ?modified ; + up:version ?version . +}""" . diff --git a/examples/uniprot/uniprot_encoding_gene.ttl b/examples/uniprot/uniprot_encoding_gene.ttl new file mode 100644 index 000000000..8fe1d56b2 --- /dev/null +++ b/examples/uniprot/uniprot_encoding_gene.ttl @@ -0,0 +1,19 @@ +prefix ex: +prefix up: +prefix sh: +prefix schema: +prefix rdf: +prefix faldo: +prefix rdfs: + +ex:uniprot_encoding_gene + a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + sh:prefixes _:sparql_examples_prefixes ; + schema:target ; + rdfs:comment """List UniProt proteins with their associated named gene""" ; + sh:select """SELECT ?protein + ?gene +WHERE { + ?protein a up:Protein ; + up:encodedBy ?gene . +}""" . diff --git a/examples/uniprot/uniprot_encoding_gene_alternative_names.ttl b/examples/uniprot/uniprot_encoding_gene_alternative_names.ttl new file mode 100644 index 000000000..ce9c5e118 --- /dev/null +++ b/examples/uniprot/uniprot_encoding_gene_alternative_names.ttl @@ -0,0 +1,20 @@ +prefix ex: +prefix up: +prefix sh: +prefix schema: +prefix rdf: +prefix faldo: +prefix rdfs: + +ex:uniprot_encoding_gene_name_alternative_name + a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + sh:prefixes _:sparql_examples_prefixes ; + schema:target ; + rdfs:comment """List UniProt proteins with their associated gene and the gene's names that are used in the field, but not recommeded for use by UniProt""" ; + sh:select """SELECT ?protein + ?gene ?altGeneName +WHERE { + ?protein a up:Protein ; + up:encodedBy ?gene . + ?gene skos:altLabel ?altGeneName . +}""" . diff --git a/examples/uniprot/uniprot_encoding_gene_name.ttl b/examples/uniprot/uniprot_encoding_gene_name.ttl new file mode 100644 index 000000000..a908474a8 --- /dev/null +++ b/examples/uniprot/uniprot_encoding_gene_name.ttl @@ -0,0 +1,20 @@ +prefix ex: +prefix up: +prefix sh: +prefix schema: +prefix rdf: +prefix faldo: +prefix rdfs: + +ex:uniprot_encoding_gene_name + a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + sh:prefixes _:sparql_examples_prefixes ; + schema:target ; + rdfs:comment """List UniProt proteins with their associated gene and the gene's preffered name""" ; + sh:select """SELECT ?protein + ?gene +WHERE { + ?protein a up:Protein ; + up:encodedBy ?gene . + ?gene skos:prefLabel ?recommendedGeneName . +}""" . diff --git a/examples/uniprot/uniprot_encoding_gene_org_name.ttl b/examples/uniprot/uniprot_encoding_gene_org_name.ttl new file mode 100644 index 000000000..3fd44a9c5 --- /dev/null +++ b/examples/uniprot/uniprot_encoding_gene_org_name.ttl @@ -0,0 +1,21 @@ +prefix ex: +prefix up: +prefix sh: +prefix schema: +prefix rdf: +prefix faldo: +prefix rdfs: + +ex:uniprot_encoding_gene_org_name + a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + sh:prefixes _:sparql_examples_prefixes ; + schema:target ; + rdfs:comment """List UniProt proteins with their associated gene and the gene's ORF label""" ; + sh:select """SELECT + ?gene + ?orfName +WHERE { + ?protein a up:Protein ; + up:encodedBy ?gene . + ?gene up:orfName ?orfName . +}""" . diff --git a/examples/uniprot/uniprot_organelles_or_plasmids.ttl b/examples/uniprot/uniprot_organelles_or_plasmids.ttl new file mode 100644 index 000000000..06678bc1e --- /dev/null +++ b/examples/uniprot/uniprot_organelles_or_plasmids.ttl @@ -0,0 +1,24 @@ +prefix ex: +prefix up: +prefix sh: +prefix schema: +prefix rdf: +prefix faldo: +prefix rdfs: + +ex:uniprot_organelles_or_plasmids + a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + sh:prefixes _:sparql_examples_prefixes ; + schema:target ; + rdfs:comment """If a gene is located in an organelle other than the nucleus, or/and on a plasmid rather than a chromosome, the gene location is stored in encodedIn properties. Note that if a plasmid has several names, they are listed as multiple rdfs:label properties."""^^rdf:HTML ; + sh:select """SELECT + ?protein + ?plasmidOrOrganelle + ?label +WHERE { + ?protein a up:Protein ; + up:encodedIn ?plasmidOrOrganelle . + OPTIONAL { + ?plasmidOrOrganelle rdfs:label ?label . + } +}""" . diff --git a/examples/uniprot/uniprot_primary_accession.ttl b/examples/uniprot/uniprot_primary_accession.ttl new file mode 100644 index 000000000..4966498fd --- /dev/null +++ b/examples/uniprot/uniprot_primary_accession.ttl @@ -0,0 +1,20 @@ +prefix ex: +prefix up: +prefix sh: +prefix schema: +prefix rdf: +prefix faldo: +prefix rdfs: + +ex:uniprot_primary_accession + a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + sh:prefixes _:sparql_examples_prefixes ; + schema:target ; + rdfs:comment """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 completly wrong records."""; + sh:select """SELECT + ?primaryAccession + ?protein +WHERE { + ?protein a up:Protein . + BIND(substr(str(?protein), strlen(str(uniprotkb:))+1) AS ?primaryAccession) +}""" . diff --git a/examples/uniprot/uniprot_proteome_location_of_gene.ttl b/examples/uniprot/uniprot_proteome_location_of_gene.ttl new file mode 100644 index 000000000..1eaf71433 --- /dev/null +++ b/examples/uniprot/uniprot_proteome_location_of_gene.ttl @@ -0,0 +1,27 @@ +prefix ex: +prefix up: +prefix sh: +prefix schema: +prefix rdf: +prefix faldo: +prefix rdfs: + +ex:uniprot_proteome_location_of_gene + a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + sh:prefixes _:sparql_examples_prefixes ; + schema:target ; + rdfs:comment """List UniProt proteins with genetic replicon that they are encoded on using the Proteome data.""" ; + sh:select """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 ) +}""" . diff --git a/examples/uniprot/uniprot_recomended_protein_full_name.ttl b/examples/uniprot/uniprot_recomended_protein_full_name.ttl new file mode 100644 index 000000000..1ab77517f --- /dev/null +++ b/examples/uniprot/uniprot_recomended_protein_full_name.ttl @@ -0,0 +1,20 @@ +prefix ex: +prefix up: +prefix sh: +prefix schema: +prefix rdf: +prefix faldo: +prefix rdfs: + +ex:uniprot_recomended_protein_full_name + a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + sh:prefixes _:sparql_examples_prefixes ; + schema:target ; + rdfs:comment """The recommended protein full names for UniProtKB entries""" ; + sh:select """SELECT ?protein + ?fullName +WHERE { + ?protein a up:Protein ; + up:recommendedName ?recommendedName . + ?recommendedName up:fullName ?fullName . +}""" . diff --git a/examples/uniprot/uniprot_recomended_protein_short_name.ttl b/examples/uniprot/uniprot_recomended_protein_short_name.ttl new file mode 100644 index 000000000..985599b40 --- /dev/null +++ b/examples/uniprot/uniprot_recomended_protein_short_name.ttl @@ -0,0 +1,20 @@ +prefix ex: +prefix up: +prefix sh: +prefix schema: +prefix rdf: +prefix faldo: +prefix rdfs: + +ex:uniprot_recomended_protein_short_name + a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + sh:prefixes _:sparql_examples_prefixes ; + schema:target ; + rdfs:comment """The recommended protein short names for UniProtKB entries""" ; + sh:select """SELECT ?protein + ?fullName +WHERE { + ?protein a up:Protein ; + up:recommendedName ?recommendedName . + ?recommendedName up:shortName ?fullName . +}""" . diff --git a/examples/uniprot/uniprot_reviewed_or_not.ttl b/examples/uniprot/uniprot_reviewed_or_not.ttl new file mode 100644 index 000000000..24949e5ae --- /dev/null +++ b/examples/uniprot/uniprot_reviewed_or_not.ttl @@ -0,0 +1,20 @@ +prefix ex: +prefix up: +prefix sh: +prefix schema: +prefix rdf: +prefix faldo: +prefix rdfs: + +ex:uniprot_reviewed_or_not + a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + sh:prefixes _:sparql_examples_prefixes ; + schema:target ; + rdfs:comment """List all UniProt protein and if they are reviewed (Swiss-Prot) or unreviewed (TrEMBL)""" ; + sh:select """SELECT + ?protein + ?reviewed +WHERE { + ?protein a up:Protein . + ?protein up:reviewed ?reviewed . +}""" . diff --git a/examples/uniprot/uniprot_unamed_plasmids.ttl b/examples/uniprot/uniprot_unamed_plasmids.ttl new file mode 100644 index 000000000..909fe9bd6 --- /dev/null +++ b/examples/uniprot/uniprot_unamed_plasmids.ttl @@ -0,0 +1,24 @@ +prefix ex: +prefix up: +prefix sh: +prefix schema: +prefix rdf: +prefix faldo: +prefix rdfs: + +ex:uniprot_unamed_plasmids + a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + sh:prefixes _:sparql_examples_prefixes ; + schema:target ; + rdfs:comment """Sometimes it is known that a gene encoding a protein UniProtKB is located on a plasmid, but the name of the plasmid is unknown.""" ; + sh:select """SELECT + ?protein + ?plasmidOrOrganelle + ?label +WHERE { + ?protein a up:Protein ; + up:encodedIn ?plasmidOrOrganelle . + OPTIONAL { + ?plasmidOrOrganelle rdfs:label ?label . + } +}""" .