Calculations
datafiles.Rmd
In this article we discuss the transformation of the data, with
description of every calculated step. For the visualization methods of
described values, see vignette("visualization")
.
Initial processing of the data
Let’s start with a glimpse of the datafile - in this case, in
cluster
format from DynamX. For more information about
accepted datafiles see vignette("data_input")
library(HaDeX)
dat <- read_hdx(system.file(package = "HaDeX", "HaDeX/data/KD_180110_CD160_HVEM.csv"))
## [1] ""
head(dat, 6)
## Protein Start End Sequence Modification MaxUptake MHP State
## <char> <int> <int> <char> <lgcl> <num> <num> <char>
## 1: db_CD160 1 15 INITSSASQEGTRLN NA 14 1590.808 CD160
## 2: db_CD160 1 15 INITSSASQEGTRLN NA 14 1590.808 CD160
## 3: db_CD160 1 15 INITSSASQEGTRLN NA 14 1590.808 CD160
## 4: db_CD160 1 15 INITSSASQEGTRLN NA 14 1590.808 CD160
## 5: db_CD160 1 15 INITSSASQEGTRLN NA 14 1590.808 CD160
## 6: db_CD160 1 15 INITSSASQEGTRLN NA 14 1590.808 CD160
## Exposure File z Inten Center
## <num> <char> <int> <num> <num>
## 1: 0.000 KD_160527_CD160_sekw_05 1 6592 1591.2584
## 2: 0.000 KD_160527_CD160_sekw_05 2 394066 796.3552
## 3: 0.000 KD_160527_CD160_sekw_05 3 173526 531.2633
## 4: 0.001 KD_160527_CD160_IN_01 2 232221 796.3634
## 5: 0.001 KD_160527_CD160_IN_01 3 110675 531.2849
## 6: 0.167 KD_160530_CD160_10s_01 2 99894 800.3610
As we see, the data file has a very specific structure and is not informative yet. In the file, we have values for each value (charge) for each time point () for each state of each peptide, repeated as many times as measurement was repeated (each measurement should be repeated at least three times).
Our aim is to have one result with an uncertainty of the measurement per each peptide in each biological state in each measured time point - data in this format allows further calculations, e.q. calculating deuterium uptake values.
For a better understanding of the process of aggregating the data,
see the vignette("transformation")
article.
Within each replicate of the measurement (we recognize each replicate by the value), the values are provided for each possible value. The values are in the column, as it is a geometrical centroid calculated from the isotopic envelope. Firstly, we have to calculate the mass value, measured experimentally:
To aggregate data from different
values, we have to calculate the mean mass weighted by intensity.
Additional information about this step and how the weighted mean impacts
the results can be found in vignette("mass_comparison")
article.
.
Where:
- - mass of the peptide [Da], average from replicates,
- - intensity of the measurement,
- - mass of the peptide, calculated using Equation 1.
As we use the aggregated result from the replicates, we need to calculate an uncertainty associated with the measurement. We use the mean value as the final result, so we need to calculate error as a standard deviation of the mean, according to the Equation 3:
.
Where:
- - measured value from a replicate,
- - mean value from all of the replicates,
- - number of replicates.
Now we have the format we want for further calculations.
Calculation of the deuterium uptake
HaDeX package provides the calculated values in different forms. All of them are provided with associated uncertainty of the measurement. All of the uncertainties are derived from the formula - the Law of propagation of uncertainty:
Deuterium uptake
Deuterium uptake is the increase of the mass of the peptide in time . The minimal exchange control is mass measured directly after adding the buffer (before the start of the exchange), and is the mass measured in chosen time point . The value is in Daltons [Da].
The uncertainty associated with deuterium uptake [Da] (based on equation 3):
Fractional deuterium uptake
Fractional deuterium uptake is the ratio of the increase of the mass in time to the maximal exchange control. The maximal exchange control is measured after a long time (chosen by the experimenter, usually 1440 min = 24 h). It is assumed that after this long time, the exchange is finished. The minimal exchange control is mass measured directly after adding the buffer (before the start of the exchange), and is the mass measured in chosen time point . This value is a percentage value [%].
The uncertainty associated with fractional deuterium uptake [%] (based on equation 3):
Theoretical deuterium uptake
Theoretical deuterium uptake is the increase of mass in time compared with the theoretical value of the peptide mass without any exchange ( - a mass of the singly charged monoisotopic molecular ion), and is the mass measured in chosen time point . This value is in daltons [Da]:
The uncertainty associated with theoretical deuterium uptake [Da] (the value is a constant without measurement uncertainty - based on the equation 3):
Theoretical fractional deuterium uptake
Theoretical fractional deuterium uptake is the ratio of the increase of mass in time compared with a theoretical value of the mass of the peptide without any exchange to the possible theoretical increase of the mass, based on the maximal potential uptake of the peptide (based on the peptide sequence). This value is a percentage value [%].
The uncertainty associated with theoretical fractional deuterium uptake [%] (based on the equation 3):
Differential values
Differential value is the way to see how the deuterium uptake differs between two biological states. It allows seeing if the possible difference is statistically important (more information below). This value is calculated as the difference between the previously described (in a chosen form) deuterium uptake of the first and second states.
The uncertainty associated with the difference of deuterium uptake (based on the equation 3):
The convenient way to present results calculated as described is the comparison plot and differential plot (Woods’ plot).
Deuterium uptake aggregation
Aggregation of values is inspired by the article by Keppler and Weis (doi: 10.1007/s13361-014-1033-6). This process can be conducted of any deuterium uptake variation - fractional or absolute, with theoretical or experimental control, single-state or differential.
For each residue there is a subset of peptides () covering said residue. Then, the final is calculated from the subset of (where $ 0<k<n$), with weights inverse proportional to the max uptake of peptide () - the shortest the peptide the highest the possibility that the uptake took place in said residue:
The weights are normalized:
Then, the is a weighted average of set of .
This process is done for each residue to cover whole protein data.
As for previous values, also for the uncertainty is calculated: