xcms under R - HOWTO Install?
So you got some mass spectra to analyze and you heard about xcms?  You also like to do everything in R like I am known to do. So you decide to follow instructions on installing xcms and execute the following in your R sessionÂ
source("http://bioconductor.org/biocLite.R")
This will most likely fail as you might not have the NetCDF libraries installed on your system.Â
if you didn't you're all set, if you did get an error, read on to see how to make it work?
xcms is now distributed by bioconductor, an open source set of software for bioinformatics. As xcms depends on netCDF libraries, you need to do the following before installing R.
The instructions below are for Ubuntu (command to be executed are in bold)
1. install the libraries required by xcms to work
sudo apt-get install libnetcdf-dev build-essentialÂ
This package includes all the libraries, you might also wish to install the netcdf-bin for programs that can read and write netCDF files.
2. You can install the programs withÂ
sudo apt-get install netcdf-bin
Now you're ready to install xcms under R.
3. download the xcms package source, it's available at http://www.bioconductor.org/packages/release/bioc/html/xcms.html
sudo R (to run it with root privileges in Ubuntu),
5. install xcms (make sure to give the full path to where you downloaded it)
install.packages("/path_to_xcms/xcms_*.tar.gz")Â
the * is for version you downloaded, and you should be all set.
You can read more about NetCDF libraries here http://www.unidata.ucar.edu/software/netcdf/