qsar_ready and ms_ready SMILES inconsistent with the web tool

Open
#6 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api

Research direction

Start by comparing the response from the Python interface's chem.search and chem.details calls with the dashboard result for CASRN 50-00-0. Trace which API response supplies qsarReadySmiles and msReadySmiles, then verify that the interface returns C=O for both fields, matching the dashboard output.

Written by the indexing model from the issue text.

Description

When I try to get the chemical detail for formaldehyde from the Python interface by

formaldehyde = chem.search(by="equals", query="50-00-0")
chem.details(by="dtxcid", query = formaldehyde[0]["dtxcid"])

I get

...,
'qsarReadySmiles': '[14CH2]=O,[2H]C([2H])=O,[2H]C=O,[Al].[C]=O,[Al].C=O,[Cl-].[Cl-].[Ru+4].[CH-]=O.[CH-]=O,C=O,[Li+].C=O,[Na+].C=O,O.[C]=O,O.C=O,O.O.O.O.O.O.[C]=O,[Zn].C=O',
 'msReadySmiles': '[14CH2]=O,[2H]C([2H])=O,[2H]C=O,[3H]C=O,[Al].[C]=O,[Al].C=O,[Ba++].C=O.[O-]C1=CC=CC=C1.[O-]C1=CC=CC=C1,[Br-].[Re+].C#[O+].C#[O+].C#[O+].C#[O+].C#[O+],[Ca++].C=O.CC(C)(C)[CH-]C(C)(C)C1=CC=CC=C1[O-],[Ca++].C=O.[O-]S(=O)(=O)C1=CC2=CC=CC=C2C=C1,[Ca++].C=O.[O-]S(=O)(=O)C1=CC=CC2=CC=CC=C12.[O-]S(=O)(=O)C1=CC=CC2=CC=CC=C12,C=C.C=O.CCCCOC(=O)C=C,[Cl-].[Cl-].[Cl-].[Cl-].[Zn++].C=O.N#[N+]C1=CC=C(NC2=CC=CC=C2)C=C1.N#[N+]C1=CC=C(NC2=CC=CC=C2)C=C1,[Cl-].[Cl-].[Cl-].[Zn++].C=O.COC1=C(C=CC(=C1)[N+]#N)N1CCCC1,[Cl-].[Cl-].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O)=O,NO.[C]=O,N.O.O.C=O.CCCC(O)=O.CC1=CC=CC=C1,O.[C]=O,O.C=O,[OH-].[Na+].[Na+].[Na+].[Na+].[Na+].[Cu++].C=O.[O-]S([O-])(=O)=O.[O-]C(=O)CN(CCN(CC([O-])=O)CC([O-])=O)CC([O-])=O,OO.C=O,O.O.O.O.O.O.[C]=O,[Re][Re].C#[O+].C#[O+].C#[O+].C#[O+].C#[O+].C#[O+].C#[O+].C#[O+].C#[O+].C#[O+],[Rh+3].C=O.C1CCCC1.C1=CC=C(C=C1)[PH+](C1=CC=CC=C1)C1=CC=CC=C1,[Zn].C=O',
 ...

The dashboard, however, gives me the right result:

INPUT,FOUND_BY,DTXSID,PREFERRED_NAME,SMILES,MS_READY_SMILES,QSAR_READY_SMILES,MS_READY_MASS,MS_READY_FORMULAE
50-00-0,CASRN,DTXSID7020637,Formaldehyde,C=O,C=O,C=O,30.026,CH2O

It must have something to do with the API and not necessarily with the Python interface. I will open an issue there too.

Dominant language
Python
Stars
20
Forks
7
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from USEPA/ctx-python

All issues in USEPA/ctx-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.