Skip to main content

Plot precursor masses with DIA window boundaries

Description

Plot precursor masses with DIA window boundaries

Usage

plot_windows(windows, masses, bin_width = 0.1)

Arguments

windows A data frame or list with the columns from and to, e.g. from Cdsw$as_table() or readjust_windows().
masses Precursor masses (m/z): a numeric vector of finite values.
bin_width Width of the histogram bins (m/z).

Value

A ggplot object.

See Also

Other DIA windows: Cdsw, masses, readjust_windows()

Examples

library("prozor")

data(masses)
cdsw <- Cdsw$new(masses, max_window = 100)
windows <- cdsw$optimize_windows(min_count = 10)
plot_windows(windows, masses)

# zoom into one window
start <- windows$from[5]
plot_windows(windows, masses) + ggplot2::coord_cartesian(xlim = c(start - 3, start + 3))