Skip to contents

Plot deuterium uptake curve for selected peptides

Usage

plot_uptake_curve(
  uc_dat,
  theoretical = FALSE,
  fractional = FALSE,
  uncertainty_type = "ribbon",
  log_x = TRUE,
  interactive = getOption("hadex_use_interactive_plots")
)

Arguments

uc_dat

data produced by calculate_kinetics or calculate_peptide_kinetics or create_kinetic_dataset functions

theoretical

logical, indicator if values are calculated using theoretical controls

fractional

logical, indicator if values are shown in fractional form

uncertainty_type

type of uncertainty presentation, possible values: "ribbon", "bars" or "bars + line"

log_x

logical, indicator if the X axis values are transformed to log10

interactive

logical, whether plot should have an interactive layer created with with ggiraph, which would add tooltips to the plot in an interactive display (HTML/Markdown documents or shiny app).

Value

a ggplot object

Details

The function plot_uptake_curve generates the deuterium uptake curve for selected peptides from selected protein. On X-axis there are time points of measurements. On Y-axis there is deuterium uptake in selected form. The combined and propagated uncertainty can be presentes as ribbons or error bars.

Examples

dat <- read_hdx(system.file(package = "HaDeX", "HaDeX/data/KD_180110_CD160_HVEM.csv"))
#> [1] ""

uc_dat <- calculate_kinetics(dat, protein = "db_CD160",
                             sequence = "INITSSASQEGTRLN", 
                             state = "CD160",
                             start = 1, end = 15,
                             time_0 = 0.001, time_100 = 1440)
plot_uptake_curve(uc_dat = uc_dat, 
                  theoretical = FALSE, 
                  fractional = TRUE)


uc_dat2 <- calculate_peptide_kinetics(dat, protein = "db_CD160",
                                      sequence = "INITSSASQEGTRLN", 
                                      states = c("CD160", "CD160_HVEM"),
                                      start = 1, end = 15,
                                      time_0 = 0.001, time_100 = 1440)
                                      
                                      
plot_uptake_curve(uc_dat = uc_dat2, 
                  theoretical = FALSE, 
                  fractional = TRUE)