nanxstats / Rcpi

💊 Molecular informatics toolkit with integration of bioinformatics and cheminformatics tools for drug discovery
https://nanx.me/Rcpi/
Artistic License 2.0
36 stars 12 forks source link

error with tutorial #4

Closed salwan96 closed 5 years ago

salwan96 commented 5 years ago

Hi, I am learning the Rcpi package, I was successfully able to install and run the package, and I attempting to replicate section 3.4 (Structure-Based Chemical Similarity Searching), I have loaded mol, and moldb files, DB00530.sdf and tyrphostin.sdf respectively, but when I run drug similarity search using code from the tutorial:

rank1 = searchDrug( mol, moldb, cores = 4, method = "fp", fptype = "maccs", fpsim = "tanimoto")

I encounter the error:

Error in order(..., decreasing = decreasing) : unimplemented type 'list' in 'orderVector1'

I did some searching but I don't understand why this error occurs, any help would be appreciated, thanks

nanxstats commented 5 years ago

@salwan96 -hmm, that's weird. The following example code runs ok on my machine (assuming you're using the same code). I'm running on R 3.5.1/BioC 3.8:

library("Rcpi")

mol <- system.file("compseq/DB00530.sdf", package = "Rcpi")
moldb <- system.file("compseq/tyrphostin.sdf", package = "Rcpi")

rank1 <- searchDrug(
  mol, moldb,
  cores = 4, method = "fp",
  fptype = "maccs", fpsim = "tanimoto"
)

head(rank1)
# 92       100        83       101         1        36
# 0.6491228 0.6491228 0.5882353 0.5660377 0.5000000 0.5000000

Maybe upgrading R and the packages to the latest stable version? Or, please send in the code and data so I can reproduce the issue.

Thanks!

salwan96 commented 5 years ago

Thanks for the reply, I updated all packages and it is working now, thanks

On Sat, Nov 10, 2018, 2:34 PM Nan Xiao <notifications@github.com wrote:

@salwan96 https://github.com/salwan96 -hmm, that's weird. The following example code runs ok on my machine (assuming you're using the same code). I'm running on R 3.5.1/BioC 3.8:

library("Rcpi") mol <- system.file("compseq/DB00530.sdf", package = "Rcpi")moldb <- system.file("compseq/tyrphostin.sdf", package = "Rcpi") rank1 <- searchDrug( mol, moldb, cores = 4, method = "fp", fptype = "maccs", fpsim = "tanimoto" )

head(rank1)# 92 100 83 101 1 36# 0.6491228 0.6491228 0.5882353 0.5660377 0.5000000 0.5000000

Maybe upgrading R and the packages to the latest stable version? Or, please send in the code and data so I can reproduce the issue.

Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/road2stat/Rcpi/issues/4#issuecomment-437626884, or mute the thread https://github.com/notifications/unsubscribe-auth/Aq2cmEJpjjffwJUb-3vzOitXk8J4UiDPks5ut1SSgaJpZM4YYMNR .

nanxstats commented 5 years ago

@salwan96 -great! Glad it works. 😄