Skip to content

Commit d95bc41

Browse files
committed
New example
1 parent 41ae8a8 commit d95bc41

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

pages/sparql.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,25 @@ WHERE {
115115
} LIMIT 10
116116
```
117117

118+
#### Get protein metadata from uniprot based on identifiers.org URI [1].
119+
{: .mt-2}
120+
[See in web interface](https://sparql.api.identifiers.org?query=PREFIX%20owl%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23%3E%0APREFIX%20skos%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore%23%3E%0APREFIX%20up%3A%20%3Chttp%3A%2F%2Fpurl.uniprot.org%2Fcore%2F%3E%0A%0ASELECT%20%2A%20WHERE%20%7B%0A%20%20%3Chttp%3A%2F%2Fidentifiers.org%2Funiprot%3AP12345%3E%20owl%3AsameAs%20%3Fprotein%20.%0A%20%20SERVICE%20%3Chttps%3A%2F%2Fsparql.uniprot.org%2Fsparql%3E%20%7B%0A%20%20%20%20%3Fprotein%20a%20up%3AProtein%20%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20up%3AencodedBy%20%5B%20skos%3AprefLabel%20%3Fname%20%5D%20.%0A%20%20%7D%0A%7D%0ALIMIT%201)
121+
122+
```sparql
123+
PREFIX owl: <http://www.w3.org/2002/07/owl#>
124+
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
125+
PREFIX up: <http://purl.uniprot.org/core/>
126+
127+
SELECT * WHERE {
128+
<http://identifiers.org/uniprot:P12345> owl:sameAs ?protein .
129+
SERVICE <https://sparql.uniprot.org/sparql> {
130+
?protein a up:Protein ;
131+
up:encodedBy [ skos:prefLabel ?name ] .
132+
}
133+
}
134+
LIMIT 1
135+
```
136+
118137

119138

120139
#### List homo-sapiens proteins with their uniprot URI and alternative URI [2].

0 commit comments

Comments
 (0)