Repository navigation
Add Wikidata compound identifier conversions - #186
Conversation
Co-authored-by: hechth <12066490+hechth@users.noreply.github.com>
|
@copilot also add non-mocked tests for aspirin |
Co-authored-by: hechth <12066490+hechth@users.noreply.github.com>
Added live, non-mocked aspirin lookups by name and CAS, and included canonical SMILES and PubChem CID (P233/P662) in the returned fields. Committed as |
|
@marvinm2 could you give the SPARQL queries a review and see if that fits? |
|
@copilot add additional conversions, starting from wikidataid and pubchemid, as well as inchi and inchikey |
Co-authored-by: hechth <12066490+hechth@users.noreply.github.com>
Added conversions from Wikidata QIDs, PubChem CIDs, InChI, and InChIKey to the available Wikidata attributes, with mocked query tests and live aspirin cases. Committed as |
Co-authored-by: hechth <12066490+hechth@users.noreply.github.com>
|
@copilot look at the other web converters and implement the same caching method in case multiple attributes are queried across jobs |
Co-authored-by: hechth <12066490+hechth@users.noreply.github.com>
|
|
I ran the queries against query.wikidata.org. They return the right values for aspirin, but two of them are slow.
P231, P662, P234 and P235 are plain string literals, so the The name search takes the first EntitySearch hit without checking that it's a chemical. "mercury" returns Q613883, and the element (Q925) is only the fifth hit. Asking for more hits and keeping the first one with a chemical identifier fixes that: Smaller thing: The QID lookup is fine, and using |
Add Wikidata lookups from compound names and CAS numbers to CAS, compound name, InChI, and InChIKey.