loading analyzeGCMSdata

This page explains how to load a simple application for integrating and analyzing GC-MS data. With the app, you can analyze .CDF files. CDF files contain essentially all the data from a GC-MS run, and can be exported from most GC-MS systems using the software provided by the manufacturer. To run the application, use the following guidelines:

  1. Create a new folder on your hard drive and place your CDF file(s) into that folder. It doesn’t matter what the name of that folder is, but it must not contain special characters (including a space in the name). For example, if my CDF file is called “sorghum_bicolor.CDF”, then I might create a folder called gc_data on my hard drive, and place the “sorghum_bicolor.CDF” file in that folder.

  2. In R or RStudio, run the source command shown below. You will need to do this every time you re-open R or RStudio. This command will load the analyzeGCMSdata function into your R or RStudio environment. Note that you will need to be connected to the internet for this to work.

source("https://thebustalab.github.io/phylochemistry/gcms.R")

If the command was run successfully you should see something like:

  1. In R or RStudio, run the analyzeGCMSdata command on the folder that contains your CDF file. Do not run the command on the CDF file itself, that will not work. For example, if my CDF file is called “sorghum_bicolor.CDF”, and is inside the folder called gc_data, then I would run the following:

If you are on a Mac, use single forward slashes. For example:

analyzeGCMSdata("/Volumes/My_Drive/gc_data")


If you are on a PC, you may need to use double back slashes. For example:

analyzeGCMSdata("C:\\Users\\My_Profile\\gc_data")


The first time you open your CDF datafile, it may take a while to load. Once the new RShiny window opens, press shift+q to load the chromatogram(s).