sparql-examples

A set of SPARQL examples that are used in different SIB resources

View the Project on GitHub sib-swiss/sparql-examples

15-rat-TP53-biosodafrontend

rq turtle/ttl

Rattus norvegicus' proteins encoded by genes that are paralogous to its TP53 gene and their Uniprot function annotations.

Use at

PREFIX up: <http://purl.uniprot.org/core/>
PREFIX orth: <http://purl.org/net/orth#>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX lscr: <http://purl.org/lscr#>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?PROTEIN ?IS_PARALOGOUS_TO_PROTEIN ?UNIPROT_XREF ?PARALOG_UNIPROT_XREF ?annotation_text WHERE {
	{
		?cluster a orth:ParalogsCluster .
		?cluster orth:hasHomologousMember ?node1 .
		?cluster orth:hasHomologousMember ?node2 .
		?node2 orth:hasHomologousMember* ?PROTEIN .
		?node1 orth:hasHomologousMember* ?IS_PARALOGOUS_TO_PROTEIN .
		?PROTEIN a orth:Protein .
		?PROTEIN orth:organism/obo:RO_0002162/up:scientificName 'Rattus norvegicus' ;
			rdfs:label 'TP53' ;
			lscr:xrefUniprot ?UNIPROT_XREF .
		?IS_PARALOGOUS_TO_PROTEIN a orth:Protein .
		?IS_PARALOGOUS_TO_PROTEIN orth:organism/obo:RO_0002162/up:scientificName 'Rattus norvegicus' .
		?IS_PARALOGOUS_TO_PROTEIN lscr:xrefUniprot ?PARALOG_UNIPROT_XREF .
	}
	SERVICE <https://sparql.uniprot.org/sparql> {
		?PARALOG_UNIPROT_XREF up:annotation ?annotation .
		?annotation a up:Function_Annotation .
		?annotation rdfs:comment ?annotation_text .
	}
}
https://sparql.uniprot.org/sparql
a
orth:hasHomologousMember
orth:hasHomologousMember
orth:hasHomologousMember
orth:hasHomologousMember
a
orth:organism
obo:RO_0002162
up:scientificName
rdfs:label
lscr:xrefUniprot
a
orth:organism
obo:RO_0002162
up:scientificName
lscr:xrefUniprot
up:annotation
a
rdfs:comment
?annotation
?PARALOG_UNIPROT_XREF
up:Function_Annotation
?annotation_text
?IS_PARALOGOUS_TO_PROTEIN
?PROTEIN
?UNIPROT_XREF
?cluster
?node1
?node2
orth:ParalogsCluster
Rattus norvegicus
orth:Protein
TP53