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 taxa_with_state.rq #7

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
14 changes: 11 additions & 3 deletions taxa_with_state.rq
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,29 @@ PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX StandardState: <http://purl.obolibrary.org/obo/CDAO_0000045>
PREFIX bd: <http://www.bigdata.com/rdf/search#>
# Replace the prefix value with the state URI of interest
PREFIX characterstate: <http://purl.org/phenoscape/uuid/528ce2b2-1710-4ea4-87da-ee7ec4a9bc57>
#PREFIX characterstate: <http://purl.org/phenoscape/uuid/528ce2b2-1710-4ea4-87da-ee7ec4a9bc57>
PREFIX has_state: <http://purl.obolibrary.org/obo/CDAO_0000184>
PREFIX has_tu: <http://purl.obolibrary.org/obo/CDAO_0000208>
PREFIX belongs_to_tu: <http://purl.obolibrary.org/obo/CDAO_0000191>
PREFIX has_external_reference: <http://purl.obolibrary.org/obo/CDAO_0000164>
PREFIX hint: <http://www.bigdata.com/queryHints#>

SELECT DISTINCT ?taxon ?taxon_label ?matrix_label
FROM <http://kb.phenoscape.org/>
WHERE
{
?cell has_state: characterstate: .
?cell has_state: ?character_state .
?cell belongs_to_tu: ?otu .
?otu has_external_reference: ?taxon .
?taxon rdfs:label ?taxon_label .
?matrix has_tu: ?otu .
?matrix rdfs:label ?matrix_label .
{
# This subselect grabs a random character state. Replace
# ?character_state in the above with a specific URI if desired.
SELECT ?character_state WHERE {
?character_state rdf:type StandardState:
} LIMIT 1
}
hint:Prior hint:runFirst true .
}