Xcms
Xcms
Xcms
R topics documented:
absent-methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AutoLockMass-methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
c-methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
3
4
5
R topics documented:
2
calibrate-methods . . . . . . . .
collect-methods . . . . . . . . .
diffreport-methods . . . . . . .
etg . . . . . . . . . . . . . . . .
fillPeaks-methods . . . . . . . .
fillPeaks.chrom-methods . . . .
fillPeaks.MSW-methods . . . .
findMZ . . . . . . . . . . . . .
findneutral . . . . . . . . . . . .
findPeaks-methods . . . . . . .
findPeaks.centWave-methods . .
findPeaks.massifquant-methods .
findPeaks.matchedFilter-methods
findPeaks.MS1-methods . . . .
findPeaks.MSW-methods . . . .
getEIC-methods . . . . . . . . .
getPeaks-methods . . . . . . . .
getScan-methods . . . . . . . .
getSpec-methods . . . . . . . .
group-methods . . . . . . . . .
group.density . . . . . . . . . .
group.mzClust . . . . . . . . . .
group.nearest . . . . . . . . . .
groupnames-methods . . . . . .
groupval-methods . . . . . . . .
image-methods . . . . . . . . .
loadRaw-methods . . . . . . . .
medianFilter . . . . . . . . . . .
msn2xcmsRaw . . . . . . . . .
peakPlots-methods . . . . . . .
peakTable-methods . . . . . . .
plot.xcmsEIC . . . . . . . . . .
plotChrom-methods . . . . . . .
plotEIC-methods . . . . . . . .
plotPeaks-methods . . . . . . .
plotQC . . . . . . . . . . . . . .
plotRaw-methods . . . . . . . .
plotrt-methods . . . . . . . . . .
plotScan-methods . . . . . . . .
plotSpec-methods . . . . . . . .
plotSurf-methods . . . . . . . .
plotTIC-methods . . . . . . . .
profMedFilt-methods . . . . . .
profMethod-methods . . . . . .
profRange-methods . . . . . . .
profStep-methods . . . . . . . .
rawEIC-methods . . . . . . . .
rawMat-methods . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
6
7
8
10
11
11
12
13
15
16
17
19
22
23
25
26
27
28
28
29
30
31
32
33
34
35
35
36
37
38
39
40
41
42
42
43
44
45
46
46
47
48
48
49
49
50
51
52
absent-methods
retcor-methods . . . . . . .
retcor.obiwarp . . . . . . . .
retcor.peakgroups-methods .
retexp . . . . . . . . . . . .
sampnames-methods . . . .
specDist-methods . . . . . .
specDist.cosine . . . . . . .
specDist.meanMZmatch . .
specDist.peakCount-methods
specNoise . . . . . . . . . .
specPeaks . . . . . . . . . .
split.xcmsRaw . . . . . . . .
split.xcmsSet . . . . . . . .
SSgauss . . . . . . . . . . .
stitch-methods . . . . . . . .
verify.mzQuantM . . . . . .
write.cdf-methods . . . . . .
write.mzdata-methods . . . .
write.mzQuantML-methods .
xcmsEIC-class . . . . . . .
xcmsFileSource-class . . . .
xcmsFragments . . . . . . .
xcmsFragments-class . . . .
xcmsPapply . . . . . . . . .
xcmsPeaks-class . . . . . .
xcmsRaw . . . . . . . . . .
xcmsRaw-class . . . . . . .
xcmsSet . . . . . . . . . . .
xcmsSet-class . . . . . . . .
xcmsSource-class . . . . . .
xcmsSource-methods . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Index
absent-methods
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
52
53
54
55
56
56
57
58
59
59
60
61
62
62
63
65
65
66
67
67
68
69
70
71
73
74
76
78
79
81
82
83
Description
Determine which peaks are absent / present in a sample class
Arguments
object
xcmsSet-class object
class
minfrac
AutoLockMass-methods
Details
Determine which peaks are absent / present in a sample class The functions treat peaks that are only
present because of fillPeaks correctly, i.e. does not count them as present.
Value
An logical vector with the same length as nrow(groups(object)).
Methods
object = "xcmsSet"
absent(object, ...)
present(object, ...)
See Also
group diffreport
AutoLockMass-methods
Description
AutoLockMass - This function decides where the lock mass scans are in the xcmsRaw object. This
is done by using the scan time differences.
Arguments
object
An xcmsRaw-class object
Value
AutoLockMass A numeric vector of scan locations corresponding to lock Mass scans
Methods
object = "xcmsRaw" signature(object = "xcmsRaw")
Author(s)
Paul Benton, <hpaul.benton08@imperial.ac.uk>
c-methods
Examples
## Not run: library(xcms)
library(faahKO) ## These files do not have this problem to correct for but just for an example
cdfpath <- system.file("cdf", package = "faahKO")
cdffiles <- list.files(cdfpath, recursive = TRUE, full.names = TRUE)
xr<-xcmsRaw(cdffiles[1])
xr
##Lets assume that the lockmass starts at 1 and is every 100 scans
lockMass<-xcms:::makeacqNum(xr, freq=100, start=1)
## these are equalvent
lockmass2<-AutoLockMass(xr)
all((lockmass == lockmass2) == TRUE)
ob<-stitch(xr, lockMass)
## End(Not run)
c-methods
Description
Combines the samples and peaks from multiple xcmsSet objects into a single object. Group and
retention time correction data are discarded. The profinfo list is set to be equal to the first object.
Arguments
xs1
xcmsSet object
...
xcmsSet objects
Value
A xcmsSet object.
Methods
xs1 = "xcmsRaw"
c(xs1, ...)
Author(s)
Colin A. Smith, <csmith@scripps.edu>
See Also
xcmsSet-class
calibrate-methods
calibrate-methods
Description
Calibrate peaks of a xcmsSet via a set of known masses
Arguments
object
calibrants
method
mzppm
the relative error used for matching peaks in ppm (parts per million)
mzabs
neighbours
the number of neighbours from wich the one with the highest intensity is used
(instead of the nearest)
plotres
can be set to TRUE if wanted a result-plot showing the found m/z with the
distances and the regression
Value
object
calibrants
for each sample different calibrants can be used, if a list of m/z-vectors is given.
The length of the list must be the same as the number of samples, alternatively
a single vector of masses can be given which is used for all samples.
method
"shift" for shifting each m/z, "linear" does a linear regression and adds a linear
term to each m/z. "edgeshift" does a linear regression within the range of the
mz-calibrants and a shift outside.
Methods
object = "xcmsSet"
See Also
xcmsSet-class,
calibrate(object, calibrants,method="linear",
mzabs=0.0001, mzppm=5,
neigh
collect-methods
collect-methods
Description
Collecting Peaks into xcmsFragmentss from several MS-runs using xcmsSet and xcmsRaw.
Arguments
object
xs
compMethod
rt
mz
intensity
sample
GroupPeakMSn
Used for grouped xcmsSet groups
CollisionEnergy
The collision energy of the fragment
Methods
object = "xcmsFragments"
collect(object, ...)
diffreport-methods
diffreport-methods
Description
Create a report showing the most significant differences between two sets of samples. Optionally
create extracted ion chromatograms for the most significant differences.
Arguments
object
class1
class2
filebase
base file name to save report, .tsv file and _eic will be appended to this name
for the tabular report and EIC directory, respectively. if blank nothing will be
saved
eicmax
eicwidth
sortpval
classeic
value
metlin
mass uncertainty to use for generating link to Metlin metabolite database. the
sign of the uncertainty indicates negative or positive mode data for M+H or M-H
calculation. a value of FALSE or 0 removes the column
Numeric variable for the height of the eic and boxplots that are printed out.
Numeric variable for the width of the eic and boxplots print out made.
mzdec
...
Details
This method handles creation of summary reports with statistics about which analytes were most
significantly different between two sets of samples. It computes Welchs two-sample t-statistic for
each analyte and ranks them by p-value. It returns a summary report that can optionally be written
out to a tab-separated file.
Additionally, it does all the heavy lifting involved in creating superimposed extracted ion chromatograms for a given number of analytes. It does so by reading the raw data files associated with
the samples of interest one at a time. As it does so, it prints the name of the sample it is currently
reading. Depending on the number and size of the samples, this process can take a long time.
diffreport-methods
If a base file name is provided, the report (see Value section) will be saved to a tab separated file.
If EICs are generated, they will be saved as 640x480 PNG files in a newly created subdirectory.
However this parameter can be changed with the commands arguments. The numbered file names
correspond to the rows in the report.
Chromatographic traces in the EICs are colored and labeled by their sample class. Sample classes
take their color from the current palette. The color a sample class is assigned is dependent its order
in the xcmsSet object, not the order given in the class arguments. Thus levels(sampclass(object))[1]
would use color palette()[1] and so on. In that way, sample classes maintain the same color
across any number of different generated reports.
When there are multiple sample classes, xcms will produce boxplots of the different classes and
will generate a single anova p-value statistic. Like the eics the plot number corresponds to the row
number in the report.
Value
A data frame with the following columns:
fold
mean fold change (always greater than 1, see tstat for which set of sample
classes was higher)
tstat
Welchs two sample t-statistic, positive for analytes having greater intensity in
class2, negative for analytes having greater intensity in class1
pvalue
p-value of t-statistic
anova
mzmed
mzmin
mzmax
rtmed
rtmin
rtmax
npeaks
Sample Classes number samples from each sample class represented in the group
metlin
...
Sample Names
...
Methods
object = "xcmsSet" diffreport(object, class1 = levels(sampclass(object))[1],
See Also
xcmsSet-class, mt.teststat, palette
class2 = le
10
etg
etg
Description
A general function for asymmetric chromatographic peaks.
Usage
etg(x, H, t1, tt, k1, kt, lambda1, lambdat, alpha, beta)
Arguments
x
peak height
t1
tt
k1
kt
lambda1
lambdat
alpha
beta
Value
The function evaluated at times x.
Author(s)
Colin A. Smith, <csmith@scripps.edu>
References
Jianwei Li. Development and Evaluation of Flexible Empirical Peak Functions for Processing Chromatographic Peaks. Anal. Chem., 69 (21), 4452-4462, 1997. http://dx.doi.org/10.1021/
ac970481d
fillPeaks-methods
fillPeaks-methods
11
Description
For each sample, identify peak groups where that sample is not represented. For each of those peak
groups, integrate the signal in the region of that peak group and create a new peak.
Arguments
object
method
Details
After peak grouping, there will always be peak groups that do not include peaks from every sample.
This method produces intensity values for those missing samples by integrating raw data in peak
group region. According to the type of raw-data there are 2 different methods available. for filling
gcms/lcms data the method "chrom" integrates raw-data in the chromatographic domain, whereas
"MSW" is used for peaklists without retention-time information like those from direct-infusion
spectra.
Value
A xcmsSet objects with filled in peak groups.
Methods
object = "xcmsSet" fillPeaks(object, method="")
See Also
xcmsSet-class, getPeaks
fillPeaks.chrom-methods
Integrate areas of missing peaks
Description
For each sample, identify peak groups where that sample is not represented. For each of those peak
groups, integrate the signal in the region of that peak group and create a new peak.
12
fillPeaks.MSW-methods
Arguments
object
nSlaves
number of slaves/cores to be used for parallel peak filling. MPI is used if installed, otherwise the snow package is employed for multicore support.
expand.mz
expand.rt
Expansion factor for the rentention time range used for integration.
Details
After peak grouping, there will always be peak groups that do not include peaks from every sample.
This method produces intensity values for those missing samples by integrating raw data in peak
group region. In a given group, the start and ending retention time points for integration are defined
by the median start and end points of the other detected peaks. The start and end m/z values are
similarly determined. Intensities can be still be zero, which is a rather unusual intensity for a peak.
This is the case if e.g. the raw data was threshholded, and the integration area contains no actual
raw intensities, or if one sample is miscalibrated, such thet the raw data points are (just) outside the
integration area.
Importantly, if retention time correction data is available, the alignment information is used to more
precisely integrate the propper region of the raw data. If the corrected retention time is beyond the
end of the raw data, the value will be not-a-number (NaN).
Value
A xcmsSet objects with filled in peak groups (into and maxo).
Methods
object = "xcmsSet" fillPeaks.chrom(object, nSlaves=0,expand.mz=1,expand.rt=1)
See Also
xcmsSet-class, getPeaks fillPeaks
Description
For each sample, identify peak groups where that sample is not represented. For each of those peak
groups, integrate the signal in the region of that peak group and create a new peak.
Arguments
object
findMZ
13
Details
After peak grouping, there will always be peak groups that do not include peaks from every sample.
This method produces intensity values for those missing samples by integrating raw data in peak
group region. In a given group, the start and ending m/z values for integration are defined by the
median start and end points of the other detected peaks.
Value
A xcmsSet objects with filled in peak groups.
Methods
object = "xcmsSet" fillPeaks.MSW(object)
See Also
xcmsSet-class, getPeaks fillPeaks
findMZ
Description
This is a method to find a fragment mass with a ppm window in a xcmsFragment object
Usage
findMZ(object, find, ppmE=25, print=TRUE)
Arguments
object
find
ppmE
Details
The method simply searches for a given fragment ion in an xcmsFragment object type given a
certain ppm error window
14
findMZ
Value
A data frame with the following columns:
PrecursorMz
MSnParentPeakID
An index ID of the location of the precursor peak in the xcmsFragment object
msLevel
rt
mz
intensity
sample
GroupPeakMSn
CollisionEnergy
The collision energy of the precursor scan
Author(s)
H. Paul Benton, <hpaul.beonton08@imperial.ac.uk>
References
H. Paul Benton, D.M. Wong, S.A.Strauger, G. Siuzdak "XCM S 2 " Analytical Chemistry 2008
See Also
findneutral,
Examples
## Not run:
library(msdata)
mzdatapath <- system.file("iontrap", package = "msdata")
mzdatafiles<-list.files(mzdatapath, pattern = "extracted.mzData", recursive = TRUE, full.names = TRUE)
xs <- xcmsSet(mzdatafiles, method = "MS1")
##takes only one file from the file set
xfrag <- xcmsFragments(xs)
found<-findMZ(xfrag, 657.3433, 50)
## End(Not run)
findneutral
findneutral
15
Description
This is a method to find a neutral loss with a ppm window in a xcmsFragment object
Usage
findneutral(object, find, ppmE=25, print=TRUE)
Arguments
object
find
ppmE
Details
The method searches for a given neutral loss in an xcmsFragment object type given a certain ppm
error window. The neutral losses are generated between neighbouring ions. The resulting data
frame shows the whole scan in which the neutral loss was found.
Value
A data frame with the following columns:
PrecursorMz
The precursor m/z of the neutral losses
MSnParentPeakID
An index ID of the location of the precursor peak in the xcmsFragment object
msLevel
rt
mz
intensity
sample
GroupPeakMSn
an ID if the peaks were grouped by an xcmsSet grouping
CollisionEnergy
The collision energy of the precursor scan
Author(s)
H. Paul Benton, <hpbenton@scripps.edu>
16
findPeaks-methods
References
H. Paul Benton, D.M. Wong, S.A.Strauger, G. Siuzdak "XCM S 2 " Analytical Chemistry 2008
See Also
findMZ,
Examples
## Not run:
library(msdata)
mzdatapath <- system.file("iontrap", package = "msdata")
mzdatafiles<-list.files(mzdatapath, pattern = "extracted.mzData", recursive = TRUE, full.names = TRUE)
xs <- xcmsSet(mzdatafiles, method = "MS1")
##takes only one file from the file set
xfrag <- xcmsFragments(xs)
found<-findneutral(xfrag, 58.1455, 50)
## End(Not run)
findPeaks-methods
Description
A number of peak pickers exist in XCMS. findPeaks is the generic method.
Arguments
object
xcmsRaw-class object
method
...
Details
Different algorithms can be used by specifying them with the method argument. For example to use
the matched filter approach described by Smith et al (2006) one would use: findPeaks(object, method="matchedFilter")
This is also the default.
Further arguments given by ... are passed through to the function implementing the method.
findPeaks.centWave-methods
17
Value
A matrix with columns:
mz
mzmin
mzmax
rt
rtmin
rtmax
into
maxo
findPeaks(object, ...)
See Also
findPeaks.matchedFilter findPeaks.centWave xcmsRaw-class
findPeaks.centWave-methods
Feature detection for high resolution LC/MS data
Description
Peak density and wavelet based feature detection for high resolution LC/MS data in centroid mode
Arguments
object
xcmsSet object
ppm
maxmial tolerated m/z deviation in consecutive scans, in ppm (parts per million)
peakwidth
snthresh
prefilter
prefilter=c(k,I). Prefilter step for the first phase. Mass traces are only retained if they contain at least k peaks with intensity >= I.
mzCenterFun
Function to calculate the m/z center of the feature: wMean intensity weighted
mean of the feature m/z values, mean mean of the feature m/z values, apex use
m/z value at peak apex, wMeanApex3 intensity weighted mean of the m/z value
at peak apex and the m/z value left and right of it, meanApex3 mean of the m/z
value at peak apex and the m/z value left and right of it.
18
findPeaks.centWave-methods
integrate
Integration method. If =1 peak limits are found through descent on the mexican
hat filtered data, if =2 the descent is done on the real data. Method 2 is very
accurate but prone to noise, while method 1 is more robust to noise but less
exact.
mzdiff
minimum difference in m/z for peaks with overlapping retention times, can be
negative to allow overlap
fitgauss
scanrange
noise
optional argument which is useful for data that was centroided without any intensity threshold, centroids with intensity < noise are omitted from ROI detection
sleep
number of seconds to pause between plotting peak finding cycles
verbose.columns
logical, if TRUE additional peak meta data columns are returned
ROI.list
A optional list of ROIs that represents detected mass traces (ROIs). If this list is
empty (default) then centWave detects the mass trace ROIs, otherwise this step
is skipped and the supplied ROIs are used in the peak detection phase. Each ROI
object in the list has the following slots: scmin start scan index, scmax end scan
index, mzmin minimum m/z, mzmax maximum m/z, length number of scans,
intensity summed intensity.
Details
This algorithm is most suitable for high resolution LC/{TOF,OrbiTrap,FTICR}-MS data in centroid
mode. In the first phase of the method mass traces (characterised as regions with less than ppm m/z
deviation in consecutive scans) in the LC/MS map are located. In the second phase these mass traces
are further analysed. Continuous wavelet transform (CWT) is used to locate chromatographic peaks
on different scales.
Value
A matrix with columns:
mz
mzmin
mzmax
rt
rtmin
rtmax
into
intb
maxo
sn
findPeaks.massifquant-methods
egauss
19
mu
Gaussian parameter mu
sigma
Gaussian parameter h
dppm
scale
scpos
scmin
scmax
Methods
object = "xcmsRaw"
Author(s)
Ralf Tautenhahn
References
Ralf Tautenhahn, Christoph B\"ottcher, and Steffen Neumann "Highly sensitive feature detection
for high resolution LC/MS" BMC Bioinformatics 2008, 9:504
See Also
findPeaks-methods xcmsRaw-class
findPeaks.massifquant-methods
Feature detection for XC-MS data.
Description
Massifquant is a Kalman filter (KF) based feature detection for XC-MS data in centroid mode
(currently in experimental stage). Optionally allows for calling the method "centWave" on features
discovered by Massifquant to further refine the feature detection; to do so, supply any additional
parameters specific to centWave (even more experimental). The method may be conveniently called
through the xcmsSet(...) method.
prefilt
20
findPeaks.massifquant-methods
Arguments
The following arguments are specific to Massifquant. Any additional arguments
supplied must correspond as specified by the method findPeaks.centWave.
An xcmsRaw object.
object
criticalValue
Numeric: Suggested values: (0.1-3.0). This setting helps determine the the
Kalman Filter prediciton margin of error. A real centroid belonging to a bonafide
feature must fall within the KF prediction margin of error. Much like in the construction of a confidence interval, criticalVal loosely translates to be a multiplier
of the standard error of the prediction reported by the Kalman Filter. If the features in the XC-MS sample have a small mass deviance in ppm error, a smaller
critical value might be better and vice versa.
consecMissedLimit
Integer: Suggested values:(1,2,3). While a feature is in the proces of being
detected by a Kalman Filter, the Kalman Filter may not find a predicted centroid
in every scan. After 1 or more consecutive failed predictions, this setting informs
Massifquant when to stop a Kalman Filter from following a candidate feature.
prefilter
Numeric Vector: (Positive Integer, Positive Numeric): The first argument is only
used if (withWave = 1); see centWave for details. The second argument specifies
the minimum threshold for the maximum intensity of a feature that must be met.
peakwidth
Integer Vector: (Positive Integer, Positive Integer): Only the first argument is
used for Massifquant, which specifices the minimum feature length in time
scans. If centWave is used, then the second argument is the maximum feature
length subject to being greater than the mininum feature length.
ppm
The minimum estimated parts per million mass resolution a feature must possess.
unions
withWave
Integer: set to 1 if turned on; set to 0 if turned off. Allows the user to find
features first with Massifquant and then filter those features with the second
phase of centWave, which includes wavelet estimation.
checkBack
Integer: set to 1 if turned on; set to 0 if turned off. The convergence of a Kalman
Filter to a features precise m/z mapping is very fast, but sometimes it incorporates erroneous centroids as part of a feature (especially early on). The "scanBack" option is an attempt to remove the occasional outlier that lies beyond the
converged bounds of the Kalman Filter. The option does not directly affect identification of a feature because it is a postprocessing measure; it has not shown to
be a extremely useful thus far and the default is set to being turned off.
findPeaks.massifquant-methods
21
Details
This algorithms performance has been tested rigorously on high resolution LC/{OrbiTrap, TOF}MS data in centroid mode. Simultaneous kalman filters identify features and calculate their area
under the curve. The default parameters are set to operate on a complex LC-MS Orbitrap sample.
Users will find it useful to do some simple exploratory data analysis to find out where to set a minimum intensity, and identify how many scans an average feature spans. The "consecMissedLimit"
parameter has yielded good performance on Orbitrap data when set to (2) and on TOF data it was
found best to be at (1). This may change as the algorithm has yet to be tested on many samples. The
"criticalValue" parameter is perhaps most dificult to dial in appropriately and visual inspection of
peak identification is the best suggested tool for quick optimization. The "ppm" and "checkBack"
parameters have shown less influence than the other parameters and exist to give users flexibility
and better accuracy.
Value
If the method findPeaks.massifquant(...) is used, then a matrix is returned with rows corresponding
to features, and properties of the features listed with the following column names. Otherwise, if
centWave feature is used also (withWave = 1), or Massifquant is called through the xcmsSet(...)
method, then their corresponding return values are used.
mz
mzmin
mzmax
rtmin
rtmax
into
area
Methods
object = "xcmsRaw" findPeaks.massifquant(object, ppm=10, peakwidth=c(20,50), snthresh=10,
Author(s)
Christopher Conley
References
Submitted for review. Christopher Conley, Ralf J .O Torgrip. Ryan Taylor, and John T. Prince.
"Massifquant: open-source Kalman filter based XC-MS feature detection". August 2013.
See Also
findPeaks-methods xcmsSet xcmsRaw xcmsRaw-class
prefilt
22
findPeaks.matchedFilter-methods
Examples
library(faahKO)
library(xcms)
#load all the wild type and Knock out samples
cdfpath <- system.file("cdf", package = "faahKO")
cdffiles <- list.files(cdfpath, recursive = TRUE, full.names = TRUE)
# run the massifquant analysis
xset <- xcmsSet(cdffiles, method = "massifquant",
consecMissedLimit = 1,
snthresh = 10,
criticalValue = 1.73,
ppm = 10,
peakwidth= c(30, 60),
prefilter= c(1,3000),
withWave = 0);
findPeaks.matchedFilter-methods
Feature detection in the chromatographic time domain
Description
Find peaks in extracted the chromatographic time domain of the profile matrix.
Arguments
object
xcmsRaw object
fwhm
full width at half maximum of matched filtration gaussian model peak. Only
used to calculate the actual sigma, see below.
sigma
max
snthresh
step
steps
mzdiff
index
sleep
scanrange
findPeaks.MS1-methods
23
Value
A matrix with columns:
mz
mzmin
mzmax
rt
rtmin
rtmax
into
intf
maxo
maxf
sn
Methods
object = "xcmsRaw"
Author(s)
Colin A. Smith, <csmith@scripps.edu>
See Also
findPeaks-methods xcmsRaw-class
Description
Collecting Tandem MS or MS$^n$ Mass Spectrometry precursor peaks as annotated in XML raw
file
Arguments
object
xcmsRaw object
snt
24
findPeaks.MS1-methods
Details
Some mass spectrometers can acquire MS1 and MS2 (or MS$^n$ scans) quasi simultaneously, e.g.
in data dependent tandem MS or DDIT mode.
Since xcmsFragments attaches all MS$^n$ peaks to MS1 peaks in xcmsSet, it is important that
findPeaks and xcmsSet do not miss any MS1 precursor peak.
To be sure that all MS1 precursor peaks are in an xcmsSet, findPeaks.MS1 does not do an actual
peak picking, but simply uses the annotation stored in mzXML, mzData or mzML raw files.
This relies on the following XML tags:
mzData:
<spectrum id="463">
<spectrumInstrument msLevel="2">
<cvParam cvLabel="psi" accession="PSI:1000039" name="TimeInSeconds" value="92.7743"/>
</spectrumInstrument>
<precursor msLevel="1" spectrumRef="461">
<cvParam cvLabel="psi" accession="PSI:1000040" name="MassToChargeRatio" value="462.091"/>
<cvParam cvLabel="psi" accession="PSI:1000042" name="Intensity" value="366.674"/>
</precursor>
</spectrum>
mzXML:
</scan>
<precursorMz precursorIntensit
Several mzXML and mzData converters are known to create incomplete files, either without intensities (they will be set to 0) or without the precursor retention time (then a reasonably close rt will
be chosen. NYI).
Value
A matrix with columns:
mz, mzmin, mzmax
annotated MS1 precursor selection mass
rt, rtmin, rtmax
annotated MS1 precursor retention time
into, maxo, sn annotated MS1 precursor intensity
Methods
object = "xcmsRaw"
findPeaks.MS1(object)
Author(s)
Steffen Neumann, <sneumann@ipb-halle.de>
See Also
findPeaks-methods xcmsRaw-class
findPeaks.MSW-methods
25
Description
Processing Mass Spectrometry direct-injection spectrum by using wavelet based algorithm.
Arguments
object
xcmsSet object
snthresh
scales
scales of CWT
nearbyPeak
Determine whether to include the nearby small peaks of major peaks. TRUE by
default
sleep
number of seconds to pause between plotting peak finding cycles
verbose.columns
additional peak meta data columns are returned
Details
This is a wrapper around the peak picker in the bioconductor package MassSpecWavelet calling
cwt, get.localMaximum.cwt, get.ridge, identify.majorPeaks and tuneIn.peakInfo.
Value
A matrix with columns:
mz
mzmin
mzmax
rt
always -1
rtmin
always -1
rtmax
always -1
into
maxo
intf
always NA
maxf
sn
Signal/Noise ratio
Methods
object = "xcmsRaw"
findPeaks.MSW(object, snthresh=3,
scales=seq(1,22,3), nearbyPeak=TRUE,
pe
26
getEIC-methods
Author(s)
Steffen Neumann, Joachim kutzera, <sneumann|jkutzer@ipb-halle.de>
See Also
findPeaks-methods xcmsRaw-class peakDetectionCWT
getEIC-methods
Description
Generate multiple extracted ion chromatograms for m/z values of interest. For xcmsSet objects,
reread original raw data and apply precomputed retention time correction, if applicable.
Arguments
object
mzrange
either a two column matrix with minimum or maximum m/z or a matrix of any
dimensions containing columns mzmin and mzmax
for xcmsSet objects, if left blank the group data will be used instead
rtrange
a two column matrix the same size as mzrange with minimum and maximum
retention times between which to return EIC data points
for xcmsSet objects, it may also be a single number specifying the time window
around the peak to return EIC data points
step
groupidx
either character vector with names or integer vector with indicies of peak groups
for which to get EICs
sampleidx
either character vector with names or integer vector with indicies of samples for
which to get EICs
rt
"corrected" for using corrected retention times, or "raw" for using raw retention times
Value
For xcmsRaw objects, if rtrange is NULL, an intensity matrix with a row for each mzmin, mzmax
pair. Columns correspond to individual scans. If rtrange is not NULL, a list of two column
(retention time/intensity) matricies, one for each mzmin, mzmax pair.
For xcmsSet objects, an xcmsEIC object.
Methods
object = "xcmsRaw" getEIC(object, mzrange, rtrange = NULL, step = 0.1)
object = "xcmsSet" getEIC(object, mzrange, rtrange = 200, groupidx,
sampleidx = sampnames(o
getPeaks-methods
27
See Also
xcmsRaw-class, xcmsSet-class, xcmsEIC-class
getPeaks-methods
Description
Integrate extracted ion chromatograms in pre-defined defined regions. Return output similar to
findPeaks.
Arguments
object
peakrange
matrix or data frame with 4 columns: mzmin, mzmax, rtmin, rtmax (they must
be in that order or named)
step
Value
A matrix with columns:
i
mz
mzmin
mzmax
ret
retmin
retmax
into
intf
maxo
maxf
Methods
object = "xcmsRaw" getPeaks(object, peakrange, step = 0.1)
See Also
xcmsRaw-class
28
getSpec-methods
getScan-methods
Description
Return the data from a single mass scan using the numeric index of the scan as a reference.
Arguments
object
scan
integer index of scan. if negative, the index numbered from the end
mzrange
Value
A matrix with two columns:
mz
m/z values
intensity
intensity values
Methods
object = "xcmsRaw" getScan(object, scan, mzrange = numeric()) getMsnScan(object, scan, mzrange = numer
See Also
xcmsRaw-class, getSpec
getSpec-methods
Get average m/z and intensity values for multiple mass scans
Description
Return full-resolution averaged data from multiple mass scans.
Arguments
object
...
arguments passed to profRange used to sepecify the spectral segments of interest for averaging
Details
Based on the mass points from the spectra selected, a master unique list of masses is generated.
Every spectra is interpolated at those masses and then averaged.
group-methods
29
Value
A matrix with two columns:
mz
intensity
m/z values
intensity values
Methods
object = "xcmsRaw" getSpec(object, ...)
See Also
xcmsRaw-class, profRange, getScan
group-methods
Description
A number of grouping (or alignment) methods exist in XCMS. group is the generic method.
Arguments
object
method
...
xcmsSet-class object
Method to use for grouping. See details.
Optional arguments to be passed along
Details
Different algorithms can be used by specifying them with the method argument. For example to use
the density-based approach described by Smith et al (2006) one would use: group(object, method="density").
This is also the default.
Further arguments given by ... are passed through to the function implementing the method.
A character vector of nicknames for the algorithms available is returned by getOption("BioC")$xcms$group.methods.
If the nickname of a method is called "mzClust", the help page for that specific method can be accessed with ?group.mzClust.
Value
An xcmsSet object with peak group assignments and statistics.
Methods
object = "xcmsSet"
group(object, ...)
See Also
group.density group.mzClust group.nearest xcmsSet-class,
30
group.density
group.density
Description
Group peaks together across samples using overlapping m/z bins and calculation of smoothed peak
distributions in chromatographic time.
Arguments
object
minfrac
minimum fraction of samples necessary in at least one of the sample groups for
it to be a valid group
minsamp
minimum number of samples necessary in at least one of the sample groups for
it to be a valid group
bw
bandwidth (standard deviation or half width at half maximum) of gaussian smoothing kernel to apply to the peak density chromatogram
mzwid
width of overlapping m/z slices to use for creating peak density chromatograms
and grouping peaks across samples
max
sleep
seconds to pause between plotting successive steps of the peak grouping algorithm. peaks are plotted as points showing relative intensity. identified groups
are flanked by dotted vertical lines.
Value
An xcmsSet object with peak group assignments and statistics.
Methods
object = "xcmsSet"
See Also
xcmsSet-class, density
group.mzClust
31
group.mzClust
Description
Runs high resolution alignment on single spectra samples stored in a given xcmsSet.
Arguments
object
mzppm
the relative error used for clustering/grouping in ppm (parts per million)
mzabs
minsamp
minfrac
Value
Returns a xcmsSet with slots groups and groupindex set.
Methods
object = "xcmsSet"
References
Saira A. Kazmi, Samiran Ghosh, Dong-Guk Shin, Dennis W. Hill and David F. Grant
Alignment of high resolution mass spectra: development of a heuristic approach for metabolomics.
Metabolomics, Vol. 2, No. 2, 75-83 (2006)
See Also
xcmsSet-class,
Examples
## Not run:
library(msdata)
mzdatapath <- system.file("fticr", package = "msdata")
mzdatafiles <- list.files(mzdatapath, recursive = TRUE, full.names = TRUE)
xs <- xcmsSet(method="MSW", files=mzdatafiles, scales=c(1,7), SNR.method='data.mean' , winSize.noise=500,
peakThr=80000, amp.Th=0.005)
xsg <- group(xs, method="mzClust")
## End(Not run)
32
group.nearest
group.nearest
Description
Group peaks together across samples by creating a master peak list and assigning corresponding
peaks from all samples. It is inspired by the alignment algorithm of mzMine. For further details
check http://mzmine.sourceforge.net/ and
Katajamaa M, Miettinen J, Oresic M: MZmine: Toolbox for processing and visualization of mass
spectrometry based molecular profile data. Bioinformatics (Oxford, England) 2006, 22:634?636.
Currently, there is no equivalent to minfrac or minsamp.
Arguments
object
mzVsRTbalance
mzCheck
rtCheck
kNN
Value
An xcmsSet object with peak group assignments and statistics.
Methods
object = "xcmsSet"
See Also
xcmsSet-class, group.density and group.mzClust
Examples
## Not run: library(xcms)
library(faahKO) ## These files do not have this problem to correct for but just for an example
cdfpath <- system.file("cdf", package = "faahKO")
cdffiles <- list.files(cdfpath, recursive = TRUE, full.names = TRUE)
xset<-xcmsSet(cdffiles)
gxset<-group(xset, method="nearest")
## this is the same as
# gxset<-group.nearest(xset)
nrow(gxset@groups) == 1096 ## the number of features before minFrac
groupnames-methods
33
post.minFrac<-function(object, minFrac=0.5){
ix.minFrac<-sapply(1:length(unique(sampclass(object))), function(x, object, mf){
meta<-groups(object)
minFrac.idx<-numeric(length=nrow(meta))
idx<-which(meta[,levels(sampclass(object))[x]] >= mf*length(which(levels(sampclass(object))[x] == sampclass(obj
minFrac.idx[idx]<-1
return(minFrac.idx)
}, object, minFrac)
ix.minFrac<-as.logical(apply(ix.minFrac, 1, sum))
ix<-which(ix.minFrac == TRUE)
return(ix)
}
## using the above function we can get a post processing minFrac
idx<-post.minFrac(gxset)
gxset.post<-gxset ## copy the xcmsSet object
gxset.post@groupidx<-gxset@groupidx[idx]
gxset.post@groups<-gxset@groups[idx,]
nrow(gxset.post@groups) == 465 ## this is the number of features after minFrac
## End(Not run)
groupnames-methods
Description
Allow linking of peak group data between classes using unique group names that remain the same
as long as no re-grouping occurs.
Arguments
object
mzdec
rtdec
template
a character vector with existing group names whose format should be emulated
Value
A character vector with unique names for each peak group in the object. The format is M[m/z]T[time in seconds].
Methods
object = "xcmsSet" (object, mzdec = 0, rtdec = 0, template = NULL)
object = "xcmsEIC" (object)
34
groupval-methods
See Also
xcmsSet-class, xcmsEIC-class
groupval-methods
Description
Generate a matrix of peak values with rows for every group and columns for every sample. The
value included in the matrix can be any of the columns from the xcmsSet peaks slot matrix. Collisions where more than one peak from a single sample are in the same group get resolved with one
of several user-selectable methods.
Arguments
object
method
conflict resolution method, "medret" to use the peak closest to the median retention time or "maxint" to use the peak with the highest intensity
value
name of peak column to enter into returned matrix, or "index" for index to the
corresponding row in the peaks slot matrix
intensity
Value
A matrix with with rows for every group and columns for every sample. Missing peaks have NA
values.
Methods
object = "xcmsSet" groupval(object, method = c("medret", "maxint"),
See Also
xcmsSet-class
image-methods
image-methods
35
Description
Create log intensity false-color image of a xcmsRaw object plotted with m/z and retention time axes
Arguments
x
xcmsRaw object
col
...
Methods
x = "xcmsRaw"
Author(s)
Colin A. Smith, <csmith@scripps.edu>
See Also
xcmsRaw-class
loadRaw-methods
Description
This function extracts the raw data which will be used an xcmsRaw object. Further processing of
data is done in the xcmsRaw constructor.
Arguments
object
Details
The implementing methods decide how to gather the data.
36
medianFilter
Value
A list containing elements describing the data source. The rt, scanindex, tic, and acquisitionNum
components each have one entry per scan. They are "parallel" in the sense that rt[1], scanindex[1],
and acquisitionNum[1] all refer to the same scan. The list containst he following components:
rt
Numeric vector with acquisition time (in seconds) for each scan
tic
scanindex
Integer vector with starting positions of each scan in the mz and intensity
components. It is an exclusive offset, so scanindex[i] is the offset in mz and
intensity before the beginning of scan i. This means that the mz (respectively intensity) values for scan i would be from scanindex[i] + 1 to
scanindex[i + 1]
mz
intensity
Methods
signature(object = "xcmsSource") Uses loadRaw,xcmsSource-method to extract raw data.
Subclasses of xcmsSource can provide different ways of fetching data.
Author(s)
Daniel Hackney, <dan@haxney.org>
See Also
xcmsRaw-class, xcmsSource
medianFilter
Description
For each element in a matix, replace it with the median of the values around it.
Usage
medianFilter(x, mrad, nrad)
Arguments
x
mrad
number of rows on either side of the value to use for median calculation
nrad
number of rows on either side of the value to use for median calculation
msn2xcmsRaw
37
Value
A matrix whose values have been median filtered
Author(s)
Colin A. Smith, <csmith@scripps.edu>
Examples
mat <- matrix(1:25, nrow=5)
mat
medianFilter(mat, 1, 1)
msn2xcmsRaw
Description
The MS2 and MSn data is stored in separate slots, and can not directly be used by e.g. findPeaks().
msn2xcmsRaw() will copy the MSn spectra into the "normal" xcmsRaw slots.
Usage
msn2xcmsRaw(xmsn)
Arguments
xmsn
Details
The default gap value is determined from the 90th percentile of the pair-wise differences between
adjacent mass values.
Value
An xcmsRaw object
Author(s)
Steffen Neumann <sneumann@ipb-halle.de>
See Also
xcmsRaw,
38
peakPlots-methods
Examples
msnfile <- system.file("microtofq/MSMSpos20_6.mzML", package = "msdata")
xrmsn <- xcmsRaw(msnfile, includeMSn=TRUE)
xr <- msn2xcmsRaw(xrmsn)
p <- findPeaks(xr, method="centWave")
peakPlots-methods
Description
Plot extracted ion chromatograms for many peaks simultaneously, indicating peak integration start
and end points with vertical grey lines.
Arguments
object
peaks
figs
two-element vector describing the number of rows and the number of columns
of peaks to plot, if missing then an approximately square grid that will fit the
number of peaks supplied
width
Details
This function is intended to help graphically analyze the results of peak picking. It can help estimate
the number of false positives and improper integration start and end points. Its output is very
compact and tries to waste as little space as possible. Each plot is labeled with rounded m/z and
retention time separated by a space.
Methods
signature(object = "xcmsSet") plotPeaks(object, peaks, figs, width = 200)
See Also
xcmsRaw-class, findPeaks, split.screen
peakTable-methods
peakTable-methods
39
Description
Create a report showing all aligned peaks.
Arguments
object
filebase
base file name to save report, .tsv file and _eic will be appended to this name
for the tabular report and EIC directory, respectively. if blank nothing will be
saved
...
Details
This method handles creation of summary reports similar to diffreport. It returns a summary
report that can optionally be written out to a tab-separated file.
If a base file name is provided, the report (see Value section) will be saved to a tab separated file.
Value
A data frame with the following columns:
mz
mzmin
mzmax
rt
rtmin
rtmax
npeaks
Sample Classes number samples from each sample class represented in the group
...
Sample Names
...
Methods
object = "xcmsSet" peakTable(object, filebase = character(), ...)
See Also
xcmsSet-class,
40
plot.xcmsEIC
Examples
## Not run:
library(faahKO)
cdfpath <- system.file("cdf", package = "faahKO")
cdffiles <- list.files(cdfpath, recursive = TRUE, full.names = TRUE)
xs<-xcmsSet(cdf files)
xs<-group(xs)
peakTable(xs, filebase="peakList")
## End(Not run)
plot.xcmsEIC
Description
Batch plot a list of extracted ion chromatograms to the current graphics device.
Arguments
x
groupidx
either character vector with names or integer vector with indicies of peak groups
for which to plot EICs
sampleidx
either character vector with names or integer vector with indicies of samples for
which to plot EICs
rtrange
a two column matrix with minimum and maximum retention times between
which to return EIC data points
if it has the same number of rows as the number groups in the xcmsEIC object,
then sampleidx is used to subset it. otherwise, it is repeated over the length of
sampleidx
it may also be a single number specifying the time window around the peak for
which to plot EIC data
col
color to use for plotting extracted ion chromatograms. if missing and y is specified, colors are taken from unclass(sampclass(y)) and the default palette
if it is the same length as the number groups in the xcmsEIC object, then sampleidx
is used to subset it. otherwise, it is repeated over the length of sampleidx
legtext
text to use for legend. if NULL and y is specified, legend text is taken from the
sample class information found in the xcmsSet
peakint
logical, plot integrated peak area with darkened lines (requires that y also be
specified)
sleep
...
plotChrom-methods
41
Value
A xcmsSet object.
Methods
plotChrom-methods
Description
Uses the pre-generated profile mode matrix to plot averaged or base peak extracted ion chromatograms over a specified mass range.
Arguments
object
base
ident
fitgauss
vline
...
Value
If ident == TRUE, an integer vector with the indecies of the points that were identified. If
fitgauss == TRUE, a nls model with the fitted gaussian. Otherwise a two-column matrix with the
plotted points.
Methods
object = "xcmsRaw" plotChrom(object, base = FALSE, ident = FALSE,
See Also
xcmsRaw-class
42
plotPeaks-methods
plotEIC-methods
Description
Plot extracted ion chromatogram for m/z values of interest. The raw data is used in contrast to
plotChrom which uses data from the profile matrix.
Arguments
object
xcmsRaw object
mzrange
rtrange
scanrange
mzdec
Value
A two-column matrix with the plotted points.
Methods
object = "xcmsRaw"
Author(s)
Ralf Tautenhahn
See Also
rawEIC,xcmsRaw-class
plotPeaks-methods
Description
Plot extracted ion chromatograms for many peaks simultaneously, indicating peak integration start
and end points with vertical grey lines.
scanrange = numeri
plotQC
43
Arguments
object
peaks
figs
two-element vector describing the number of rows and the number of columns
of peaks to plot, if missing then an approximately square grid that will fit the
number of peaks supplied
width
Details
This function is intended to help graphically analyze the results of peak picking. It can help estimate
the number of false positives and improper integration start and end points. Its output is very
compact and tries to waste as little space as possible. Each plot is labeled with rounded m/z and
retention time separated by a space.
Methods
object = "xcmsRaw" plotPeaks(object, peaks, figs, width = 200)
See Also
xcmsRaw-class, findPeaks, split.screen
plotQC
Description
Use "democracy" to determine the average m/z and RT deviations for a grouped xcmsSet, and
dependency on sample or absolute m/z
Usage
plotQC(object, sampNames, sampColors, sampOrder, what)
Arguments
object
A grouped xcmsSet
sampNames
sampColors
sampOrder
44
plotRaw-methods
what
A vector of which QC plots to generate. "mzdevhist": histogram of mz deviations. Should be gaussian shaped. If it is multimodal, then some peaks seem to
have a systematically higher m/z deviation "rtdevhist": histogram of RT deviations. Should be gaussian shaped. If it is multimodal, then some peaks seem
to have a systematically higher RT deviation "mzdevmass": Shows whether m/z
deviations are absolute m/z dependent, could indicate miscalibration "mzdevtime": Shows whether m/z deviations are RT dependent, could indicate instrument drift "mzdevsample": median mz deviation for each sample, indicates outliers "rtdevsample": median RT deviation for each sample, indicates outliers
Details
plotQC() is a warpper to create a set of diagnostic plots. For the m/z deviations, the median of all
m/z withon one group are assumed.
Value
No return value
Author(s)
Michael Wenk, Michael Wenk <michael.wenk@student.uni-halle.de>
Examples
library(faahKO)
xsg <- group(faahko)
plotQC(xsg,
plotQC(xsg,
plotQC(xsg,
plotQC(xsg,
plotQC(xsg,
plotQC(xsg,
what="mzdevhist")
what="rtdevhist")
what="mzdevmass")
what="mzdevtime")
what="mzdevsample")
what="rtdevsample")
plotRaw-methods
Description
Produce a scatterplot showing raw data point location in retention time and m/z. This plot is more
useful for centroided data than continuum data.
Arguments
object
mzrange
numeric vector of length >= 2 whose range will be used to select the masses to
plot
plotrt-methods
45
rtrange
numeric vector of length >= 2 whose range will be used to select the retention
times to plot
scanrange
numeric vector of length >= 2 whose range will be used to select scans to plot
log
title
Value
A matrix with the points plotted.
Methods
object = "xcmsRaw" plotRaw(object, mzrange = numeric(), rtrange = numeric(),
scanrange = n
See Also
xcmsRaw-class
plotrt-methods
Description
Use corrected retention times for each sample to calculate retention time deviation profiles and plot
each on the same graph.
Arguments
object
col
ty
leg
densplit
Methods
object = "xcmsSet" plotrt(object, col = NULL, ty = NULL, leg = TRUE,
See Also
xcmsSet-class, retcor
densplit = FALSE)
46
plotSpec-methods
plotScan-methods
Description
Plot a single mass scan using the impulse representation. Most useful for centroided data.
Arguments
object
scan
mzrange
numeric vector of length >= 2 whose range will be used to select masses to plot
ident
Methods
object = "xcmsRaw" plotScan(object, scan, mzrange = numeric(), ident = FALSE)
See Also
xcmsRaw-class
plotSpec-methods
Description
Uses the pre-generated profile mode matrix to plot mass spectra over a specified retention time
range.
Arguments
object
ident
vline
...
Value
If ident == TRUE, an integer vector with the indecies of the points that were identified. Otherwise
a two-column matrix with the plotted points.
Methods
object = "xcmsRaw" plotSpec(object, ident = FALSE, vline = numeric(0), ...)
plotSurf-methods
47
See Also
xcmsRaw-class
plotSurf-methods
Description
This method uses the rgl package to create interactive three dimensonal representations of the profile
matrix. It uses the terrain color scheme.
Arguments
object
log
aspect
numeric vector with aspect ratio of the m/z, retention time and intensity components of the plot
...
Details
The rgl package is still in development and imposes some limitations on the output format. A bug
in the axis label code means that the axis labels only go from 0 to the aspect ratio constant of that
axis. Additionally the axes are not labeled with what they are.
It is important to only plot a small portion of the profile matrix. Large portions can quickly overwhelm your CPU and memory.
Methods
object = "xcmsRaw" plotSurf(object, log = FALSE, aspect = c(1, 1, .5), ...)
See Also
xcmsRaw-class
48
profMedFilt-methods
plotTIC-methods
Description
Plot chromatogram of total ion count. Optionally allow identification of target peaks and viewing/identification of individual spectra.
Arguments
object
ident
msident
Value
If ident == TRUE, an integer vector with the indecies of the points that were identified. Otherwise
a two-column matrix with the plotted points.
Methods
object = "xcmsRaw" plotTIC(object, ident = FALSE, msident = FALSE)
See Also
xcmsRaw-class
profMedFilt-methods
Description
Apply a median filter of given size to a profile matrix.
Arguments
object
massrad
scanrad
Methods
object = "xcmsRaw" profMedFilt(object, massrad = 0, scanrad = 0)
See Also
xcmsRaw-class, medianFilter
profMethod-methods
49
profMethod-methods
Description
These methods get and set the method for generating profile (matrix) data from raw mass spectral
data. It can currently be bin, binlin, binlinbase, or intlin.
Methods
object = "xcmsRaw" profMethod(object)
See Also
xcmsRaw-class, profMethod, profBin, plotSpec, plotChrom, findPeaks
profRange-methods
Description
Specify a subset of the profile mode matrix given a mass, time, or scan range. Allow flexible user
entry for other functions.
Arguments
object
mzrange
rtrange
scanrange
...
Details
This function handles selection of mass/time subsets of the profile matrix for other functions. It
allows the user to specify such subsets in a variety of flexible ways with minimal typing.
Because R does partial argument matching, mzrange, scanrange, and rtrange can be specified in
short form using m=, s=, and t=, respectively. If both a scanrange and rtrange are specified, then
the rtrange specification takes precedence.
When specifying ranges, you may either enter a single number or a numeric vector. If a single
number is entered, then the closest single scan or mass value is selected. If a vector is entered,
then the range is set to the range() of the values entered. That allows specification of ranges using
shortened, slightly non-standard syntax. For example, one could specify 400 to 500 seconds using
any of the following: t=c(400,500), t=c(500,400), or t=400:500. Use of the sequence operator
(:) can save several keystrokes when specifying ranges. However, while the sequence operator
works well for specifying integer ranges, fractional ranges do not always work as well.
50
profStep-methods
Value
A list with the folloing items:
mzrange
masslab
massidx
scanrange
scanlab
scanidx
rtrange
timelab
Methods
object = "xcmsRaw" profRange(object, mzrange = numeric(),
See Also
xcmsRaw-class
profStep-methods
Description
These methods get and set the m/z step for generating profile (matrix) data from raw mass spectral
data. Smaller steps yield more precision at the cost of greater memory usage.
Methods
object = "xcmsRaw" profStep(object)
See Also
xcmsRaw-class, profMethod
Examples
## Not run:
library(faahKO)
cdfpath <- system.file("cdf", package = "faahKO")
cdffiles <- list.files(cdfpath, recursive = TRUE, full.names = TRUE)
xset <- xcmsRaw(cdffiles[1])
xset
plotSurf(xset, mass=c(200,500))
rawEIC-methods
51
rawEIC-methods
Description
Generate extracted ion chromatogram for m/z values of interest. The raw data is used in contrast to
getEIC which uses data from the profile matrix.
Arguments
object
xcmsRaw object
mzrange
rtrange
scanrange
Value
A list of :
scan
scan number
intensity
Methods
object = "xcmsRaw"
Author(s)
Ralf Tautenhahn
See Also
xcmsRaw-class
52
retcor-methods
rawMat-methods
Description
Returns a matrix with columns for time, m/z, and intensity that represents the raw data from a
chromatography mass spectrometry experiment.
Arguments
object
mzrange
rtrange
scanrange
log
Value
A numeric matrix with three columns: time, mz and intensity.
Methods
object = "xcmsRaw" rawMat(object, mzrange = numeric(), rtrange = numeric(),
scanrange = numeric(),
Author(s)
Michael Lawrence
See Also
plotRaw for plotting the raw intensities
retcor-methods
Description
To correct differences between retention times between different samples, a number of of methods
exist in XCMS. retcor is the generic method.
Arguments
object
xcmsSet-class object
method
...
retcor.obiwarp
53
Details
Different algorithms can be used by specifying them with the method argument. For example to use
the approach described by Smith et al (2006) one would use: retcor(object, method="loess").
This is also the default.
Further arguments given by ... are passed through to the function implementing the method.
A character vector of nicknames for the algorithms available is returned by getOption("BioC")$xcms$retcor.methods.
If the nickname of a method is called "loess", the help page for that specific method can be accessed
with ?retcor.loess.
Value
An xcmsSet object with corrected retntion times.
Methods
object = "xcmsSet"
retcor(object, ...)
See Also
retcor.loess retcor.obiwarp xcmsSet-class,
retcor.obiwarp
Description
Calculate retention time deviations for each sample. It is based on the code at http://obi-warp.
sourceforge.net/. However, this function is able to align multiple samples, by a center-star
strategy.
For the original publication see
Chromatographic Alignment of ESI-LC-MS Proteomics Data Sets by Ordered Bijective Interpolated Warping John T. Prince and, Edward M. Marcotte Analytical Chemistry 2006 78 (17), 61406152
Arguments
object
plottype
profStep
step size (in m/z) to use for profile generation from the raw data files
center
the index of the sample all others will be aligned to. If center==NULL, the
sample with the most peaks is chosen as default.
col
ty
54
retcor.peakgroups-methods
response
Responsiveness of warping. 0 will give a linear warp based on start and end
points. 100 will use all bijective anchors
distFunc
DistFunc function: cor (Pearsons R) or cor_opt (default, calculate only 10% diagonal band of distance matrix, better runtime), cov (covariance), prd (product),
euc (Euclidean distance)
gapInit
gapExtend
factorDiag
factorGap
Value
An xcmsSet object
Methods
object = "xcmsSet" retcor(object, method="obiwarp", plottype = c("none", "deviation"), profStep=1, center=NULL, col = NULL, ty = NULL, response=1, distFunc="cor_opt", gapInit=NULL,
gapExtend=NULL, factorDiag=2, factorGap=1, localAlignment=0, initPenalty=0)
See Also
xcmsSet-class,
retcor.peakgroups-methods
Align retention times across samples
Description
These two methods use well behaved peak groups to calculate retention time deviations for every
time point of each sample. Use smoothed deviations to align retention times.
Arguments
object
missing
extra
smooth
span
retexp
family
plottype
col
ty
55
if gaussian fitting is by least-squares with no outlier removal, and if symmetric
a re-descending M estimator is used with Tukeys biweight function, allowing
outlier removal
if deviation plot retention time deviation points and regression fit, and if mdevden
also plot peak overall peak density and retention time correction peak density
vector of colors for plotting each sample
vector of line and point types for plotting each sample
Value
An xcmsSet object
Methods
object = "xcmsSet" retcor(object, missing = 1, extra = 1,
See Also
xcmsSet-class, loess retcor.obiwarp
retexp
Description
Expands (or contracts) the retention time window in each row of a matrix as defined by the retmin
and retmax columns.
Usage
retexp(peakrange, width = 200)
Arguments
peakrange
width
Value
The altered matrix.
Author(s)
Colin A. Smith, <csmith@scripps.edu>
See Also
getEIC
56
specDist-methods
sampnames-methods
Description
Return sample names for an object
Value
A character vector with sample names.
Methods
object = "xcmsEIC" sampnames(object)
object = "xcmsSet" sampnames(object)
See Also
xcmsSet-class, xcmsEIC-class
specDist-methods
Description
There are several methods for calculating a distance between two sets of peaks in xcms. specDist
is the generic method.
Arguments
object
a xcmsSet or xcmsRaw.
method
...
Details
Different algorithms can be used by specifying them with the method argument. For example to use
the "meanMZmatch" approach with xcmsSet one would use: specDist(object, peakIDs1, peakIDs2, method="meanMZm
This is also the default.
Further arguments given by ... are passed through to the function implementing the method.
A character vector of nicknames for the algorithms available is returned by getOption("BioC")$xcms$specDist.methods.
If the nickname of a method is called "meanMZmatch", the help page for that specific method can
be accessed with ?specDist.meanMZmatch.
specDist.cosine
57
Value
mzabs
mzppm
symmetric
Methods
object = "xcmsSet"
object = "xsAnnotate"
Author(s)
Joachim Kutzera, <jkutzer@ipb-halle.de>
specDist.cosine
Description
This method calculates the distance of two sets of peaks using the cosine-distance.
Usage
peakTable2
mzabs
mzppm
symmetric
mzExp
intExp
nPdiff
nPmin
Details
The result is the cosine-distance of the product from weighted factors of mz and intensity from
matching peaks in the two peaktables. The factors are calculated as wFact = mz^mzExp * int^intExp.
if no distance is calculated (for example because no matching peaks were found) the return-value is
NA.
58
specDist.meanMZmatch
Methods
peakTable1 = "matrix", peakTable2 = "matrix"
Author(s)
Joachim Kutzera, <jkutzer@ipb-halle.de>
specDist.meanMZmatch
Description
This method calculates the distance of two sets of peaks.
Usage
peakTable2
mzabs
mzppm
symmetric
matchdist
matchrate
Details
The result of the calculation is a weighted sum of two values. Value one is the mean absolute
difference of the matching peaks, value two is the relation of matching peaks and non matching
peaks. if no distance is calculated (for example because no matching peaks were found) the returnvalue is NA.
Methods
peakTable1 = "matrix", peakTable2 = "matrix"
Author(s)
Joachim Kutzera, <jkutzer@ipb-halle.de>
specDist.meanMZmatch(peakTable1, peakTable2,
matchdi
specDist.peakCount-methods
59
specDist.peakCount-methods
a Distance function based on matching peaks
Description
This method calculates the distance of two sets of peaks by just returning the number of matching
peaks (m/z-values).
Usage
specDist.peakCount(peakTable1, peakTable2, mzabs=0.001, mzppm=10, symmetric=FALSE)
Arguments
peakTable1
peakTable2
mzabs
mzppm
symmetric
Methods
peakTable1 = "matrix", peakTable2 = "matrix"
Author(s)
Joachim Kutzera, <jkutzer@ipb-halle.de>
specNoise
Description
Given a sparse continuum mass spectrum, determine regions where no signal is present, substituting
half of the minimum intensity for those regions. Calculate the noise level as the weighted mean of
the regions with signal and the regions without signal. If there is only one raw peak, return zero.
Usage
specNoise(spec, gap = quantile(diff(spec[, "mz"]), 0.9))
60
specPeaks
Arguments
spec
gap
Details
The default gap value is determined from the 90th percentile of the pair-wise differences between
adjacent mass values.
Value
A numeric noise level
Author(s)
Colin A. Smith, <csmith@scripps.edu>
See Also
getSpec, specPeaks
specPeaks
Description
Given a spectrum, identify and list significant peaks as determined by several criteria.
Usage
specPeaks(spec, sn = 20, mzgap = 0.2)
Arguments
spec
sn
mzgap
minimal distance between adjacent peaks, with smaller peaks being excluded
Details
Peaks must meet two criteria to be considered peaks: 1) Their s/n ratio must exceed a certain
threshold. 2) They must not be within a given distance of any greater intensity peaks.
split.xcmsRaw
61
Value
A matrix with columns:
mz
intensity
fwhm
Author(s)
Colin A. Smith, <csmith@scripps.edu>
See Also
getSpec, specNoise
split.xcmsRaw
Description
Divides the scans from a xcmsRaw object into a list of multiple objects. MS$^n$ data is discarded.
Arguments
x
xcmsRaw object
factor such that factor(f) defines the scans which go into the new xcmsRaw
objects
drop
logical indicating if levels that do not occur should be dropped (if f is a factor
or a list).
...
Value
A list of xcmsRaw objects.
Methods
xr = "xcmsRaw"
Author(s)
Steffen Neumann, <sneumann(at)ipb-halle.de>
See Also
xcmsRaw-class
62
SSgauss
split.xcmsSet
Description
Divides the samples and peaks from a xcmsSet object into a list of multiple objects. Group data is
discarded.
Arguments
xs
xcmsSet object
drop
logical indicating if levels that do not occur should be dropped (if f is a factor
or a list).
...
Value
A list of xcmsSet objects.
Methods
xs = "xcmsSet"
Author(s)
Colin A. Smith, <csmith@scripps.edu>
See Also
xcmsSet-class
SSgauss
Gaussian Model
Description
This selfStart model evalueates the Gaussian model and its gradient. It has an initial attribute
that will evalueate the inital estimates of the parameters mu, sigma, and h.
Usage
SSgauss(x, mu, sigma, h)
stitch-methods
63
Arguments
x
mu
sigma
Details
Initial values for mu and h are chosen from the maximal value of x. The initial value for sigma is
determined from the area under x divided by h*sqrt(2*pi).
Value
A numeric vector of the same length as x. It is the value of the expression h*exp(-(x-mu)^2/(2*sigma^2),
which is a modified gaussian function where the maximum height is treated as a separate parameter
not dependent on sigma. If arguments mu, sigma, and h are names of objects, the gradient matrix
with respect to these names is attached as an attribute named gradient.
Author(s)
Colin A. Smith, <csmith@scripps.edu>
See Also
nls, selfStart
stitch-methods
Description
Fixes gaps in data due to calibration scans or lock mass. Automatically detects file type and calls
the relevant method. The mzXML file keeps the data the same length in time but overwrites the lock
mass scans. The netCDF version adds the scans back into the data thereby increasing the length of
the data and correcting for the unseen gap.
Arguments
object
An xcmsRaw-class object
lockMass
freq
start
64
stitch-methods
Details
makeacqNum takes locates the gap using the starting lock mass scan and its intervals. This data
frame is then used in stitch to correct for the gap caused by the lock mass. Correction works by
using scans from either side of the gap to fill it in.
Value
stitch A corrected xcmsRaw-class object makeacqNum A numeric vector of scan locations corresponding to lock Mass scans
Methods
object = "xcmsRaw"
stitch(object, lockMass=numeric())
object = "xcmsRaw"
Author(s)
Paul Benton, <hpaul.benton08@imperial.ac.uk>
Examples
## Not run: library(xcms)
library(faahKO) ## These files do not have this problem to correct for but just for an example
cdfpath <- system.file("cdf", package = "faahKO")
cdffiles <- list.files(cdfpath, recursive = TRUE, full.names = TRUE)
xr<-xcmsRaw(cdffiles[1])
xr
##Lets assume that the lockmass starts at 1 and is every 100 scans
lockMass<-xcms:::makeacqNum(xr, freq=100, start=1)
## these are equcal
lockmass<-AutoLockMass(xr)
ob<-stitch(xr, lockMass)
ob
#plot the old data before correction
foo<-rawEIC(xr, m=c(200,210), scan=c(80,140))
plot(foo$scan, foo$intensity, type="h")
#plot the new corrected data to see what changed
foo<-rawEIC(ob, m=c(200,210), scan=c(80,140))
plot(foo$scan, foo$intensity, type="h")
## End(Not run)
verify.mzQuantM
verify.mzQuantM
65
Description
Export in XML data formats: verify the written data
Usage
verify.mzQuantML(filename, xsdfilename)
Arguments
filename
filename (may include full path) for the output file. Pipes or URLs are not
allowed.
xsdfilename
Details
The verify.mzQuantML() function will verify an PSI standard format mzQuantML document against
the XSD schemda, see http://www.psidev.info/mzquantml
Value
None.
See Also
write.mzQuantML
write.cdf-methods
Description
Write the raw data to a (simple) CDF file.
Arguments
object
filename
filename (may include full path) for the CDF file. Pipes or URLs are not allowed.
Details
Currently the only application known to read the resulting file is XCMS. Others, especially those
which build on the AndiMS library, will refuse to load the output.
66
write.mzdata-methods
Value
None.
Methods
object = "xcmsRaw" write.cdf(object, filename)
See Also
xcmsRaw-class, xcmsRaw,
write.mzdata-methods
Description
Write the raw data to a (simple) mzData file.
Arguments
object
filename
filename (may include full path) for the mzData file. Pipes or URLs are not
allowed.
Details
This function will export a given xcmsRaw object to an mzData file. The mzData file will contain
a <spectrumList> containing the <spectrum> with mass and intensity values in 32 bit precision.
Other formats are currently not supported. Any header information (e.g. additional <software>
information or <cvParams>) will be lost. Currently, also any MSn information will not be stored.
Value
None.
Methods
object = "xcmsRaw" write.mzdata(object, filename)
See Also
xcmsRaw-class, xcmsRaw,
write.mzQuantML-methods
67
write.mzQuantML-methods
Save an xcmsSet object to an PSI mzQuantML file
Description
Export in XML data formats: Write the processed data in an xcmsSet to mzQuantML.
Arguments
object
filename
filename (may include full path) for the output file. Pipes or URLs are not
allowed.
Details
The write.mzQuantML() function will write a (grouped) xcmsSet into the PSI standard format
mzQuantML, see http://www.psidev.info/mzquantml
Value
None.
Methods
object = "xcmsSet" write.mzQuantML(object, filename)
See Also
xcmsSet-class, xcmsSet, verify.mzQuantML,
xcmsEIC-class
Description
This class is used to store and plot parallel extracted ion chromatograms from multiple sample files.
It integrates with the xcmsSet class to display peak area integrated during peak identification or
fill-in.
Objects from the Class
Objects can be created with the getEIC method of the xcmsSet class. Objects can also be created
by calls of the form new("xcmsEIC", ...).
68
xcmsFileSource-class
Slots
eic: list containing named entries for every sample. for each entry, a list of two column EIC
matricies with retention time and intensity
mzrange: two column matrix containing starting and ending m/z for each EIC
rtrange: two column matrix containing starting and ending time for each EIC
rt: either "raw" or "corrected" to specify retention times contained in the object
groupnames: group names from xcmsSet object used to generate EICs
Methods
groupnames signature(object = "xcmsEIC"): get groupnames slot
mzrange signature(object = "xcmsEIC"): get mzrange slot
plot signature(x = "xcmsEIC"): plot the extracted ion chromatograms
rtrange signature(object = "xcmsEIC"): get rtrange slot
sampnames signature(object = "xcmsEIC"): get sample names
Note
No notes yet.
Author(s)
Colin A. Smith, <csmith@scripps.edu>
See Also
getEIC
xcmsFileSource-class
Description
Data sources which read data from a file should inherit from this class. The xcms package provides
classes to read from netCDF, mzData, mzXML, and mzML files using xcmsFileSource.
This class should be considered virtual and will not work if passed to loadRaw-methods. The
reason it is not explicitly virtual is that there does not appear to be a way for a class to be both
virtual and have a data part (which lets functions treat objects as if they were character strings).
This class validates that a file exists at the path given.
Objects from the Class
xcmsFileSource objects should not be instantiated directly. Instead, create subclasses and instantiate those.
xcmsFragments
69
Slots
.Data: Object of class "character". File path of a file from which to read raw data as the objects
data part
Extends
Class "character", from data part. Class "xcmsSource", directly.
Methods
xcmsSource signature(object = "character"): Create an xcmsFileSource object referencing the given file name.
Author(s)
Daniel Hackney <dan@haxney.org>
See Also
xcmsSource
xcmsFragments
Description
EXPERIMANTAL FEATURE
xcmsFragments is an object similar to xcmsSet, which holds peaks picked (or collected) from one
or several xcmsRaw objects.
There are still discussions going on about the exact API for MS$^n$ data, so this is likely to change
in the future. The code is not yet pipeline-ified.
Usage
xcmsFragments(xs, ...)
Arguments
xs
...
Details
After running collect(xFragments,xSet) The peaktable of the xcmsFragments includes the ms1Peaks
from all experinemts stored in a xcmsSet-object. Further it contains the relevant MSn-peaks from
the xcmsRaw-objects, which were created temporarily with the paths in xcmsSet.
70
xcmsFragments-class
Value
An xcmsFragments object.
Author(s)
Joachim Kutzera, Steffen Neumann, <sneumann@ipb-halle.de>
See Also
xcmsFragments-class, collect
xcmsFragments-class
Description
This class is similar to xcmsSet because it stores peaks from a number of individual files. However,
xcmsFragments keeps Tandem MS and e.g. Ion Trap or Orbitrap MS$^n$ peaks, including the
parent ion relationships.
Objects from the Class
Objects can be created with the xcmsFragments constructor and filled with peaks using the collect
method.
Slots
peaks: matrix with colmns peakID (MS1 parent in corresponding xcmsSet), MSnParentPeakID
(parent peak within this xcmsFragments), msLevel (e.g. 2 for Tandem MS), rt (retention time
in case of LC data), mz (fragment mass-to-charge), intensity (peak intensity extracted from
the original xcmsSet), sample (the index of the rawData-file).
MS2spec: This is a list of matrixes. Each matrix in the list is a single collected spectra from
collect. The column IDs are mz, intensity, and full width half maximum(fwhm). The
fwhm column is only relevant if the spectra came from profile data.
specinfo: This is a matrix with reference data for the spectra in MS2spec. The column ids are
preMZ, AccMZ, rtmin, rtmax, ref, CollisionEnergy. The preMZ is precursor mass from the
MS1 scan. This mass is given by the XML file. With some instruments this mass is only
given as nominal mass, therefore a AccMZ is given which is a weighted average mass from
the MS1 scan of the collected spectra. The retention time is given by rtmin and rtmax. The
ref column is a pointer to the MS2spec matrix spectra. The collisionEnergy column is the
collision Energy for the spectra.
xcmsPapply
71
Methods
collect signature(object = "xcmsFragments"): gets a xcmsSet-object, collects ms1-peaks
from it and the msn-peaks from the corresponding xcmsRaw-files.
plotTree signature(object = "xcmsFragments"): prints a (text based) pseudo-tree of the peaktable to display the dependencies of the peaks among each other.
show signature(object = "xcmsFragments"): print a human-readable description of this object to the console.
Note
No notes yet.
Author(s)
S. Neumann, J. Kutzera
References
A parallel effort in metabolite profiling data sharing: http://metlin.scripps.edu/
See Also
xcmsRaw
xcmsPapply
xcmsPapply
Description
An apply-like function which uses Rmpi to distribute the processing evenly across a cluster. Will
use a non-MPI version if distributed processing is not available.
Usage
xcmsPapply(arg_sets, papply_action, papply_commondata = list(),
show_errors = TRUE, do_trace = FALSE, also_trace = c())
Arguments
arg_sets
papply_action
72
xcmsPapply
show_errors
If set to TRUE, overrides Rmpis default, and messages for errors which occur
in R slaves are produced.
do_trace
If set to TRUE, causes the papply\_action function to be traced. i.e. Each statement is output before it is executed by the slaves.
also_trace
If supplied an array of function names, as strings, tracing will also occur for the
specified functions.
Details
Similar to apply and lapply, applies a function to all items of a list, and returns a list with the
corresponding results.
Uses Rmpi to implement a pull idiom in order to distribute the processing evenly across a cluster.
If Rmpi is not available, or there are no slaves, implements this as a non-parallel algorithm.
xcmsPapply is a modified version of the papply function from package papply 0.2 (Duane Currie).
Parts of the slave function were wrapped in try() to make it failsafe and progress output was added.
Make sure Rmpi was installed properly by executing the example below. Rmpi was tested with
OpenMPI : Unix, http://www.open-mpi.org/, dont forget to export MPI_ROOT before installing Rmpi e.g. export MPI_ROOT=/usr/lib/openmpi
DeinoMPI : Windows, http://mpi.deino.net/, also see http://www.stats.uwo.ca/faculty/
yu/Rmpi/
Value
A list of return values from papply\_action. Each value corresponds to the element of arg\_sets used
as a parameter to papply\_action
Note
Does not support distributing recursive calls in parallel. If papply is used inside papply\_action, it
will call a non-parallel version
Author(s)
Duane Currie <duane.currie@acadiau.ca>, modified by Ralf Tautenhahn <rtautenh@ipb-halle.de>.
References
http://ace.acadiau.ca/math/ACMMaC/software/papply/
Examples
## Not run:
library(Rmpi)
library(xcms)
number_lists <- list(1:10,4:40,2:27)
mpi.spawn.Rslaves(nslaves=2)
xcmsPeaks-class
73
xcmsPeaks-class
A matrix of peaks
Description
A matrix of peak information. The actual columns depend on how it is generated (i.e. the findPeaks
method).
Objects from the Class
Objects can be created by calls of the form new("xcmsPeaks", ...).
Slots
.Data: The matrix holding the peak information
Extends
Class "matrix", from data part. Class "array", by class "matrix", distance 2. Class "structure",
by class "matrix", distance 3. Class "vector", by class "matrix", distance 4, with explicit coerce.
Methods
None yet. Some utilities for working with peak data would be nice.
Author(s)
Michael Lawrence
See Also
findPeaks for detecting peaks in an xcmsRaw.
74
xcmsRaw
xcmsRaw
Description
This function handles the task of reading a NetCDF/mzXML file containing LC/MS or GC/MS
data into a new xcmsRaw object. It also transforms the data into profile (maxrix) mode for efficient
plotting and data exploration.
Usage
xcmsRaw(filename, profstep = 1, profmethod = "bin", profparam =
list(), includeMSn=FALSE, mslevel=NULL, scanrange=NULL)
deepCopy(object)
Arguments
filename
profstep
profmethod
profparam
includeMSn
only for XML file formats: also read MS$^n$ (Tandem-MS of Ion-/Orbi- Trap
spectra)
mslevel
move data from mslevel into normal MS1 slots, e.g. for peak picking and visualisation
scanrange
object
An xcmsRaw object
Details
The scanrange to import can be restricted, otherwise all MS1 data is read. If profstep is set to
0, no profile matrix is generated. Unless includeMSn=TRUE only first level MS data is read, not
MS/MS, etc.
deepCopy(xraw) will create a copy of the xcmsRaw object with its own copy of mz and intensity
data in xraw@env.
Value
A xcmsRaw object.
Author(s)
Colin A. Smith, <csmith@scripps.edu>
xcmsRaw
75
References
NetCDF file format: http://my.unidata.ucar.edu/content/software/netcdf/ http://www.
astm.org/Standards/E2077.htm http://www.astm.org/Standards/E2078.htm
mzXML file format: http://sashimi.sourceforge.net/software_glossolalia.html
PSI-MS working group who developed mzData and mzML file formats: http://www.psidev.
info/index.php?q=node/80
Parser used for XML file formats: http://tools.proteomecenter.org/wiki/index.php?title=
Software:RAMP
See Also
xcmsRaw-class, profStep, profMethod xcmsFragments
Examples
## Not run:
library(xcms)
library(faahKO)
cdfpath <- system.file("cdf", package = "faahKO")
cdffiles <- list.files(cdfpath, recursive = TRUE, full.names = TRUE)
xr<-xcmsRaw(cdffiles[1])
xr
##This gives some information about the file
names(attributes(xr))
## Lets have a look at the structure of the object
str(xr)
##same but with a preview of each slot in the object
##SO... lets have a look at how this works
head(xr@scanindex)
#[1]
0 429 860 1291 1718 2140
xr@env$mz[425:430]
#[1] 596.3 597.0 597.3 598.1 599.3 200.1
##We can see that the 429 index is the last mz of scan 1 therefore...
mz.scan1<-xr@env$mz[(1+xr@scanindex[1]):xr@scanindex[2]]
intensity.scan1<-xr@env$intensity[(1+xr@scanindex[1]):xr@scanindex[2]]
plot(mz.scan1, intensity.scan1, type="h", main=paste("Scan 1 of file", basename(cdffiles[1]), sep=""))
##the easier way :p
scan1<-getScan(xr, 1)
head(scan1)
plotScan(xr, 1)
## End(Not run)
76
xcmsRaw-class
xcmsRaw-class
Description
This class handles processing and visualization of the raw data from a single LC/MS or GS/MS run.
It includes methods for producing a standard suite of plots including individual spectra, multi-scan
average spectra, TIC, and EIC. It will also produce a feature list of significant peaks using matched
filtration.
Objects from the Class
Objects can be created with the xcmsRaw constructor which reads data from a NetCDF file into a
new object.
Slots
acquisitionNum: acquisitionNum
env: environment with three variables: mz - concatenated m/z values for all scans, intensity corresponding signal intensity for each m/z value, and profile - matrix represention of the
intensity values with columns representing scans and rows representing equally spaced m/z
values
filepath: Path to the raw data file
gradient: matrix with first row, time, containing the time point for interpolation and successive
columns representing solvent fractions at each point
msnAcquisitionNum: for each scan a unique acquisition number as reported via "spectrum id"
(mzData) or "<scan num=...>" and "<scanOrigin num=...>" (mzXML)
msnCollisionEnergy: "CollisionEnergy" (mzData) or "collisionEnergy" (mzXML)
msnLevel: for each scan the "msLevel" (both mzData and mzXML)
msnPrecursorCharge: "ChargeState" (mzData) and "precursorCharge" (mzXML)
msnPrecursorIntensity: "Intensity" (mzData) or "precursorIntensity" (mzXML)
msnPrecursorMz: "MassToChargeRatio" (mzData) or "precursorMz" (mzXML)
msnPrecursorScan: "spectrumRef" (both mzData and mzXML)
msnRt: Retention time of the scan
msnScanindex: msnScanindex
mzrange: numeric vector of length 2 with minimum and maximum m/z values represented in the
profile matrix
polarity: polarity
profmethod: characer value with name of method used for generating the profile matrix
profparam: profparam
scanindex: integer vector with starting positions of each scan in the mz and intensity variables
(note that index values are based off a 0 initial position instead of 1)
scantime: numeric vector with acquisition time (in seconds) for each scan
tic: numeric vector with total ion count (intensity) for each scan
xcmsRaw-class
77
Methods
findPeaks signature(object = "xcmsRaw"): feature detection using matched filtration in the
chromatographic time domain
getEIC signature(object = "xcmsRaw"): get extracted ion chromatograms in specified m/z
ranges
getPeaks signature(object = "xcmsRaw"): get data for peaks in specified m/z and time ranges
getScan signature(object = "xcmsRaw"): get m/z and intensity values for a single mass scan
getSpec signature(object = "xcmsRaw"): get average m/z and intensity values for multiple
mass scans
image signature(x = "xcmsRaw"): get data for peaks in specified m/z and time ranges
plotChrom signature(object = "xcmsRaw"): plot a chromatogram from profile data
plotRaw signature(object = "xcmsRaw"): plot locations of raw intensity data points
plotScan signature(object = "xcmsRaw"): plot a mass spectrum of an individual scan from
the raw data
plotSpec signature(object = "xcmsRaw"): plot a mass spectrum from profile data
plotSurf signature(object = "xcmsRaw"): experimental method for plotting 3D surface of
profile data with rgl.
plotTIC signature(object = "xcmsRaw"): plot total ion count chromatogram
profMedFilt signature(object = "xcmsRaw"): median filter profile data in time and m/z dimensions
profMethod<- signature(object = "xcmsRaw"): change the method of generating the profile
matrix
profMethod signature(object = "xcmsRaw"): get the method of generating the profile matrix
profMz signature(object = "xcmsRaw"): get vector of m/z values for each row of the profile
matrix
profRange signature(object = "xcmsRaw"): interpret flexible ways of specifying subsets of
the profile matrix
profStep<- signature(object = "xcmsRaw"): change the m/z step used for generating the
profile matrix
profStep signature(object = "xcmsRaw"): get the m/z step used for generating the profile
matrix
revMz signature(object = "xcmsRaw"): reverse the order of the data points for each scan
sortMz signature(object = "xcmsRaw"): sort the data points by increasing m/z for each scan
stitch signature(object = "xcmsRaw"): Raw data correction for lock mass calibration gaps.
Note
No notes yet.
Author(s)
Colin A. Smith, <csmith@scripps.edu>
78
xcmsSet
References
A parallel effort in metabolite profiling data sharing: http://metlin.scripps.edu/
See Also
xcmsRaw
xcmsSet
Description
This function handles the construction of xcmsSet objects. It finds peaks in batch mode and presorts files from subdirectories into different classes suitable for grouping.
Usage
xcmsSet(files = NULL, snames = NULL, sclass = NULL, phenoData = NULL,
profmethod = "bin", profparam = list(),
polarity = NULL, lockMassFreq=FALSE,
mslevel=NULL, nSlaves=0, progressCallback=NULL,
scanrange = NULL, ...)
Arguments
files
snames
sample names
sclass
sample classes
phenoData
profmethod
profparam
polarity
lockMassFreq
mslevel
nSlaves
...
xcmsSet-class
79
Details
The default values of the files, snames, sclass, and phenoData arguments cause the function to
recursively search for readable files. The filename without extention is used for the sample name.
The subdirectory path is used for the sample class. If the files contain both positive and negative
spectra, the polarity can be selected explicitly. The default (NULL) is to read all scans.
The lock mass correction allows for the lock mass scan to be added back in with the last working
scan. This correction gives better reproducibility between sample sets.
Value
A xcmsSet object.
Author(s)
Colin A. Smith, <csmith@scripps.edu>
See Also
xcmsSet-class, findPeaks, profStep, profMethod, xcmsPapply
xcmsSet-class
Description
This class transforms a set of peaks from multiple LC/MS or GC/MS samples into a matrix of
preprocessed data. It groups the peaks and does nonlinear retention time correction without internal standards. It fills in missing peak values from raw data. Lastly, it generates extracted ion
chromatograms for ions of interest.
Objects from the Class
Objects can be created with the xcmsSet constructor which gathers peaks from a set NetCDF files.
Objects can also be created by calls of the form new("xcmsSet", ...).
Slots
peaks: matrix containing peak data
filled: a vector with peak indices of peaks which have been added by a fillPeaks method,
groups: matrix containing statistics about peak groups
groupidx: list containing indices of peaks in each group
phenoData: a data frame containing the experimental design factors
rt: list containing two lists, raw and corrected, each containing retention times for every scan of
every sample
filepaths: character vector with absolute path name of each NetCDF file
80
xcmsSet-class
profinfo: list containing two values, method - profile generation method, and step - profile m/z
step size
dataCorrection logical vector filled if the waters Lock mass correction parameter is used.
polarity: a string ("positive" or "negative" or NULL) describing whether only positive or negative
scans have been used reading the raw data.
progressInfo: progress informations for some xcms functions (for GUI)
progressCallback: function to be called, when progressInfo changes (for GUI)
Methods
c signature("xcmsSet"): combine objects together
filepaths<- signature(object = "xcmsSet"): set filepaths slot
filepaths signature(object = "xcmsSet"): get filepaths slot
diffreport signature(object = "xcmsSet"): create report of differentially regulated ions including EICs
fillPeaks signature(object = "xcmsSet"): fill in peak data for groups with missing peaks
getEIC signature(object = "xcmsSet"): get list of EICs for each sample in the set
groupidx<- signature(object = "xcmsSet"): set groupidx slot
groupidx signature(object = "xcmsSet"): get groupidx slot
groupnames signature(object = "xcmsSet"): get textual names for peak groups
groups<- signature(object = "xcmsSet"): set groups slot
groups signature(object = "xcmsSet"): get groups slot
groupval signature(object = "xcmsSet"): get matrix of values from peak data with a row for
each peak group
group signature(object = "xcmsSet"): find groups of peaks across samples that share similar
m/z and retention times
peaks<- signature(object = "xcmsSet"): set peaks slot
peaks signature(object = "xcmsSet"): get peaks slot
plotrt signature(object = "xcmsSet"): plot retention time deviation profiles
profinfo<- signature(object = "xcmsSet"): set profinfo slot
profinfo signature(object = "xcmsSet"): get profinfo slot
retcor signature(object = "xcmsSet"): use initial grouping of peaks to do nonlinear loess
retention time correction
sampclass<- signature(object = "xcmsSet"): DEPRECATED. If used, the experimental
design will be replaced with a data frame with a single column matching the supplied factor.
sampclass signature(object = "xcmsSet"): get the interaction of the experimental design
factors
phenoData<- signature(object = "xcmsSet"): set the phenoData slot
phenoData signature(object = "xcmsSet"): get the phenoData slot
progressCallback<- signature(object = "xcmsSet"): set the progressCallback slot
xcmsSource-class
81
xcmsSource-class
Description
This virtual class provides an implementation-independent way to load mass spectrometer data from
various sources for use in an xcmsRaw object. Subclasses can be defined to enable data to be loaded
from user-specified sources. The virtual class xcmsFileSource is included out of the box which
contains a file name as a character string.
When implementing child classes of xcmsSource, a corresponding loadRaw-methods method must
be provided which accepts the xcmsSource child class and returns a list in the format described in
loadRaw-methods.
Objects from the Class
A virtual Class: No objects may be created from it.
Author(s)
Daniel Hackney, <dan@haxney.org>
See Also
xcmsSource-methods for creating xcmsSource objects in various ways.
82
xcmsSource-methods
xcmsSource-methods
Description
Users can define alternate means of reading data for xcmsRaw objects by creating new implementations of this method.
Methods
signature(object = "xcmsSource") Pass the object through unmodified.
Author(s)
Daniel Hackney, <dan@haxney.org>
See Also
xcmsSource
Index
plotSurf-methods, 47
plotTIC-methods, 48
Topic iplot
plotChrom-methods, 41
plotSpec-methods, 46
plotSurf-methods, 47
plotTIC-methods, 48
Topic lockmass
AutoLockMass-methods, 4
Topic manip
AutoLockMass-methods, 4
c-methods, 5
getPeaks-methods, 27
getScan-methods, 28
getSpec-methods, 28
groupval-methods, 34
medianFilter, 36
msn2xcmsRaw, 37
profMedFilt-methods, 48
profMethod-methods, 49
profRange-methods, 49
profStep-methods, 50
retexp, 55
specNoise, 59
specPeaks, 60
split.xcmsRaw, 61
split.xcmsSet, 62
stitch-methods, 63
Topic methods
absent-methods, 3
AutoLockMass-methods, 4
calibrate-methods, 6
collect-methods, 7
diffreport-methods, 8
fillPeaks-methods, 11
fillPeaks.chrom-methods, 11
fillPeaks.MSW-methods, 12
findMZ, 13
findneutral, 15
Topic classes
xcmsEIC-class, 67
xcmsFileSource-class, 68
xcmsFragments-class, 70
xcmsPeaks-class, 73
xcmsRaw-class, 76
xcmsSet-class, 79
xcmsSource-class, 81
Topic file
calibrate-methods, 6
diffreport-methods, 8
fillPeaks-methods, 11
fillPeaks.chrom-methods, 11
fillPeaks.MSW-methods, 12
getEIC-methods, 26
group.density, 30
group.mzClust, 31
group.nearest, 32
groupnames-methods, 33
peakTable-methods, 39
retcor.peakgroups-methods, 54
sampnames-methods, 56
verify.mzQuantM, 65
write.cdf-methods, 65
write.mzdata-methods, 66
write.mzQuantML-methods, 67
xcmsFileSource-class, 68
xcmsFragments, 69
xcmsRaw, 74
xcmsSet, 78
Topic hplot
image-methods, 35
plot.xcmsEIC, 40
plotChrom-methods, 41
plotPeaks-methods, 42
plotRaw-methods, 44
plotrt-methods, 45
plotScan-methods, 46
plotSpec-methods, 46
83
84
INDEX
findPeaks-methods, 16
findPeaks.centWave-methods, 17
findPeaks.massifquant-methods, 19
findPeaks.matchedFilter-methods,
22
findPeaks.MS1-methods, 23
findPeaks.MSW-methods, 25
getEIC-methods, 26
getPeaks-methods, 27
getScan-methods, 28
getSpec-methods, 28
group-methods, 29
group.density, 30
group.mzClust, 31
group.nearest, 32
groupnames-methods, 33
groupval-methods, 34
loadRaw-methods, 35
peakPlots-methods, 38
peakTable-methods, 39
plot.xcmsEIC, 40
plotChrom-methods, 41
plotEIC-methods, 42
plotPeaks-methods, 42
plotRaw-methods, 44
plotrt-methods, 45
plotScan-methods, 46
plotSpec-methods, 46
plotSurf-methods, 47
plotTIC-methods, 48
profMedFilt-methods, 48
profMethod-methods, 49
profRange-methods, 49
profStep-methods, 50
rawEIC-methods, 51
rawMat-methods, 52
retcor-methods, 52
retcor.obiwarp, 53
retcor.peakgroups-methods, 54
sampnames-methods, 56
specDist-methods, 56
specDist.cosine, 57
specDist.meanMZmatch, 58
specDist.peakCount-methods, 59
stitch-methods, 63
write.cdf-methods, 65
write.mzdata-methods, 66
write.mzQuantML-methods, 67
xcmsSource-methods, 82
Topic models
etg, 10
Topic nonlinear
SSgauss, 62
absent (absent-methods), 3
absent,xcmsSet-method (absent-methods),
3
absent-methods, 3
array, 73
AutoLockMass (AutoLockMass-methods), 4
AutoLockMass,xcmsRaw-method
(AutoLockMass-methods), 4
AutoLockMass-methods, 4
c, 80
c, c-methods (c-methods), 5
c-methods, 5
c.xcmsSet (c-methods), 5
calibrate (calibrate-methods), 6
calibrate,xcmsSet-method
(calibrate-methods), 6
calibrate-methods, 6
character, 69
collect, 70, 71
collect (collect-methods), 7
collect,xcmsFragments-method
(collect-methods), 7
collect,xcmsRaw-method
(collect-methods), 7
collect-methods, 7
deepCopy (xcmsRaw), 74
deepCopy,xcmsRaw-method (xcmsRaw), 74
density, 30
diffreport, 4, 39, 80
diffreport (diffreport-methods), 8
diffreport,xcmsSet-method
(diffreport-methods), 8
diffreport-methods, 8
etg, 10
filepaths (xcmsSet-class), 79
filepaths,xcmsSet-method
(xcmsSet-class), 79
filepaths<- (xcmsSet-class), 79
filepaths<-,xcmsSet-method
(xcmsSet-class), 79
INDEX
fillPeaks, 4, 12, 13, 79, 80
fillPeaks (fillPeaks-methods), 11
fillPeaks,xcmsSet-method
(fillPeaks-methods), 11
fillPeaks-methods, 11
fillPeaks.chrom
(fillPeaks.chrom-methods), 11
fillPeaks.chrom,xcmsSet-method
(fillPeaks.chrom-methods), 11
fillPeaks.chrom-methods, 11
fillPeaks.MSW (fillPeaks.MSW-methods),
12
fillPeaks.MSW,xcmsSet-method
(fillPeaks.MSW-methods), 12
fillPeaks.MSW-methods, 12
findMZ, 13, 16
findMZ,xcmsFragments-method (findMZ), 13
findneutral, 14, 15
findneutral,xcmsFragments-method
(findneutral), 15
findPeaks, 27, 38, 43, 49, 73, 77, 79
findPeaks (findPeaks-methods), 16
findPeaks,xcmsRaw-method
(findPeaks-methods), 16
findPeaks-methods, 16
findPeaks.centWave, 8, 17
findPeaks.centWave
(findPeaks.centWave-methods),
17
findPeaks.centWave,xcmsRaw-method
(findPeaks.centWave-methods),
17
findPeaks.centWave-methods, 17
findPeaks.massifquant
(findPeaks.massifquant-methods),
19
findPeaks.massifquant,xcmsRaw-method
(findPeaks.massifquant-methods),
19
findPeaks.massifquant-methods, 19
findPeaks.matchedFilter, 17
findPeaks.matchedFilter
(findPeaks.matchedFilter-methods),
22
findPeaks.matchedFilter,xcmsRaw-method
(findPeaks.matchedFilter-methods),
22
findPeaks.matchedFilter-methods, 22
85
findPeaks.MS1 (findPeaks.MS1-methods),
23
findPeaks.MS1,xcmsRaw-method
(findPeaks.MS1-methods), 23
findPeaks.MS1-methods, 23
findPeaks.MSW (findPeaks.MSW-methods),
25
findPeaks.MSW,xcmsRaw-method
(findPeaks.MSW-methods), 25
findPeaks.MSW-methods, 25
getEIC, 51, 55, 67, 68, 77, 80
getEIC (getEIC-methods), 26
getEIC,xcmsRaw-method (getEIC-methods),
26
getEIC,xcmsSet-method (getEIC-methods),
26
getEIC-methods, 26
getMsnScan (getScan-methods), 28
getMsnScan,xcmsRaw-method
(getScan-methods), 28
getPeaks, 1113, 77
getPeaks (getPeaks-methods), 27
getPeaks,xcmsRaw-method
(getPeaks-methods), 27
getPeaks-methods, 27
getScan, 29, 77
getScan (getScan-methods), 28
getScan,xcmsRaw-method
(getScan-methods), 28
getScan-methods, 28
getSpec, 28, 60, 61, 77
getSpec (getSpec-methods), 28
getSpec,xcmsRaw-method
(getSpec-methods), 28
getSpec-methods, 28
group, 4, 80
group (group-methods), 29
group,xcmsSet-method (group-methods), 29
group-methods, 29
group.density, 29, 30, 32
group.density,xcmsSet-method
(group.density), 30
group.mzClust, 29, 31, 32
group.mzClust,xcmsSet-method
(group.mzClust), 31
group.nearest, 29, 32
group.nearest,xcmsSet-method
(group.nearest), 32
86
groupidx (xcmsSet-class), 79
groupidx,xcmsSet-method
(xcmsSet-class), 79
groupidx<- (xcmsSet-class), 79
groupidx<-,xcmsSet-method
(xcmsSet-class), 79
groupnames, 68, 80
groupnames (groupnames-methods), 33
groupnames,xcmsEIC-method
(groupnames-methods), 33
groupnames,xcmsSet-method
(groupnames-methods), 33
groupnames-methods, 33
groups (xcmsSet-class), 79
groups,xcmsSet-method (xcmsSet-class),
79
groups<- (xcmsSet-class), 79
groups<-,xcmsSet-method
(xcmsSet-class), 79
groupval, 39, 80
groupval (groupval-methods), 34
groupval,xcmsSet-method
(groupval-methods), 34
groupval-methods, 34
image, 77
image,xcmsRaw-method (image-methods), 35
image-methods, 35
loadRaw (loadRaw-methods), 35
loadRaw,xcmsSource-method
(loadRaw-methods), 35
loadRaw-methods, 35
loess, 55
makeacqNum (stitch-methods), 63
makeacqNum, xcmsRaw-method
(stitch-methods), 63
matrix, 73
medianFilter, 36, 48
msn2xcmsRaw, 37
mt.teststat, 8, 9
mzrange (xcmsEIC-class), 67
mzrange,xcmsEIC-method (xcmsEIC-class),
67
nls, 63
palette, 9
INDEX
pdf, 41
peakDetectionCWT, 26
peakPlots,xcmsSet-method
(peakPlots-methods), 38
peakPlots-methods, 38
peaks (xcmsSet-class), 79
peaks,xcmsSet-method (xcmsSet-class), 79
peaks<- (xcmsSet-class), 79
peaks<-,xcmsSet-method (xcmsSet-class),
79
peakTable (peakTable-methods), 39
peakTable,xcmsSet-method
(peakTable-methods), 39
peakTable-methods, 39
phenoData (xcmsSet-class), 79
phenoData,xcmsSet-method
(xcmsSet-class), 79
phenoData<- (xcmsSet-class), 79
phenoData<-,xcmsSet-method
(xcmsSet-class), 79
plot, 68
plot, plot-methods (plot.xcmsEIC), 40
plot.xcmsEIC, 40
plotChrom, 42, 49, 77
plotChrom (plotChrom-methods), 41
plotChrom,xcmsRaw-method
(plotChrom-methods), 41
plotChrom-methods, 41
plotEIC (plotEIC-methods), 42
plotEIC,xcmsRaw-method
(plotEIC-methods), 42
plotEIC-methods, 42
plotPeaks (plotPeaks-methods), 42
plotPeaks,xcmsRaw-method
(plotPeaks-methods), 42
plotPeaks-methods, 42
plotQC, 43
plotRaw, 52, 77
plotRaw (plotRaw-methods), 44
plotRaw,xcmsRaw-method
(plotRaw-methods), 44
plotRaw-methods, 44
plotrt, 80
plotrt (plotrt-methods), 45
plotrt,xcmsSet-method (plotrt-methods),
45
plotrt-methods, 45
plotScan, 77
INDEX
plotScan (plotScan-methods), 46
plotScan,xcmsRaw-method
(plotScan-methods), 46
plotScan-methods, 46
plotSpec, 49, 77
plotSpec (plotSpec-methods), 46
plotSpec,xcmsRaw-method
(plotSpec-methods), 46
plotSpec-methods, 46
plotSurf, 77
plotSurf (plotSurf-methods), 47
plotSurf,xcmsRaw-method
(plotSurf-methods), 47
plotSurf-methods, 47
plotTIC, 77
plotTIC (plotTIC-methods), 48
plotTIC,xcmsRaw-method
(plotTIC-methods), 48
plotTIC-methods, 48
plotTree (xcmsFragments-class), 70
plotTree,xcmsFragments-method
(xcmsFragments-class), 70
png, 41
postscript, 41
present (absent-methods), 3
present,xcmsSet-method
(absent-methods), 3
profBin, 49
profinfo (xcmsSet-class), 79
profinfo,xcmsSet-method
(xcmsSet-class), 79
profinfo<- (xcmsSet-class), 79
profinfo<-,xcmsSet-method
(xcmsSet-class), 79
profMedFilt, 77
profMedFilt (profMedFilt-methods), 48
profMedFilt,xcmsRaw-method
(profMedFilt-methods), 48
profMedFilt-methods, 48
profMethod, 49, 50, 75, 77, 79
profMethod (profMethod-methods), 49
profMethod,xcmsRaw-method
(profMethod-methods), 49
profMethod-methods, 49
profMethod<-, 77
profMethod<- (profMethod-methods), 49
profMethod<-,xcmsRaw-method
(profMethod-methods), 49
87
profMz (xcmsRaw-class), 76
profMz,xcmsRaw-method (xcmsRaw-class),
76
profRange, 28, 29, 41, 46, 47, 77
profRange (profRange-methods), 49
profRange,xcmsRaw-method
(profRange-methods), 49
profRange-methods, 49
profStep, 75, 77, 79
profStep (profStep-methods), 50
profStep,xcmsRaw-method
(profStep-methods), 50
profStep-methods, 50
profStep<-, 77
profStep<- (profStep-methods), 50
profStep<-,xcmsRaw-method
(profStep-methods), 50
progressCallback (xcmsSet-class), 79
progressCallback,xcmsSet-method
(xcmsSet-class), 79
progressCallback<- (xcmsSet-class), 79
progressCallback<-,xcmsSet-method
(xcmsSet-class), 79
rawEIC, 42
rawEIC (rawEIC-methods), 51
rawEIC,xcmsRaw-method (rawEIC-methods),
51
rawEIC-methods, 51
rawMat (rawMat-methods), 52
rawMat,xcmsRaw-method (rawMat-methods),
52
rawMat-methods, 52
retcor, 45, 80
retcor (retcor-methods), 52
retcor,xcmsSet-method (retcor-methods),
52
retcor-methods, 52
retcor.linear
(retcor.peakgroups-methods), 54
retcor.linear,xcmsSet-method
(retcor.peakgroups-methods), 54
retcor.loess, 53
retcor.loess
(retcor.peakgroups-methods), 54
retcor.loess,xcmsSet-method
(retcor.peakgroups-methods), 54
retcor.obiwarp, 53, 53, 55
88
retcor.obiwarp,xcmsSet-method
(retcor.obiwarp), 53
retcor.peakgroups
(retcor.peakgroups-methods), 54
retcor.peakgroups,xcmsSet-method
(retcor.peakgroups-methods), 54
retcor.peakgroups-methods, 54
retexp, 55
revMz (xcmsRaw-class), 76
revMz,xcmsRaw-method (xcmsRaw-class), 76
rtrange (xcmsEIC-class), 67
rtrange,xcmsEIC-method (xcmsEIC-class),
67
sampclass, 3
sampclass (xcmsSet-class), 79
sampclass,xcmsSet-method
(xcmsSet-class), 79
sampclass<- (xcmsSet-class), 79
sampclass<-,xcmsSet-method
(xcmsSet-class), 79
sampnames, 68, 81
sampnames (sampnames-methods), 56
sampnames,xcmsEIC-method
(sampnames-methods), 56
sampnames,xcmsSet-method
(sampnames-methods), 56
sampnames-methods, 56
sampnames<- (xcmsSet-class), 79
sampnames<-,xcmsSet-method
(xcmsSet-class), 79
selfStart, 63
show, 71
show,xcmsEIC-method (xcmsEIC-class), 67
show,xcmsFragments-method
(xcmsFragments-class), 70
show,xcmsPeaks-method
(xcmsPeaks-class), 73
show,xcmsRaw-method (xcmsRaw-class), 76
show,xcmsSet-method (xcmsSet-class), 79
sortMz (xcmsRaw-class), 76
sortMz,xcmsRaw-method (xcmsRaw-class),
76
specDist (specDist-methods), 56
specDist,xcmsSet-method
(specDist-methods), 56
specDist-methods, 56
specDist.cosine, 57
INDEX
specDist.cosine,matrix,matrix-method
(specDist.cosine), 57
specDist.meanMZmatch, 58
specDist.meanMZmatch,matrix,matrix-method
(specDist.meanMZmatch), 58
specDist.peakCount
(specDist.peakCount-methods),
59
specDist.peakCount,matrix,matrix-method
(specDist.peakCount-methods),
59
specDist.peakCount-methods, 59
specNoise, 59, 61
specPeaks, 60, 60
split, 81
split, split-methods (split.xcmsSet), 62
split.screen, 38, 43
split.xcmsRaw, 61
split.xcmsSet, 62
SSgauss, 62
stitch (stitch-methods), 63
stitch,xcmsRaw-method (stitch-methods),
63
stitch-methods, 63
stitch.netCDF (stitch-methods), 63
stitch.xml (stitch-methods), 63
structure, 73
vector, 73
verify.mzQuantM, 65
verify.mzQuantML, 67
verify.mzQuantML (verify.mzQuantM), 65
write.cdf (write.cdf-methods), 65
write.cdf,xcmsRaw-method
(write.cdf-methods), 65
write.cdf-methods, 65
write.mzdata (write.mzdata-methods), 66
write.mzdata,xcmsRaw-method
(write.mzdata-methods), 66
write.mzdata-methods, 66
write.mzQuantML, 65
write.mzQuantML
(write.mzQuantML-methods), 67
write.mzQuantML,xcmsSet-method
(write.mzQuantML-methods), 67
write.mzQuantML-methods, 67
xcmsEIC-class, 67
INDEX
xcmsFileSource, 81
xcmsFileSource-class, 68
xcmsFragments, 7, 69, 70, 75
xcmsFragments-class, 70
xcmsPapply, 71, 79
xcmsPeaks-class, 73
xcmsRaw, 7, 21, 35, 37, 66, 71, 73, 74, 76, 78,
81, 82
xcmsRaw-class, 76
xcmsSet, 7, 21, 43, 67, 70, 78, 79, 81
xcmsSet-class, 79
xcmsSource, 36, 69, 82
xcmsSource (xcmsSource-methods), 82
xcmsSource,character-method
(xcmsFileSource-class), 68
xcmsSource,xcmsSource-method
(xcmsSource-methods), 82
xcmsSource-class, 81
xcmsSource-methods, 82
89