centroid | R Documentation |
returns a centroid spectrum of a recorded profile mode spectrum.
centroid(mZ, intensity, tolppm=100, debug=FALSE)
mZ |
Numerical vector of profile recorded data and sorted mZ values. |
intensity |
corresponding intensity values. |
tolppm |
maximal distance in Da between to profile mZ values. default is set to 100ppm. |
debug |
if true all peak profiles are plotted. default is false. |
the method is tested on an Orbitrap Fusion Lumos FSN20242 data set.
returns a data.frame
with a mZ and a intensity column.
thanks to Nienke Meekel and Andrea Brunner (kwrwater.nl) and Witold E. Wolski.
Christian Panse and Jonas Grossmann, April 2020
# Orbitrap Fusion Lumos FSN20242 # p2722/.../.../stds_pos_neg_MS_highconc_UVPD_50_300.raw # scan 1959 # CC(C)(C)C(O)C(OC1=CC=C(Cl)C=C1)N1C=NC=N1 1 # exact.mass 295.1088 # FTMS + p ESI d Full ms2 296.1162@uvpd50.00 p <- protViz:::.getProfileMS2() # determine eps plot((diff(p$mZ)) ~ p$mZ[2:length(p$mZ)], log='y'); abline(h=0.1, col='red') points(p$mZ , 1E-4 * p$mZ, col='grey', type='l') abline(v=296.1162, col='cyan') op <- par(mfrow=c(2, 1)) plot(p$mZ, p$intensity, type='h', main='profile', xlim=c(100,300)) abline(v=296.1162, col='cyan') plot(centroid(p$mZ, p$intensity),type='h', main="centroid",xlim=c(100,300)) par(op) op <- par(mfrow=c(2, 1), ask = TRUE) rv <- centroid(p$mZ, p$intensity, debug = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.