A set of SPARQL examples that are used in different SIB resources
Proteins involved in coronaviruses/SARS-CoV-2 pathways with associated medical information
PREFIX : <http://nextprot.org/rdf/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wp: <http://vocabularies.wikipathways.org/wp#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT ?entry (str(?gen) AS ?gene) ?pathwayname (str(?discom) AS ?discom1) ?medsource WHERE {
SERVICE <http://sparql.wikipathways.org/sparql> {
{?geneProduct a wp:Protein}
union
{?geneProduct a wp:GeneProduct}
?geneProduct rdfs:label ?genraw .
bind (concat( ""^^xsd:string, ?genraw) as ?gen).
filter(!regex(?gen,"[ a-z-]")). # ensures official gene names for subsequent neXtprot matching
?geneProduct dcterms:isPartOf ?pathway .
?pathway a wp:Pathway .
?pathway wp:organism ?organism .
filter(contains(str(?organism),"9606"))
?pathway dcterms:title ?pathwayname .
filter(regex(?pathwayname,"sars-cov-2","i")|| regex(?pathwayname,"corona","i") ).
}
?entry a :Entry .
?entry :gene / :recommendedName / rdfs:label ?gen .
?entry :isoform ?iso.
?iso :medical ?med.
?med rdfs:comment ?discom.
?med :evidence/:assignedBy ?medsource.
}
order by ?entry