Skip to content

functions for chromatography and mass spectrometry data analysis

License

Notifications You must be signed in to change notification settings

Sunev/chromatography

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chromatography Toolbox

Open-source code for processing chromatography and mass spectrometry data in the MATLAB programming environment

Download

Select the Download ZIP button on this page or visit the MATLAB File Exchange to download a copy of the current release.

Features

Import Data
Type Extension
Agilent .D, .MS
Thermo .RAW
netCDF .CDF
mzXML .mzXML
Baseline Correction
Curve Fitting
Visualize

System Requirements

Current release stable on the following systems:

  • MATLAB 2013b+

Documentation

Visit the wiki for a full list of methods and options.

Getting Started

Initialize Toolbox

Add the @Chromatography folder to your MATLAB path and run the following code in the MATLAB command window:

obj = Chromatography();

Find out which version is currently installed using the command below:

obj.version

ans =

    '0.1.51'

Load Data

Import raw data files into the MATLAB workspace:

% Import Agilent '.D' files
data = obj.import('.D');

% Append data with Thermo '.RAW' files
data = obj.import('.RAW', 'append', data);

Baseline Correction

Calculate baselines for the total ion chromatograms (TIC) in all samples:

data = obj.baseline(data,...
    'samples',    'all',...
    'ions',       'tic',...
    'smoothness', 1E7,...
    'asymmetry',  5E-6);

Smoothing

Apply a smoothing filter to the total ion chromatograms (TIC) in all samples:

% Small amount of smoothing
data = obj.smooth(data,...
    'samples',    'all',...
    'ions',       'tic',...
    'smoothness', 10,...
    'asymmetry',  0.5);

% Heavy amount of smoothing
data = obj.smooth(data,...
    'samples',    'all',...
    'ions',       'tic',...
    'smoothness', 1000,...
    'asymmetry',  0.5);

Reset Data

Reset data to its original state with the command:

data = obj.reset(data);

Plotting

Plot all total ion chromatograms (TIC) in a stacked layout:

fig = obj.visualize(data,...
    'samples',  'all',...
    'ions',     'tic',...
    'layout',   'stacked',...
    'scale',    'normalized',...
    'xlim',     [5,45],...
    'colormap', 'jet',...
    'legend',   'on');

Plot the total ion chromatogram (TIC) for a single sample and save as a JPG (400 DPI):

fig = obj.visualize(data,...
    'samples', 4,...
    'ions',    'tic',...
    'xlim',    [2,50],...
    'color',   'black',...
    'legend',  'on',...
    'export',  {'MyFileName', '-djpeg', '-r400'});

Plot selected extracted ion chromatograms (XIC) for selected samples and save as a PNG (150 DPI):

fig = obj.visualize(data,...
    'samples',  [1:2,6,9:10],...
    'ions',     [10:50,55,59,100:200],...
    'layout',   'stacked',...
    'scale',    'full',...
    'xlim',     [10,30],...
    'colormap', 'winter',...
    'legend',   'on',...
    'export',   {'MyFileName', '-dpng', '-r150'});

About

functions for chromatography and mass spectrometry data analysis

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • MATLAB 100.0%