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.csv files. CDF.csv 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.csv file 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.csv file is called “sorghum_bicolor.CDF.csv”, then I might create a folder called gc_data on my hard drive, and place the “sorghum_bicolor.CDF.csv” 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. The first time you run this command, a bunch of tools required for the analysis will be installed. It might take a while! Later runs of the command will not have this install portion - the app will just open straight away.

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.csv file. Do not run the command on the CDF.csv file itself, that will not work. For example, if my CDF.csv file is called “sorghum_bicolor.CDF.csv”, 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.csv datafile, it may take a while to load. Once the new RShiny window opens, press shift+q to load the chromatogram(s).