Question: in R package rcdk, to get the descriptor of some chemicals, eval.desc error when tackling some descriptor, such as BasicGroupCountDescriptor
1
gravatar for Zhilong Jia
6.6 years ago by
Zhilong Jia1.6k
London
Zhilong Jia1.6k wrote:

I want to get the descriptor of some compounds, but the function eval.desc alwayls tell error.

data:

CID: 175540  (CID_175540.sdf can be get from PubChem)

code

#! /usr/bin/Rscript
require(rcdk)
drug.mols <- load.molecules(molfiles="./CID_175540.sdf")
descNames <- unique(unlist(sapply(get.desc.categories(), get.desc.names)))
drug.descs <- eval.desc(drug.mols, descNames, verbose=T)


But, Error:

Processing  BasicGroupCountDescriptor
Error in if is.na(dval)) return(NA) : argument is of length zero
Calls: eval.desc -> lapply -> FUN
In addition: Warning message:
In is.na(dval) : is.na() applied to non-(list or vector) of type 'NULL'
Execution halted

"AcidicGroupCountDescriptor" is the same.

Thank you.

eval.desc rcdk • 3.0k views
ADD COMMENTlink modified 2.4 years ago by Biostar ♦♦ 20 • written 6.6 years ago by Zhilong Jia1.6k

I can reproduce the issue. It seems to me to be a bug...

ADD REPLYlink written 6.6 years ago by Egon Willighagen5.3k

I filed a bug report here.

ADD REPLYlink modified 11 months ago by _r_am31k • written 6.6 years ago by Egon Willighagen5.3k
3
gravatar for Rajarshi Guha
6.6 years ago by
Rajarshi Guha880
United States
Rajarshi Guha880 wrote:

Now fixed in Github. Using rcdk from Github requires that you use rcdklibs from Github. All will be pushed to CRAN in the near future

ADD COMMENTlink written 6.6 years ago by Rajarshi Guha880

for CID: 6442441, http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=6442441&disopt=SaveSDF

descriptors: "org.openscience.cdk.qsar.descriptors.molecular.RuleOfFiveDescriptor"; "org.openscience.cdk.qsar.descriptors.molecular.XLogPDescriptor"


#! /usr/bin/Rscript
require(rcdk)
drug.mols <- load.molecules(molfiles="./CID_6442441.sdf")
drug.descs <- eval.desc(drug.mols, "org.openscience.cdk.qsar.descriptors.molecular.RuleOfFiveDescriptor", verbose=T)

drug.descs <- eval.desc(drug.mols, "org.openscience.cdk.qsar.descriptors.molecular.XLogPDescriptor", verbose=T)

Error in .jcall(b, "Lorg/openscience/cdk/qsar/DescriptorValue;", "calculate",  :
  java.lang.NullPointerException

I do not know did you fix this two, so I just post it here. Maybe the same problem.

ADD REPLYlink modified 11 months ago by _r_am31k • written 6.6 years ago by Zhilong Jia1.6k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2224 users visited in the last hour