I have a clean install of R 3.3.3 with Bioconductor 3.4 on Windows 10 Pro x64 installed to a non-protected directory: d:\dev\R\
I am trying to use mzR::readMSData2(files), but I get the error: "Unable to create valid cRamp object". This seems to be due to a compatibility problem between the Rcpp_0.12.10 version that is installed with R 3.3.3 and the Rcpp_0.12.8 version that mzR_2.8.1 compiled against.
Are there any suggestion on how I can get the mzR functions to run properly?
Below is a more detailed walk-through of the problem and what I've tried.
When I loaded mzR and MSnbase, I received the following warning:
> library(mzR) Warning in fun(libname, pkgname) : mzR has been built against a different Rcpp version (0.12.8) than is installed on your system (0.12.10). This might lead to errors when loading mzR. If you encounter such issues, please send a report, including the output of sessionInfo() to the Bioc support forum at https://support.bioconductor.org/. For details see also https://github.com/sneumann/mzR/wiki/mzR-Rcpp-compiler-linker-issue.
I am working through the examples on this page: https://www.bioconductor.org/packages/devel/bioc/vignettes/xcms/inst/doc/new_functionality.html
> library(xcms) > library(MSnbase) > cdf_files <- dir(system.file("cdf", package = "faahKO"), recursive = TRUE, full.names = TRUE) > s_groups <- rep("KO", length(cdf_files)) > s_groups[grep(cdf_files, pattern = "WT")] <- "WT" > pheno <- data.frame(sample_name = sub(basename(cdf_files), pattern = ".CDF", replacement = "", fixed = TRUE), sample_group = s_groups, stringsAsFactors = FALSE) > raw_data <- readMSData2(cdf_files, pdata = new("NAnnotatedDataFrame", pheno)) Failed to open file. Error in mzR::openMSfile(f) : Unable to create valid cRamp object.
> traceback() 3: stop("Unable to create valid cRamp object.") 2: mzR::openMSfile(f) 1: readMSData2(cdf_files, pdata = new("NAnnotatedDataFrame", pheno))
I can use XCMS's xcmsSet to load the same data without an error:
> xset <- xcmsSet(cdf_files, phenoData=pheno)
I couldn't find a Windows binary build of Rcpp_0.12.8.zip (only 0.12.10 and 0.12.4), so I tried to build from source...
I have installed "devtools" and tried to install Rcpp 0.12.8 from source, (with Visual Studio 2015 installed) but I get a compilation error:
> install.packages("https://cran.r-project.org/src/contrib/Archive/Rcpp/Rcpp_0.12.8.tar.gz", repos=NULL, type="source") trying URL 'https://cran.r-project.org/src/contrib/Archive/Rcpp/Rcpp_0.12.8.tar.gz' Content type 'application/x-gzip' length 2435852 bytes (2.3 MB) downloaded 2.3 MB * installing *source* package 'Rcpp' ... ** package 'Rcpp' successfully unpacked and MD5 sums checked ** libs *** arch - i386 Warning: running command 'make -f "Makevars.win" -f "d:/dev/Programs/R/R-3.3.3/etc/i386/Makeconf" -f "d:/dev/Programs/R/R-3.3.3/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="Rcpp.dll" OBJECTS="Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o"' had status 127 ERROR: compilation failed for package 'Rcpp' * removing 'd:/dev/R/R-3.3.3/library/Rcpp' * restoring previous 'd:/dev/R/R-3.3.3/library/Rcpp' Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) : problem copying d:\dev\R\R-3.3.3\library\00LOCK-Rcpp\Rcpp\libs\x64\Rcpp.dll to d:\dev\R\R-3.3.3\library\Rcpp\libs\x64\Rcpp.dll: Permission denied Warning in install.packages : running command '"d:/dev/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "d:\dev\R\R-3.3.3\library" "C:/Users/THOMAS/AppData/Local/Temp/RtmpWA3DIm/downloaded_packages/Rcpp_0.12.8.tar.gz"' had status 1 Warning in install.packages : installation of package ‘C:/Users/THOMAS/AppData/Local/Temp/RtmpWA3DIm/downloaded_packages/Rcpp_0.12.8.tar.gz’ had non-zero exit status
> sessionInfo() R version 3.3.3 (2017-03-06) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200) locale:  LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252  LC_MONETARY=English_United States.1252 LC_NUMERIC=C  LC_TIME=English_United States.1252 attached base packages:  parallel stats graphics grDevices utils datasets methods base other attached packages:  devtools_1.12.0 faahKO_1.14.0 MSnbase_2.0.2 BiocParallel_1.8.2  xcms_1.50.1 Biobase_2.34.0 ProtGenerics_1.6.0 BiocGenerics_0.20.0  mzR_2.8.1 Rcpp_0.12.10 BiocInstaller_1.24.0 loaded via a namespace (and not attached):  RColorBrewer_1.1-2 plyr_1.8.4 iterators_1.0.8 zlibbioc_1.20.0  tools_3.3.3 digest_0.6.12 MALDIquant_1.16.2 memoise_1.0.0  tibble_1.3.0 preprocessCore_1.36.0 gtable_0.2.0 lattice_0.20-35  foreach_1.4.3 Matrix_1.2-8 curl_2.4 httr_1.2.1  withr_1.0.2 stringr_1.2.0 IRanges_2.8.2 S4Vectors_0.12.2  stats4_3.3.3 multtest_2.30.0 grid_3.3.3 impute_1.48.0  R6_2.2.0 snow_0.4-2 XML_3.98-1.6 survival_2.41-3  RANN_2.5 limma_3.30.13 ggplot2_2.2.1 reshape2_1.4.2  magrittr_1.5 scales_0.4.1 pcaMethods_1.66.0 codetools_0.2-15  MASS_7.3-45 splines_3.3.3 mzID_1.12.0 MassSpecWavelet_1.40.0  colorspace_1.3-2 stringi_1.1.5 affy_1.52.0 doParallel_1.0.10  lazyeval_0.2.0 munsell_0.4.3 vsn_3.42.3 affyio_1.44.0