When you want to get to know and love your data

Tutorials- Statistical and Multivariate Analysis for Metabolomics

2014 winter LC-MS stats courseI recently had the pleasure in participating in the 2014 WCMC Statistics for Metabolomics Short Course. The course was hosted by the NIH West Coast Metabolomics Center and focused on statistical and multivariate strategies for metabolomic data analysis. A variety of topics were covered using 8 hands on tutorials which focused on:

  • data quality overview
  • statistical and power analysis
  • clustering
  • principal components analysis (PCA)
  • partial least squares (O-/PLS/-DA)
  • metabolite enrichment analysis
  • biochemical and structural similarity network construction
  • network mapping

I am happy to have taught the course using all open source software, including: R, and Cytoscape. The data analysis and visualization were done using Shiny-based apps:  DeviumWeb and MetaMapR. Check out some of the slides below or download all the class material and try it out for yourself.

Creative Commons License
2014 WCMC LC-MS Data Processing and Statistics for Metabolomics by Dmitry Grapov is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Special thanks to the developers of Shiny and Radiant by Vincent Nijs.


13 responses

  1. Pingback: Tutorials- Statistical and Multivariate Analysis for Metabolomics | Patient 2 Earn

  2. Titan

    I tried to learn the course downloading all the materials provided in the link above. I tried to run app for DeviamWeb but could not run it. It says “Error in shiny appdir (X). Shiny app could not be found in the folder”.
    I have not changed anything just tried to run according to the instruction provided. Can you please help me what went wrong.

    Thank you.

    January 9, 2015 at 8:58 pm

    • You need to change the file path in the statement ‘runApp(‘~/DeviumWeb’)’ to where the shiny app is on your computer (e.g. change the ~ above to your/file/path).

      For an example, take a look at the DeviumWeb website (https://github.com/dgrapov/DeviumWeb) for instructions on how to start the app if downloaded to desktop.

      January 11, 2015 at 8:06 pm

      • Khushman Taunk

        hi there,
        I m also facing this problem of —–

        Downloading https://github.com/dgrapov/DeviumWeb/archive/master.tar.gz
        Error in setwd(exdir) : cannot change working directory
        In addition: Warning message:
        In download.file(url, …) :
        downloaded length 6786000 != reported length 200

        this problem is coming after i press enter after typing this command from your github website—

        #Load Directly from GitHub
        runGitHub(“DeviumWeb”, “dgrapov”)

        Please suggest me what to do with this working directory issue and how to solve it. I am using it through the Rstudio. I am very new to this R programming but i urgently need to do some modelling for my metabolomics results through OPLS-DA. Please help.

        April 16, 2015 at 8:39 pm

      • You should download the zip file and follow the instructions to start the app from the local folder. Make sure you change the file path to the correct location if you unzip to somewhere besides the desktop.





        April 16, 2015 at 11:38 pm

    • Use the file path to the folder one level up from where the ui.R file is found. In windows right-click the folder –> properties to see the file path.

      April 16, 2015 at 11:40 pm

      • Khushman Taunk

        hello sir,
        Now i m seeing this error—-

        > #Windows
        > #————-
        > library(shiny)
        > shiny::runApp(‘G:/STATS softwares/DeviumWeb-master/DeviumWeb-master’)
        Error: unexpected input in “shiny::runApp(‘”

        I have unzipped my devium =web file to G:\STATS softwares\DeviumWeb-master\DeviumWeb-master. within this folder the Ui.R folder is there. Please help.

        April 17, 2015 at 6:30 am

  3. R does not like those quotes. Try: shiny::runApp(“G:/STATS softwares/DeviumWeb-master/DeviumWeb-master”). You may have to retype the quotes if they are getting trashed during the copy/paste.

    April 17, 2015 at 10:29 pm

    • Khushman Taunk

      Dear Sir,
      after surpassing the previous error, I am getting this error now:

      > #Windows
      > #————-
      > library(shiny)
      > shiny::runApp(“G:/STATS softwares/DeviumWeb-master/DeviumWeb-master”)
      Loading required package: plotly
      Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
      there is no package called ‘plotly’
      Loading required package: devtools

      Attaching package: ‘devtools’

      The following object is masked _by_ ‘.GlobalEnv’:


      Downloading github repo ropensci/plotly@master
      Installing plotly
      Error in set(new) : cannot change working directory

      Why am I not able to install the deviumWeb straight forward? Why is it so much complicated and why am I getting so many error messages? Please help me out in the installation.


      April 19, 2015 at 3:11 pm

  4. lambdamoses

    Hi Dr. Grapov,

    I downloaded DeviumWeb version 0.4 from https://zenodo.org/record/17459#.Vxgd-FQrLIU, and tried to run it in R. I did make sure to change the path after unzipping it, and the packages loaded normally (but a lot of objects from several packages were masked). Finally, RStudio opened a window showing the DeviumWeb GUI, but soon after, it automatically closed, with an error in the R console as follows:

    Listening on
    Found more than one class “connection” in cache; using the first, from namespace ‘BiocGenerics’
    Warning: Error in lapply: object ‘datasets’ not found
    Stack trace (innermost first):
    76: lapply
    75: listify
    74: choicesWithNames
    73: selectInput
    72: renderUI [devium.R#230]
    71: func
    70: output$datasets
    1: shiny::runApp
    Found more than one class “connection” in cache; using the first, from namespace ‘BiocGenerics’
    Found more than one class “connection” in cache; using the first, from namespace ‘BiocGenerics’
    ERROR: [on_request_read] connection reset by peer


    April 21, 2016 at 12:33 am

    • Hi,

      That version is a bit out of date. I am currently providing updated hosted versions at http://createdatasol.com/

      April 21, 2016 at 1:51 am

      • lambdamoses

        Thank you for your reply! I subscribed and tried the version embedded in createdatasol.com. Is there a place to download the app or is that embedded version it? I couldn’t upload my csv data onto the embedded version, and when I tried to plot graphs using the example mcars and diamond data, the graph is not shown; instead, I saw the code about the graphs.

        April 21, 2016 at 2:20 am

      • lambdamoses

        I’m using Chrome. Actually the online embedded version shows what the str() function should show instead of the graph. Also, the developer’s version on Github doesn’t work since it doesn’t have server.r or app.r.

        April 21, 2016 at 3:07 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s