Entering edit mode
7.6 years ago
Hi. I am using smile codes for the FDA approved drugs available in chEMBL 22 database. I am using the r package rcdk and I am using this code
library(rcdk)
dat1<-read.csv("chembl_22_drug_export.txt",sep="\t",header=T)
smi <-lapply(as.character(dat1$CANONICAL_SMILES),parse.smiles)
cmp.fp<-vector("list",nrow(dat1))
## generate fingerprints
for (i in 1:nrow(dat1)){
cmp.fp[i]<-lapply(smi[[i]][1],get.fingerprint,type="maccs")
}
##Convert fingerprints to matrix form
fpmac<-fp.to.matrix(cmp.fp)
cmp.finger<-as.data.frame(fpmac)
But when I do this step
smi <- lapply(as.character(chembl_22_drug_export$CANONICAL_SMILES), parse.smiles)
I get the following error
Error in .jnew("org/openscience/cdk/smiles/SmilesParser", dcob) :
Java Exception <no description because toString() failed>.jnew("org/openscience/cdk/smiles/SmilesParser", dcob)<S4 object of class "jobjRef">
Kindly guide me how do I resolve this error?
I added code markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below: