filterFourierTransformArtefacts | R Documentation |
The filterFourierTransformArtefacts()
function removes (Orbitrap) fast
fourier artefact peaks from spectra. Such artefacts (also referred to as
ripples) seem to be related to the
ringing phenomenon and
are frequently seen in Orbitrap data as small random mass peaks ~ 0.01 Da
from a main peak with a very large intensity. See also
here
for more details and information. The data set fft_spectrum
represents a
Spectra()
object with a single Orbitrap spectrum with such artefacts (see
examples below).
See also Spectra()
(section *Data subsetting, filtering and merging) for
the definition of the function.
The current implementation iterates through all intensity ordered peaks in a
spectrum and removes all peaks with an m/z within +/- halfWindowSize
of
the current peak if their intensity is lower than threshold
times the
current peak's intensity. Additional parameters keepIsotopes
, maxCharge
and isotopeTolerance
allow to avoid removing of potential [13]C
isotope
peaks (maxCharge
being the maximum charge that should be considered
and isotopeTolerance
the absolute acceptable tolerance for matching
their m/z).
Jan Stanstrup, Johannes Rainer
library(Spectra)
data(fft_spectrum)
plotSpectra(fft_spectrum)
## Focus on an artefact
plotSpectra(fft_spectrum, xlim = c(264.5, 265.5))
plotSpectra(fft_spectrum, xlim = c(264.5, 265.5), ylim = c(0, 5e6))
fft_spectrum <- filterFourierTransformArtefacts(fft_spectrum)
fft_spectrum
plotSpectra(fft_spectrum, xlim = c(264.5, 265.5), ylim = c(0, 5e6))
## R code to download/extract the data.
## Not run:
library(Spectra)
# get orbitrap data
download.file("https://ftp.ebi.ac.uk/pub/databases/metabolights/studies/public/MTBLS469/AV_01_v2_male_arm1_juice.mzXML", "AV_01_v2_male_arm1_juice.mzXML")
data <- Spectra("AV_01_v2_male_arm1_juice.mzXML")
extracted_spectrum <- data[195]
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.