Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update list_state_counterparts.rq #5

Merged
merged 2 commits into from
Nov 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions list_state_counterparts.rq
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
# List all states which are values for a character
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX ps: <http://purl.org/phenoscape/vocab.owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX StandardState: <http://purl.obolibrary.org/obo/CDAO_0000045>
PREFIX StandardCharacter: <http://purl.obolibrary.org/obo/CDAO_0000075>
PREFIX bd: <http://www.bigdata.com/rdf/search#>
# replace the value of the following prefix with the character URI of interest
PREFIX character: <http://purl.org/phenoscape/uuid/61c0481d-0f82-4b32-97b1-5b8c8f2eece3>
PREFIX hint: <http://www.bigdata.com/queryHints#>

SELECT DISTINCT ?state ?state_label
SELECT DISTINCT ?character_label ?state ?state_label
FROM <http://kb.phenoscape.org/>
WHERE
{
character: ps:may_have_state_value ?state .
?character ps:may_have_state_value ?state .
?state dc:description ?state_label .
?character rdfs:label ?character_label
{
# This subselect grabs a random character state. Replace
# ?character_state in the above with a specific URI if desired.
SELECT ?character WHERE {
?character rdf:type StandardCharacter:
} LIMIT 1
}
hint:Prior hint:runFirst true .
}