Description Usage Arguments Value
Simulate a mass spectrum including peaks, noise, a baseline, noise, mass drift, mass resolution, etc.
1 2 3 4 5 6 | simSpectra(n = 1L, peaks = 50L, mz = rlnorm(peaks, 7, 0.3),
intensity = rlnorm(peaks, 1, 0.9), from = 0.9 * min(mz), to = 1.1 *
max(mz), by = 100, sdpeaks = sdpeakmult * log1p(intensity),
sdpeakmult = 0.2, sdnoise = 0.1, sdmz = 10, resolution = 1000,
fmax = 0.5, baseline = 0, decay = 10, units = c("ppm", "mz"),
representation = c("profile", "centroid"))
|
n |
The number of spectra to simulate |
peaks |
The number of peaks to simulate |
mz |
The m/z of the peaks |
intensity |
The intensity of the peaks |
from |
Lower end of mass range |
to |
Upper end of mass range |
by |
Size of m/z bins |
sdpeaks |
Log-standard deviation of peak intensities |
sdpeakmult |
Multiplier for peak variance |
sdnoise |
Standard deviation of noise |
sdmz |
Mass error |
resolution |
Mass resolution as defined by 'm / dm'
where 'm' is the observed mass and 'dm'
is the width of the peak at a proportion
of its maximum height defined by |
fmax |
The proportion of the maximum peak height used
by |
baseline |
Maximum intensity of hte baseline |
decay |
Rate of decay of the baseline |
units |
Units for the width of the m/z bins |
representation |
Return a profile or centroided spectrum? |
A MassSpectrum
or MassSpectraList
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.