2 chemical analyses

2.1 integrationAppLite

phylochemistry provides a simple application for integrating and analyzing GC-MS data. With it, you can analyze .CDF files, which 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. Instructions for this are provided at the end of this chapter. To run the lite version of the integration app, use the following guidelines:

  1. Create a new folder on your hard drive and place your CDF 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 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 RStudio, run the source command to load phylochemistry:

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


  1. In RStudio, run the integrationAppLite command on the folder that contains your CDF file.

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

integrationAppLite("/Volumes/My_Drive/gc_data")


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

integrationAppLite("C:\\Users\\My Profile\\gc_data")


The first time you open your datafile, it may take a while to load. This is normal - the program is analyzing all the data points in your data file. For a typical exploratory GC-MS run of around 60 minutes, this is more than 2.5 million data points! So please be patient. After you open your data file once, subsequent openings will not take so long.

Please watch this overview video for a demonstration of how to use the integration app.

As a reference, below are the key commands used to operate the integration app. This is the information that is covered in the overview video.

To control the chromatogram window:

  • shift + q = update
  • shift + a = add selected peak
  • shift + r = remove selected peak
  • shift + f = forward
  • shift + d = backward
  • shift + c = zoom in
  • shift + v = zoom out
  • shift + z = save table

To control the mass spectrum window:

  • shift+1 = extract mass spectra from highlighted chromatogram region, plot average mass spectrum in panel 1.
  • shift+2 = refresh mass spectrum in panel 1. This is used for zooming in on a region of the mass spectrum that you have highlighted. A spectrum needs to first be extracted for this to be possible.
  • shift+3 = extract mass spectra from highlighted chromatogram region, subtract their average from the mass spectrum in panel 1.
  • shift+4 = search current spectrum in panel 1 against library of mass spectra.

2.2 CDF export

  1. On the GC-MS computer, open Enhanced Data Analysis
  2. File > Export Data To .AIA Format, Create New Directory (“OK”) > Desktop (create a folder with a name you will remember)
  3. Select all the datafiles you wish to analyze and process them, saving the output into the folder you just created
  4. Copy the .D files for the samples you wish to analyze to the same folder
  5. Move this folder to your personal computer
  6. Create one folder for each sample, and put the corresponding .CDF file into that folder.