Description Usage Arguments Value
This function takes an MSnExp object and plots a 2D chromatogram using the specified modulation time and optional ion extraction. The function relies on ggplot2 for plotting.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | plot2D(
object,
file = 1,
mod.time,
delay.time = 0,
ion = NULL,
mz.tol = c("ppm", "abs"),
ppm.tol = 20,
abs.tol = 0.5,
log.scale = F,
rt.min = 0,
rt.max = max(rtime(object)),
rt2.min = 0,
rt2.max = mod.time,
mz.min = min(object@featureData$lowMZ),
mz.max = max(object@featureData$highMZ),
int.min = 0,
int.max = max(tic(object), na.rm = T) + 1,
color.scale = "Spectral",
reverse.scale = T,
save.output = F,
filename = "2dplot",
filetype = ".pdf",
filepath = ".",
print.output = T,
mz.digits = 4,
plot.type = c("2D", "2Di", "3D")
)
|
object |
An MSnExp object |
file |
Which file (numeric, not filename) to pull data from. Default is 1 |
mod.time |
The modulation time of the 2D run |
delay.time |
The time it takes for modulation to start. Default is 0. |
ion |
Select an ion to generate an extracted ion chromatogram (EIC). If missing, the total ion chromatogram (TIC) is returned. |
mz.tol |
Whether EIC m/z range is calculated using ppm (relative) or absolute tolerance. Default is ppm |
ppm.tol |
PPM tolerance, used to calculate m/z range for EIC. Default is 20 |
abs.tol |
Absolute tolerance, used to calculate m/z range for EIC. Default is 0.5 m/z |
log.scale |
Whether intensity coloring should be log scaled. Default is FALSE |
rt.min |
Minimum 1D RT to plot. Default is 0 |
rt.max |
Maximum 1D RT to plot. Default is the max found in the data |
rt2.min |
Minimum 2D RT to plot. Default is 0 |
rt2.max |
Maximum 2D RT to plot. Default is the modulation time |
mz.min |
Minimum m/z to plot. Default is lowest found in the data |
mz.max |
Maximum m/z to plot. Default is highest found in the data |
int.min |
Minimum intensity to plot. Default is 0 |
int.max |
Maximum intensity to plot. Default is highest found in the TIC |
color.scale |
Color scale from distiller to use. Default is 'Spectral.' |
reverse.scale |
Reverse the color scale. Default is T. |
save.output |
Whether to save the output as a file. Default is FALSE |
filename |
The name for saving the file if desired. Default is '2dplot.png' plus the file selected plus the ion selected. |
filetype |
Filetype of the form ".pdf". Default is ".pdf" |
filepath |
Where to save the output file. Default is '.' |
print.output |
Whether to show the plot output. Default is TRUE |
mz.digits |
The number of digits after the decimal to show for m/z's in the plot title. Default is 4 |
plot.type |
Choose from 2D ggplot, interactive 2D plotly plot ('2Di'), or an interactive 3D plotly plot ('3D'). Default is 2D |
A 2-dimensional plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.