in R package rcdk, to get the descriptor of some chemicals, eval.desc error when tackling some descriptor, such as BasicGroupCountDescriptor
1
1
Entering edit mode
10.5 years ago
Zhilong Jia ★ 2.2k

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 • 4.4k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

I filed a bug report here.

ADD REPLY
3
Entering edit mode
10.5 years ago
Rajarshi Guha ▴ 880

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 COMMENT
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 1779 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6