rsilvabioinfo / ProbMetab

Provides probability ranking to candidate compounds assigned to masses, with the prior assumption of connected sample and additional previous and spectral information modeled by the user.
http://labpib.fmrp.usp.br/methods/probmetab
3 stars 2 forks source link

Issues running probmetab on Rstudio #2

Open waleadebayo opened 8 years ago

waleadebayo commented 8 years ago

Hi, Dr Silva, pls help I am trying to use the workflow from LabPIB - Probmetab's website, to process my files on R. http://labpib.fmrp.usp.br/methods/probmetab/resources/image/workflow_commented_r_code.txt I observed that my errors are generated when mzmatch has to be integrated. Specifically at the region below: **PeakML.xcms.write.SingleMeasurement(xset=xset,filename=outputfiles[i], ionisation="negative",addscans=2, writeRejected=FALSE,ApodisationFilter=TRUE ) }

library (mzmatch.R) mzmatch.init (4000)**

Hence, I reduced the steps gradually. loading mzmatch.R and then calling mzmatch.init

mzmatch.init() trying URL 'http://sourceforge.net/projects/mzmatch/files/mzmatch.R/dbs.zip/download' Error in download.file("http://sourceforge.net/projects/mzmatch/files/mzmatch.R/dbs.zip/download", : cannot open URL 'http://sourceforge.net/projects/mzmatch/files/mzmatch.R/dbs.zip/download' (a) Internet connections are working, as I have used R to get all other packages at the same time as this. I have changed repositories (below)over and over again, none of them works. Besides sourceforge is not in my repositories and R Forge does not work for the 'dbs' setRepositories() --- Please select repositories for use in this session --- 1: + CRAN 2: BioC software 3: BioC annotation 4: BioC experiment 5: BioC extra 6: + CRAN (extras) 7: Omegahat 8: R-Forge 9: rforge.net 10: CRAN (extras, https) 11: R-Forge [https] 12: rforge.net [https] I use R 3.2.5 sessionInfo() R version 3.2.5 (2016-04-14) Platform: i386-w64-mingw32/i386 (32-bit) Running under: Windows 7 (build 7601) Service Pack 1 locale: [1] LC_COLLATE=English_India.1252 LC_CTYPE=English_India.1252 [3] LC_MONETARY=English_India.1252 LC_NUMERIC=C [5] LC_TIME=English_India.1252 attached base packages: [1] parallel stats graphics grDevices utils datasets methods [8] base other attached packages: [1] mzmatch.R_2.0-13 xcms_1.46.0 Biobase_2.30.0 [4] ProtGenerics_1.2.1 BiocGenerics_0.16.1 mzR_2.4.1 [7] Rcpp_0.12.4 loaded via a namespace (and not attached): [1] lattice_0.20-33 ptw_1.9-11 tcltk_3.2.5 [4] caTools_1.17.1 tools_3.2.5 grid_3.2.5 [7] R.oo_1.18.2 snow_0.4-1 KernSmooth_2.23-15 [10] gtools_3.5.0 rJava_0.9-8 RColorBrewer_1.1-2 [13] nloptr_1.0.4 R.utils_1.32.5 bitops_1.0-6 [16] codetools_0.2-14 gdata_2.17.0 gplots_3.0.1 [19] R.methodsS3_1.6.2 XML_3.98-1.4 (b) Manually downloading the file from source forge and installing in R does not work as R does not load because description, namespace, index, md5,news files are missing. (c) using 'download.file' function does not work also Thanks

rsilvabioinfo commented 8 years ago

Hi, if you type the function name on R: mzmatch.init

you are going to see that the first step is the download of sourceforge's files.

DBS.path <- paste(find.package("mzmatch.R"), "/dbs", sep = "")
mzmatch.path <- paste(find.package("mzmatch.R"), "/java", 
    sep = "")
if (!file.exists(DBS.path)) {
    current.dir <- getwd()
    setwd(find.package("mzmatch.R"))
    download.file("http://sourceforge.net/projects/mzmatch/files/mzmatch.R/dbs.zip/download", 
        "dbs.zip", cacheOK = FALSE, mode = "wb")
    unzip("dbs.zip")
    file.remove("dbs.zip")
    setwd(current.dir)
}

it works for me here. You can try to do it manually. Go to your R repository, in windows, I believe that it is in your Documents folder. Inside R folder, find mzmatch.R folder and download the file

http://sourceforge.net/projects/mzmatch/files/mzmatch.R/dbs.zip/download

in your browser and unzip it on mzmatch.R folder. After that you should be able to run mzmatch on R:

mzmatch.init ()

Just a note. This project is not fully maintained and no additional help will be provided for mzmatch integration. I recommend trying to workout with xcms/CAMERA.

Cheers, Ricardo