gentle smiles parsing for lookup #20
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The ChEBI lookup parses SMILES without sanitization now. This ensures that even "wonky" SMILES get looked up (i.e., SMILES that can be parsed, but not sanitized).
For example:
[H][C@@]12NC(=O)[C@@H](c3cc(Cl)c(O)c(Cl)c3)NC(=O)[C@H](NC(=O)C(=O)c3cc(Cl)c(O)c(Cl)c3)Cc3cnc4c(cccc34)-c3cc1cc(c3O)Oc1ccc(cc1)C[C@@]([H])(C(=O)N[C@@H](C(=O)O)c1ccc(O)cc1)N(C)C(=O)[C@@H](c1cc(Cl)c(O)c(Cl)c1)NC2=Ocan now be looked up (CHEBI:65618). In practice, this still fails for v244 because the SMILES representation in ChEBI changed between the SMILES shown here and the SMILES from v244. However, if we update the SMILES lookup to a newer version in the future, this might actually work.