calculate_kinetics: Calculate kinetic data

Description Usage Arguments Details Value See Also Examples

View source: R/calculate_kinetics.R

Description

Calculate kinetics of the hydrogen-deuteration exchange for given peptide.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
calculate_kinetics(
  dat,
  protein = dat[["Protein"]][1],
  sequence,
  state,
  start,
  end,
  time_in,
  time_out,
  deut_part = 1
)

Arguments

dat

dat data read by read_hdx

protein

protein value for chosen peptide

sequence

sequence of the peptide for which the kinetics is calculated

state

state of given sequence

start

end of given sequence

end

end of given sequence

time_in

time in for experimental calculations

time_out

time out for experimental calculations

deut_part

percentage of deuterium the protein was exposed to, value in range [0, 1]

Details

The function calculates deuteration data for all available data points for given peptide. All four variants (relative & theoretical combinations) of deuteration computations are supported. Manual correction of percentage of deuterium the protein was exposed to during the exchange in theoretical calculations is provided. To visualize obtained data we recommend using plot_kinetics function. The first version doesn't support filled Modification and Fragment columns.

Value

data frame with deuteration calculated for all the data points between time_in and time_out. The chosen time point for which deuteration in all four variants is calculated is available in column 'time_chosen'. The rest of the returned structure is equivalent to structure returned by calculate_state_deuteration.

See Also

read_hdx calculate_state_deuteration plot_kinetics

Examples

 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
29
30
31
32
33
34
35
36
37
38
39
40
# load example data
dat <- read_hdx(system.file(package = "HaDeX", 
                            "HaDeX/data/KD_180110_CD160_HVEM.csv"))

# calculate data for sequence INITSSASQEGTRLN in state CD160
(kin1 <- calculate_kinetics(dat, 
                   protein = "db_CD160",
                   sequence = "INITSSASQEGTRLN", 
                   state = "CD160",
                   start = 1, 
                   end = 15,
                   time_in = 0.001, 
                   time_out = 1440))
                   
# calculate data for sequence INITSSASQEGTRLN in state CD160_HVEM
(kin2 <- calculate_kinetics(dat, 
                   protein = "db_CD160",
                   sequence = "INITSSASQEGTRLN", 
                   state = "CD160_HVEM",
                   start = 1, 
                   end = 15,
                   time_in = 0.001, 
                   time_out = 1440))
                   
# load extra libraries
library(dplyr)
library(ggplot2)

# plot example - experimental and relative 
bind_rows(kin1, kin2) %>% 
 plot_kinetics(theoretical = FALSE, 
               relative = TRUE) +
 labs(title = "Kinetic plot for INITSSASQEGTRLN")
 
# plot example - theoretical and absolute
bind_rows(kin1, kin2) %>%
  plot_kinetics(theoretical = TRUE, 
               relative = FALSE) +
  labs(title = "Theoretical kinetics plot for INITSSASQEGTRLN")
       

HaDeX documentation built on Aug. 12, 2021, 5:20 p.m.