plot_spectra: Draw mass spectra

View source: R/plots.R

plot_spectraR Documentation

Draw mass spectra

Description

Graphical visualization of mass spectra obtained using the function simulate_theoretical_spectra.

Usage

plot_spectra(
  spectra,
  time_points = unique(spectra[["Exposure"]]),
  charges = unique(spectra[["Charge"]]),
  control_time = FALSE,
  ...
)

Arguments

spectra

data table. Result of simulate_theoretical_spectra.

time_points

vector of values of exposure times to be displayed on the plot. Default unique(spectra[["Exposure"]]).

charges

vector of charges to be displayed on the plot. Default unique(spectra[["Charge"]]).

control_time

logical. Indicates whether the spectrum at the control time (conventionally equal to 0) should be drawn.

...

additional arguments passing to the theme.

Details

This function draws mass spectra from data obtained via simulate_theoretical_spectra.

Value

ggplot object

Examples


theo_spectra <- simulate_theoretical_spectra(sequence = "LVRKDLQN",
                                             charge = c(3, 5),
                                             protection_factor = 100,
                                             times = c(0.167, 5),
                                             pH = 7.5,
                                             temperature = 15,
                                             n_molecules = 500,
                                             time_step_const = 1,
                                             use_markov = TRUE)

plot_spectra(theo_spectra)


hadexversum/powerHDX documentation built on Aug. 31, 2022, 7:47 p.m.