User:Egonw/HBM4EU
Jump to navigation
Jump to search
Adding HBM4EU substances
See https://www.hbm4eu.eu/wp-content/uploads/2021/03/HBM4EU_D4.9_Scoping_Documents_HBM4EU_priority_substances_v1.0.pdf (next: page 66)
Using this query to get bisphenols from Wikidata:
SELECT ?smiles (SUBSTR(STR(?bisphenol),32) AS ?qid) ?bisphenolLabel WHERE { ?bisphenol wdt:P31/wdt:P279* wd:Q424197 . OPTIONAL { ?bisphenol wdt:P233 ?canSMI } OPTIONAL { ?bisphenol wdt:P2017 ?isoSMI } BIND (COALESCE(?isoSMI, ?canSMI) AS ?smiles) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
This is processed with:
groovy createWDitemsFromSMILES.groovy -w compoundcloud.wikibase.cloud -c Q57 -d P5 -l -i wikidata -a P11
Removed the unit (broken in Wikibase), fixed the "-c" which still uses P31.