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

CAS input doesn't work in Structure Sketcher node #15

Open
iwwwish opened this issue Dec 11, 2020 · 0 comments
Open

CAS input doesn't work in Structure Sketcher node #15

iwwwish opened this issue Dec 11, 2020 · 0 comments

Comments

@iwwwish
Copy link

iwwwish commented Dec 11, 2020

Hi,

I suppose the issue is with the URLs in the getMoleculeFromCAS(String cas) method in InsertTextPanel.java. As NCBI switched to HTTPS, this method now returns null. I could get the method working with the following changes:

Edit 1:
String firstURL = "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=pccompound&term=" + cas;
(change to https)

Edit 2:
Pattern pattern = Pattern.compile("http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi\\?cid=(\\d*)");
(change the regex string to https://pubchem.ncbi.nlm.nih.gov/compound/(\\d*))

Edit 3:
String secondURL = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?tool=jcppubchem&db=pccompound&id=" + cid;
(change to https)

Edit 4:
pattern = Pattern.compile("<Item Name=\"CanonicalSmile\" Type=\"String\">([^\\s]*?)</Item>");
(change CanonicalSmile to CanonicalSmiles)

Is it possible to release a new version of jchempaint-hotfix-3.4.jar? I would like to use the sketcher panel in the development of a new KNIME node.

Thank you,
Vishal

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