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

Default parameter type interpreted as URI not string #222

Open
albertmeronyo opened this issue Sep 6, 2019 · 0 comments
Open

Default parameter type interpreted as URI not string #222

albertmeronyo opened this issue Sep 6, 2019 · 0 comments

Comments

@albertmeronyo
Copy link
Member

?_inchiKey in this query is treated as URI but should be string

#+ endpoint: https://query.wikidata.org/sparql
#+ method: GET
#+ pagination: 50
#+ tags:
#+   - wikidata
#+ defaults:
#+   - inchiKey: "IYRMWMYZSQPJKC-UHFFFAOYSA-N"

PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd:  <http://www.wikidata.org/entity/>

SELECT ?moleculeLabel ?formula ?smiles ?inchikey ?inchi ?logp ?molweight
WHERE {
    ?molecule_iri wdt:P274 ?formula .
    ?molecule_iri rdfs:label ?moleculeLabel
    FILTER (langMatches( lang(?moleculeLabel), "EN" ) )
    OPTIONAL {?molecule_iri wdt:P233 ?smiles .}
    {?molecule_iri wdt:P235 ?_inchikey ; wdt:P234 ?inchi .}
    OPTIONAL {?molecule_iri wdt:P2993 ?logp .}
    OPTIONAL {?molecule_iri wdt:P2067 ?molweight .}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant