Title: | Orthogonal Signal Deconvolution for Spectra Deconvolution in GC-MS and GCxGC-MS Data |
---|---|
Description: | Compound deconvolution for chromatographic data, including gas chromatography - mass spectrometry (GC-MS) and comprehensive gas chromatography - mass spectrometry (GCxGC-MS). The package includes functions to perform independent component analysis - orthogonal signal deconvolution (ICA-OSD), independent component regression (ICR), multivariate curve resolution (MCR-ALS) and orthogonal signal deconvolution (OSD) alone. |
Authors: | Xavier Domingo-Almenara |
Maintainer: | Xavier Domingo-Almenara <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1 |
Built: | 2024-11-02 03:25:57 UTC |
Source: | https://github.com/cran/osd |
A data matrix from a real pure standards GC-MS experiment.
data(gcms1)
data(gcms1)
Data taken from the experiment used in [1] (See references below). This data matrix includes three compounds appearing in co-elution, concretely, the appearing compounds are: nicotinic acid, isoleucine and profile. The data in gcms1
and gcms2
only comprises the m/z from 35 to 600. So the first element of the column in gcms1
corresponds to the mass m/z 35. Please, note that the fragments at m/z 73, 74, 75, 147, 148, and 149, were excluded from the analysis (have zero intensity).
[1] Domingo-Almenara X, et al. Compound deconvolution in GC-MS-based metabolomics by blind source separation. Journal of Chromatography A (2015). Vol. 1409: 226-233. DOI: 10.1016/j.chroma.2015.07.044
A data matrix from a real pure standards GC-MS experiment.
data(gcms2)
data(gcms2)
Data taken from the experiment used in [1] (See references below). This data matrix includes two compounds appearing in co-elution, concretely, the appearing compounds are: methionine and aspartic acid. The data in gcms1
and gcms2
only comprises the m/z from 35 to 600. So the first element of the column in gcms2
corresponds to the mass m/z 35. Please, note that the fragments at m/z 73, 74, 75, 147, 148, and 149, were excluded from the analysis (have zero intensity).
[1] Domingo-Almenara X, et al. Compound deconvolution in GC-MS-based metabolomics by blind source separation. Journal of Chromatography A (2015). Vol. 1409: 226-233. DOI: 10.1016/j.chroma.2015.07.044
Normalizes a vector o a matrix in the form of x/max(x). Is is a matrix, a column-normalization is performed, which is equivalent to apply(x,2,function(x) x/max(x)).
normalize(x)
normalize(x)
x |
a |
returns the normalized vector o matrix.
Wrapper to use OSD, or OSD along with ICA (ICA-OSD), MCR (MCR-OSD), and also ICR.
osd(D, k, y.profile, res.method = c("ica.osd", "osd", "icr", "mcr"), comp.coef = 2, noise.thr = 0.01)
osd(D, k, y.profile, res.method = c("ica.osd", "osd", "icr", "mcr"), comp.coef = 2, noise.thr = 0.01)
D |
data matrix, where rows are the retention time and columns are the m/z. |
k |
number of components in the model, i.e., the number of compounds to be extracted from data. (Only when methods ICA-OSD, MCR or ICR are used.) |
y.profile |
the vector containing the estimated elution profile of the compound which spectrum wants to be deconvolved. (Only when method OSD is used.) |
res.method |
the method to be used, including "ica.osd","mcr.osd","icr","mcr". See details for more information. |
comp.coef |
the non-linear factor of compression. See details for more information. |
noise.thr |
this value can be set from 0 to 1. Data in D under this relative threshold is set to zero to reduce the computational cost. Default is 0.01. |
The methods are described in [1] and [2] (See references below). OSD is an improved method for spectra extraction from chromatographic data tested in GC-MS and GCxGC samples.
For tradicional multivariate curve resolution select "mcr" algorithm. Indepenent component regression is also implemented, and can be selected by choosing "icr" method. The OSD implementations using ICA can be used by "ica.osd". Also, OSD can be used alone, for retrieving a purest spectrum if the estimated elution profile of the compound (which spectrum is to be deconvolved) is given.
osd
returns an S3 object.
data |
the original data matrix. |
C |
the resolved profile or concentration matrix. |
S |
the resolved spectra matrix. |
k |
the number of components used in the model. |
y.profile |
the estimated elution profile for OSD. |
res.method |
the method used for resolution. |
comp.coef |
the non-linear compression coeficient selected. |
noise.thr |
the noise threshold selected. |
Xavier Domingo-Almenara. [email protected]
[1] Domingo-Almenara X, et al. Compound deconvolution in GC-MS-based metabolomics by blind source separation. Journal of Chromatography A (2015). Vol. 1409: 226-233. DOI: 10.1016/j.chroma.2015.07.044
[2] Domingo-Almenara X, et al. Automated resolution of chromatographic signals by independent component analysis - orthogonal signal deconvolution in comprehensive gas chromatography/mass spectrometry-based metabolomics. Computer Methods and Programs in Biomedicine (2016). DOI: 10.1016/j.cmpb.2016.03.007:
osd
, plotOSDres
, gcms1
, gcms2
#load GC-MS sample data, containing three different metabolites #appearing in co-elution. data(gcms1) #resolve the situation using ICA-OSD algorithm resolution <- osd(D=gcms1, k=3, res.method='ica.osd') #plot the resolution, the extracted ion chromatogram (m/z) are plotted in #grey whereas the profile matrix appear in color. plotOSDres(resolution, type='eic') #plot each resolved spectra for compound 1 to 3. plotOSDres(resolution, type='s',1) plotOSDres(resolution, type='s',2) plotOSDres(resolution, type='s',3)
#load GC-MS sample data, containing three different metabolites #appearing in co-elution. data(gcms1) #resolve the situation using ICA-OSD algorithm resolution <- osd(D=gcms1, k=3, res.method='ica.osd') #plot the resolution, the extracted ion chromatogram (m/z) are plotted in #grey whereas the profile matrix appear in color. plotOSDres(resolution, type='eic') #plot each resolved spectra for compound 1 to 3. plotOSDres(resolution, type='s',1) plotOSDres(resolution, type='s',2) plotOSDres(resolution, type='s',3)
Plots the results determined by osd
function. Profile or spectra resolution can be selected for visualization.
plotOSDres(OSDobj, type = c("eic", "tic", "s"), ncomp = vector(), comp.spectra = vector(), mztxt.top = 5)
plotOSDres(OSDobj, type = c("eic", "tic", "s"), ncomp = vector(), comp.spectra = vector(), mztxt.top = 5)
OSDobj |
the |
type |
the type of resolution to be plotted. Concentration resolution can be shown by its extracted ion chromatogram (EIC) "eic" or by its ion total chromatogram "tic". Also, the spectra for each compound in the model can be shown by "s". |
ncomp |
vector; the compounds to be plotted. If spectra is selected for visualization, please select only one compound to plot. |
comp.spectra |
a vector to compare a resolved spectra with. |
mztxt.top |
integer; the number of the m/z values ordered by intensity to visualize on the spectra plot |
Xavier Domingo-Almenara. [email protected]
#load GC-MS sample data, containing three different metabolites #appearing in co-elution. data(gcms1) #resolve the situation using ICA-OSD algorithm resolution <- osd(D=gcms1, k=3, res.method="ica.osd") #plot the resolution, the extracted ion chromatogram (m/z) are plotted # in grey whereas the profile matrix appear in color. plotOSDres(resolution, type="eic") plotOSDres(resolution, type="tic") #plot each resolved spectra for compound 1 to 3. plotOSDres(resolution, type="s",1) plotOSDres(resolution, type="s",2) plotOSDres(resolution, type="s",3)
#load GC-MS sample data, containing three different metabolites #appearing in co-elution. data(gcms1) #resolve the situation using ICA-OSD algorithm resolution <- osd(D=gcms1, k=3, res.method="ica.osd") #plot the resolution, the extracted ion chromatogram (m/z) are plotted # in grey whereas the profile matrix appear in color. plotOSDres(resolution, type="eic") plotOSDres(resolution, type="tic") #plot each resolved spectra for compound 1 to 3. plotOSDres(resolution, type="s",1) plotOSDres(resolution, type="s",2) plotOSDres(resolution, type="s",3)
A data matrix from a real pure standards GC-MS experiment.
data(ref.spects)
data(ref.spects)
The data includes a list of five vectors containing 5 MS spectra from the MassBank MS library [1]. Concretely, the spectra are Methionine 2TMS, Aspartic Acid 3TMS, Nicotinic Acid 1TMS, Isoleucine 2TMS and Proline 2TMS. These are the compounds appearing in the examples given in gcms1
and gcms2
.
[1] MassBank: A public repository for sharing mass spectral data for life sciences", H. Horai, M. Arita, S. Kanaya, Y. Nihei, T. Ikeda, K. Suwa. Y. Ojima, K. Tanaka, S. Tanaka, K. Aoshima, Y. Oda, Y. Kakazu, M. Kusano, T. Tohge, F. Matsuda, Y. Sawada, M. Yokota Hirai, H. Nakanishi, K. Ikeda, N. Akimoto, T. Maoka, H. Takahashi, T. Ara, N. Sakurai, H. Suzuki, D. Shibata, S. Neumann, T. Iida, K. Tanaka, K. Funatsu, F. Matsuura, T. Soga, R. Taguchi, K. Saito and T. Nishioka, J. Mass Spectrom., 45, 703-714 (2010)
#load GC-MS sample data, containing three different metabolites # appearing in co-elution. data(gcms1) data(ref.spects) #resolve the situation using ICA-OSD algorithm resolution <- osd(D=gcms1, k=3, res.method="ica.osd") #plot each resolved spectra for compound 1 to 3. ref.sp <- ref.spects$nicotinicacid1[-c(1:34)] plotOSDres(resolution, type="s",1,comp.spectra=ref.sp) # note that from the spectra the first 34 # values are omitted, this is because the original # spectra given comprises the masses from 1 to 600, # whereas the data in gcms1 and gcms2 # only comprises the m/z from 35 to 600.
#load GC-MS sample data, containing three different metabolites # appearing in co-elution. data(gcms1) data(ref.spects) #resolve the situation using ICA-OSD algorithm resolution <- osd(D=gcms1, k=3, res.method="ica.osd") #plot each resolved spectra for compound 1 to 3. ref.sp <- ref.spects$nicotinicacid1[-c(1:34)] plotOSDres(resolution, type="s",1,comp.spectra=ref.sp) # note that from the spectra the first 34 # values are omitted, this is because the original # spectra given comprises the masses from 1 to 600, # whereas the data in gcms1 and gcms2 # only comprises the m/z from 35 to 600.