Abstract
Hydrogen deuterium exchange mass spectrometry (HDXMS) is a technique to explore differential protein structure by examining the rate of deuterium incorporation for specific peptides. This rate will be altered upon structural perturbation and detecting significant changes to this rate requires a statistical test. To determine rates of incorporation, HDXMS measurements are frequently made over a time course. However, current statistical testing procedures ignore the correlations in the temporal dimension of the data. Using tools from functional data analysis, we develop a testing procedure that explicitly incorporates a model of hydrogen deuterium exchange. To further improve statistical power, we develop an empirical Bayes version of our method, allowing us to borrow information across peptides and stabilise variance estimates for low sample sizes. Our approach has increased power, reduces false positives and improves interpretation over linear modelbased approaches. Due to the improved flexibility of our method, we can apply it to a multiantibody epitopemapping experiment where current approaches are inapplicable due insufficient flexibility. Hence, our approach allows HDXMS to be applied in more experimental scenarios and reduces the burden on experimentalists to produce excessive replicates. Our approach is implemented in the Rpackage “hdxstats”: https://github.com/ococrook/hdxstats.
Introduction
Probing a protein structure is essential to fully understand its function^{1}. Protein structures can be perturbed when binding to another protein, small molecule or due to alterations in their context (such as pH)^{2,3,4}. Hydrogen deuterium exchange (HDX) mass spectrometry is one such technique to examine differential contextspecific protein structure^{5,6}. The guiding hypothesis is that, when a protein is incubated with heavy water, amide hydrogens exchange with deuterium in accordance with LinderstomLang theory^{7}. Though a number of factors, such as solvent occlusion, topological flexibility, amino acid content and secondary structure, also affect the process^{8,9,10,11}. By monitoring the kinetics of HDX using bottomup mass spectrometry, it is possible to discern subtle alterations to a protein’s structure^{3}. To mediate possibly complex kinetics the process is usually examined over a timecourse. However, this temporal component is rarely used in statistical testing of alterations to the kinetics e.g.,^{12,13,14,15,16,17,18,19}.
A number of approaches have been proposed to detect differences in peptide HDX between samples. These include manual examination of the data, linear models, linear mixedmodels and a student’s t test amongst others^{12,13,14,15,16,17,18,19}. The most statistically advanced approach to analyse differential HDX is termed MEMHDX^{16}, which introduced random effects to previous linear modelling approaches^{13}. Models incorporating both fixed effects and random effects are called mixed effects, these model excel at modelling nested variance according to the replicate structure of the data^{20}. However, they can be difficult to interpret for unseasoned users. Furthermore, MEMHDX suggest to examine pvalues for magnitude of deuterium change and change in dynamics. This subtly conflates significance with effect size and we suggest to examine a number of effects alongside the pvalue to accurately interpret the nature of the kinetic changes.
All currently proposed methods avoid explicitly modelling the temporal component of HDX data, which reduces statistical power. In experiments with low samples sizes, such as HDXMS where only a handful of measurements are made per peptide, maximising power is crucial to infer conditionspecific differences. Hence, methodology that models serial correlations will improve power in HDXMS experiments with low samples sizes. Statistics based on sampled curves, socalled functional data analysis, concerns the analysis of such functions^{21}. Here, we turn the functional model of HDX into a statistical test, namely a functional analysis of variance (ANOVA). This approach is simpler to interpret and more powerful than previously proposed methods. The advantages arise because of a reduction in the number of parameters and tests performed, whilst also allowing the model to capture serial correlations^{21}. Furthermore, we can exploit repeated measurement across different peptides to estimate a pooled variance. The estimated sample variance for each peptide can then be shrunk towards this pooled variance, resulting in more stable estimates of variance when the sample size is small. This idea is called empirical Bayes and has been highly influential in the analysis of microarrays^{22}, RNAseq^{23} and proteomics experiments^{24}. We establish this method for HDX data as applied to functional models, see^{25} for applications to linear HDX models.
Our article is structured as follows. First, we compare a number of methodologies through simulated examples to demonstrate the effects of different methodological choices, replicate structure and number of time points. We then apply our approach to a number of realworld experiments and find that linear mixed models are unable to control false positives, whilst the t test is unable to declare any results significant. We then proceed to an epitope mapping experiment for which none of the current methods are applicable. We demonstrate that our approach is able to make quantitative statements in experimental scenarios, where other available methods are not. In particular, our method uncovers significantly altered kinetics in an epitope mapping experiment applied to an HOIPRBR, for which previous results have only been qualitative^{26}. Our results support an observation that some single domain antibodies hold HOIPRBR in a more open conformation^{26}.
Our approach is made freely available to the community through an Rpackage “hdxstats”: https://github.com/ococrook/hdxstats, which builds on the “QFeatures” package for general quantitative massspectrometry^{27}.
Results
Simulations
To obtain a more reliable statistical method for hydrogendeuterium exchange mass spectrometry (HDXMS), we developed an empirical Bayes functional model based on a proposed Weibull model for the kinetics (see methods). Our approach can be summarised as fitting a functional model that is blinded to the condition. The model is then refitted separately for each condition. By examining the residual error of each of these two scenarios, we can compute an Fstatistic, which is then moderated by pooling information across peptides. The null hypothesis is that the conditionindependent model is sufficient to explain the data. Figure 1a shows the fitted model kinetics where there is no difference between the two conditions, whilst panel b shows a situation where the kinetics significantly differ between the two conditions. From these fitted models we can compute an F statistic, high values of the F statistics indicate sufficient evidence to reject the null hypothesis. Such high values are obtained by examining the appropriate F distribution (see methods and Fig. 1c). Such an approach avoids testing each time point separately, explicitly incorporates serial correlations and improves power by stabilising variance estimates.
We compare our method to other major approaches (MEMHDX^{16} and t tests). t tests are an exact test for the equality of means of two populations. In HDXMS, this corresponds to the application of the t test pointwise at each measured time point. If the false discovery rate (FDR) for a peptide is lower than some nominal value, say 0.05, we have sufficient evidence to say the HDX kinetics were perturbed at that time point. MEMHDX is a linear mixed modelling approach. These approaches are usually applied when multiple measurements are made on the same quantity of interest, which induces a structured variance. In the case of MEMHDX, replicates are encoded as a random effect. If the coefficients of the linear model related to the condition (see methods) are declared significant, then this would be taken as evidence of perturbed HDX kinetics. We note that t tests are a special case of linear mixed models with one level and random intercepts. Since the t test and linear mixed models produce many pvalues per peptide, they are combined to a single pvalue using the harmonic mean pvalue^{28}. All methods are corrected for multiple testing using the Benjamini–Hochberg procedure^{29}.
In our simulation study (see methods), we are assessing whether methods can detect known perturbations to the HDX kinetics. If a method declares an FDR of less than 0.05 for a given peptide which has conditiondependent kinetics, then this is called a true positive. Whilst, if the FDR is less than 0.05 but the peptide does not have conditiondependent kinetics then that is defined as a false positive. Hence, methods are assessed using the F score (not to be confused with the F statistic), which weighs up precision and recall. In all cases, our approach outperforms the other methods except in the last simulation where only 1% of peptides were simulated to have significant differences, where it performed equally well to the t test. This performance level indicates that our approach can reliably detect differences even with only a couple of replicates and can handle HDX measurements that are missing at random. The t test performs poorly because it is difficult to accurately estimate the population standard deviation and thus it is underpowered. MEMHDX performs better than the t test because it models additional correlations via the random effect but because these correlations are not explicitly parametrised they are less powerful than our functional model. We explore simulations with higher levels of noise in the supplementary material (see Supplementary Fig. 18) and obtain the same conclusions (see Supplementary Note 6). In the next section, we demonstrate that MEMHDX also inflates false positives.
Applications
Structural variant experiment
We compared each of the approaches in practice. Outside of simulations, true positives are not well defined; however, the methods can be tested on their ability to control false positives. We examined a previously published structural variant experiment, where HDX data on maltosebinding protein (MBP) was generated in seven replicates across four HDX labelling times^{17}. Additional experiments were carried out in triplicate for the W169G (tryptophan residue 169 to glycine) structural variant. Here MBPW169G was spiked into the wildtype MBP sample in 5, 10, 15, 20, 25% proportions, and a further experiment included a 100% mutant sample. All data were analysed on a Agilent 6530 QTOF mass spectrometer and raw spectra processed in HDExaminer.
The seven MBP samples without any structural variant can be used as a null experiment by partitioning the replicates falsely into two conditions. That is three of the samples are labelled condition A and four samples are labelled condition B, arbitrarily. We randomly permute the samples labelled A and B, six times. We then performed statistical significance testing between the conditions using the three methods previously considered. Since experiments are in fact all replicates, if the FDR is correctly controlled, there should be no peptides declared significant.
From Fig. 2 we see that our proposed method and the t test perform well at avoiding false positives, each generating only one false positive across the six permutation experiments. However, the linear mixed modelling approach generates excessive false positives, with between 6% and 22% false positives per experiment. Here, the percentage is of the total peptides measured in the experiment. Hence, we can conclude that the linear mixed modelling approach is too liberal to be reliable in practice.
Our proposed functional statistical approach is built using a parametric functional model allowing us to interpret the statistical significance of our results, beyond simply pairwise differences. We compared wildtype MBP with the 100% structural variant sample, using all methods. Given there are seven replicates of the wildtype protein, statistical power (and henceforth, simply, power) is not an issue for any of the approaches. However, for most experiments, seven replicates are likely to be onerous. Each parameter of our functional model can be interpreted and the magnitude of the parameters can be considered as effects sizes. We are particular interested in the parameters b and p of our functional model because they control the timedependent kinetics (see methods for a full description). In particular, values of p > 1 suggest more rapid than exponential exchange of deuterium suggesting that a region has become more exposed to the solvent. Meanwhile, b controls the rate of plateau, such that larger values of b indicate the deuterium uptake plateaus more quickly. The parameter a models the plateau itself, whilst d models the intercept. A forest plot can be used to simultaneously visualise several possible effects that we might be interested in to improve the interpretation of the results. Figure 3 shows two peptides with overlapping residues and their fitted models. In both cases the kinetics are significantly different between the WT and structural variant (FDR < 10^{−8}) using our empirical Bayes F test. Panels c and d of this figure show that the pairwise differences at each time point are different from 0. The parameters d and b only display small changes, whilst a, which models the curves’ plateau, is significantly different. This suggests some residues for these peptides have become accessible due to the mutation compared with the WT protein. We can also see that p ≈ 1.5 for peptide IAYPIAVEA [129–138] and p ≈ 1.8 for YPIAVEAL [131–139] in the W169G variant, whilst for the WT p ≈ 1 in both cases. This suggests more rapid than exponential exchange in deuterium for the mutant and further evidence that this region has become more solvent accessible and/or has fewer hydrogen bonds. The concerted behaviour between the two peptides adds further support to this hypothesis. These peptides are localised to a buried betastrand suggesting the structural variant has a large impact on the protein’s structure (Fig. 3e).
We then assessed our method on its ability to detect subtle differences in HDX experiments. We took the 10% and 15% structural variant samples from the structural variant experiments on MBP. We applied our functional model to the data and found that 12 peptides had an adjusted pvalue smaller than 0.05. Three examples are plotted in Fig. 4a–c with the remainder plotted in the supplementary material. Figure 4d shows the forest plot corresponding to the peptide in Fig. 4a. Here, the difference is visually subtle but our functional method identifies a difference between the two samples. Indeed, at all time points, the deuterium incorporation for the 10% sample is lower than that of the 15% structural variant sample. However, for three out of the four samples, the confidence intervals in this difference overlapped with 0 (see Table 1). The power of functional methods is that they can identify the consistency in an effect across time points, allowing us to identify significant changes that are consistent but not necessarily significant at any time point individually. This finding is reinforced with an overlapping peptide demonstrating concordant behaviour (Fig. 4b, g). The t test fails to find any significant differences at level 0.05 and the histogram of adjusted pvalues is shown in Fig. 4e. The lack of uniformity and peaking of values toward 0 suggests low power, whilst the expected trend is seen for the functional method in Fig. 4f. Even deuterium differences that are apparent are not detected by the t test (see 4c). Our functional models ability to detect differences whilst controlling false positives in both simulations and experiments suggests it is a more appropriate method for HDXMS.
Epitope mapping of HOIPRBR using HDXMS
In this section, we explore an application of HDXMS to epitope mapping of HOIPRBR. HOIP is an E3 ubiquitinprotein ligase which conjugates linear polyubiquitin chains and plays a role in immune signalling^{30,31,32}. Usually, binding epitopes are identified by “protection″; that is, surface amides that incorporate deuterium more slowly as they are shielded from the solvent^{26} performed HDXMS experiments for HOIPRBR upon single domain antibody (dAb) complexation and in APO state. Massspectrometry was performed using a Waters Synapt G2Si instrument and raw data was processed using DynamX. HDXMS measurements were taken at 0, 30 and 300 s postexposure to heavy water, for thirteen dAbs at different molar concentrations. Only a single replicate measurement was taken in each state so that more measurements of different dAbs could be made. However, this renders the t test inapplicable because we cannot compute a withingroup variance and linear mixedmodels (MEMHDX) are inapplicable because there is not a nested replicate structure. However, it is still possible to apply our proposed functional method.
To avoid overfitting, we fix b = 0.5, q = 1, d = 0 in our Weibull model, reducing the complexity of our model to a single degree of freedom in the null case. This greatly reduces the flexibility of our model, but in return we can apply rigorous statistical testing. These parameter choices roughly correspond to an assumption that 80% of deuterium will be incorporated within 30seconds and the kinetics will plateau by 300seconds.
For brevity, we focus on dAb25 from the study of ref. ^{26}, because they observed nonstandard HDX behaviour for this complex (the remainder are shown in the supplementary material). We applied our functional method as detailed in the methods, with the alterations described in the previous paragraph. We identified eight peptides for which the deuterium kinetics were altered (adjusted pvalue < 0.05). six of these peptides displayed nonclassical behaviour with increased deuterium incorporation on dAb binding (see Fig. 5). Three of these peptides overlap with each other and are contained within the helixturnhelix (linker) region of HOIP (top row Fig. 5), whilst the other three also overlap and are contained in the RING2 region of HOIP (middle row Fig. 5)). The remaining two peptides also overlap with each other and are contained within the IBR (inbetween ring) region of HOIP (final row Fig. 5). This suggests that the epitope for dAb25 is contained with the IBR region and this binding holds HOIP in a more open conformation allowing increased solvent exposure; hence, more deuterium exchange is possible.
To provide the spatial context for these changes in deuterium kinetics, we plotted a Manhattan plot; that is, peptides plotted against \({\log }_{10}(p{{{{{{{\rm{value}}}}}}}})\) (see Fig. 6). This helps us to simultaneously visualise protein domain regions and (de)protected regions, as described in the previous paragraph. Whilst examining this plot, we also notice tendencies for pvalues to cluster, suggesting correlations in the spatial axis of HDX data. This is expected, since these peptides either physically overlap or come from the same protein domain. Furthermore, we notice some of these clustered pvalues fall just below the significance threshold suggesting power could be boosted by modelling correlations in this dimension as part of future work. Results for the remaining peptides and a residuelevel analysis can be found in Supplementary Figs. 1–14.
Discussion
We have presented an empirical Bayes functional data analysis approach for HDXMS data. Our model explicitly incorporates the temporal component of these data, which boosts power and interpretation. Furthermore, we developed an empirical Bayes testing approach to stabilise variance estimates across the peptides in the experiment. The resulting methodology is more powerful than previous linear modelbased approaches, as demonstrated by our simulation study. These earlier approaches lack power because they do look explicitly incorporate the temporal component nor borrow information across peptides.
We made an empirical comparison of the approaches in an application to structural variant data. This analysis concluded that the mixedmodelling approach was unable to control the false discovery rate, whilst our approach and the t test were able to control it. However, application to a case with subtle differences demonstrated that the t test was unable to declare any peptides significant. Hence, our approach controls false positives whilst providing peptides which can be followed up.
Having demonstrated the empirical statistical properties of our method, we applied our approach to a case study of multiantibody epitope mapping of HOIPRBR. Current approaches are not able to assess the significance in these experiments because of their stringent assumptions. However, our empirical Bayes functional method is applicable and was able to find significant differential HDX kinetics. Thus, we are able to identify the binding epitopes and allosteric effects of the single domain antibodies on HOIPRBR.
Our approach has a number of limitations. Firstly, we do not model correlations in the spatial domain of HDX data  that is between overlapping peptides. This manifests as clustering of pvalues for overlapped peptides. Several strategies exist to reconcile the spatial dimension of HDX data, including combining pvalues using multilevel testing or spatial random effects, which we will consider if future work. Secondly, we do not model correlations in our multiantibody study across the different antibody experiments. Joint modelling across related experiments is likely to boost power and interpretation further. Finally, our analysis works with centroided HDX spectra, we anticipate further improvements by working with raw spectra and identification confidences directly.
Methods
Preliminaries
In hydrogen–deuterium exchange mass spectrometry, we observe isotope distributions for i = 1,…,n peptides at different exposure times t_{1},…,t_{m} to heavy water (D_{2}O). The isotope distributions are a set of \(\frac{m}{z}\)Intensity pairs revealing the relative intensities of each peptide isotope. These isotope distributions are frequently summarised into a centroid via an intensity weighted mean of the \(\frac{m}{z}\), which we write as \(\bar{\frac{m}{z}}\). Since deuterium is heavier than hydrogen, deuterium interoperation leads to positive shifts in \(\frac{m}{z}\) and monitoring this change over time and with respect to the state is the standard usage of HDXMS. In most scenarios data are replicated, so we observe replicates r = 1,…,R and, potentially, a number of conditions denoted c = 1,…,C. For example, binding to antibody is an example of a condition. The observations are then
where z denotes the charge of the precursor ion. Some practitioners normalise with respect to the initial mass M(0), though this is unnecessary and assumes that mass errors are similar over time. This normalisation is an assumption of homoscedasticity, which is unlikely to hold in general because as deuterium is incorporated the isotope distribution undergoes isotopic expansion and so M(t) will have different errors for different values of t. If we wish to avoid this normalisation, we can include an offset term in our proposed model (see below).
Methodological summary
In this section, we present a highlevel methodological summary. In differential HDXMS, the key quantity of interest is the difference in deuteration patterns between conditions. Conditions can include protein interactions, small molecule binding or environmental perturbation; such as changes in temperature. Statistical methods are typically used to detect significant changes in deuteration between conditions. For example, the t test incorporates the difference in mean between conditions with the variance in each condition into a test statistic. The statistic is then compared to a tdistribution, to compute a pvalue. Once all the pvalues are computed they are corrected for simultaneous testing of many hypotheses (multiplicity), typically using the BenjaminiHochberg procedure.
However, t tests are applied to differential HDXMS pointwise, meaning a test for each time point. This excessive amount of testing results in an unnecessary number of falsenegatives (low statistical power). Our proposed approach performs curve fitting to the kinetics measured by HDXMS. Since only one test is performed per peptide, this reduces the number of tests performed. By examining how well these curves fit to the data, we can see if there are significant changes in HDXMS kinetics. In this case, this is quantified by computing the total difference between the observed data and fitted curves, which is a measure of variance. The appropriate test statistic in this case is an Fstatistic resulting in an F test, in which pvalues are obtained from an Fdistribution. Furthermore, these variances are computed for every peptide and so we can improve our method by learning a distribution of variances. By incorporating prior information about this distribution, we can improve the power of our method. The following sections proceed with a detailed mathematical description of this process. Furthermore, we provide a tutorial for analysing differential HDXMS data in the vignettes of the “hdxstats” package.
Proposed method
In this section, we describe the functional model we use to model hydrogen–deuterium exchange. The kinetics of HDX follow a wellappreciated logistictype model. Typically, peptides rapidly incorporate deuterium and plateau at maximum incorporation. Mathematically, the proposed model takes the following form
Each parameter is interpreted as follows. Firstly, d denotes the mass at time 0, but note this is inferred so the uncertainty in the value is captured unlike when normalising by M(0). The parameter d models the initial undeuterated mass and can be forced to 0 when data are normalised in our “hdxstats” package. b, the rate constant for HDX, controls the timedependent kinetics, such that larger values of b denote a more rapid increase in mass (and hence deuterium incorporation). Whilst a controls the plateau of the model representing maximum incorporation. It is also useful to consider a slight modification to the above model, in which a Weibulltype model is used:
The additional parameter q models additional effects with respect to the temporal kinetics. Sometimes, values of q are greater than 1, suggesting more rapid than exponential incorporations at smaller times, and plateauing more quickly than exponential on longer time scales. Mathematically, q allows some flexibility in the inflexion of the kinetics^{33} refer to this model as a stretched exponential. Furthermore, whilst backexchange correction factors were not available for the datasets considered in this manuscript, methodology and functions to normalise data based on these data are available in our “hdxstats” package.
Twosample test
The proposed model can be turned into a formal test, using tools from functional data analysis. We first suppose that there is no difference in HDX kinetics for a peptide between two conditions. In such a case, a single function would describe the HDX kinetics regardless of the condition. This constitutes the null hypothesis, whilst the alternative is that there is a difference in HDX kinetics. In this case, independent conditionspecific models would better describe the data. To formalise this, for each peptide i, we would fit the following model
and correspondingly compute the residual sum of squares under the null (subscript 0) and alternative (subscript 1) hypothesis:
These equations describe the squared deviation of the observed data from the fitted mean functions. These quantities will be small if the model is a good fit. The relative plausibility of the two models can be described using the Fstatistic:
which intuitively weighs up the relative fits of the null and alternative models. The values d_{i,1} and d_{i,2} represent the degrees of freedom of the corresponding Fdistribution. d_{i,1} is given by p_{2} − p_{1}, that is the difference between the number of parameters in the alternative model and the null model, for our approach p_{1} = 3 and p_{2} = 6 or p_{1} = 4 and p_{2} = 8 if the Weibull model is used. Whilst, d_{i,2} = n_{i} − p_{2}, where n_{i} is the number of observations of peptide i across the conditions. Finally, pvalues are obtained from the corresponding F test:
Given that we are performing n tests, multiple testing corrections should be performed, typically the Benjamini–Höchberg procedure is recommended^{29}.
Effect sizes
In linear models, effect sizes are given by the values of the coefficients of the appropriate covariates. For functional models, there are the number of possible effect sizes. The appropriate effect size is best chosen based on the question of interest. We describe some of the possible effects that can be extracted from the model:

1.
Differences in initial (undeuterated) mass: This quantity is described by extracting d and its confidence intervals from the models.

2.
Difference in maximum uptake: This quantity is described by extracting a + d and its confidence intervals from the models. The parameter a is often referred to as the deuterium recovery.

3.
Difference in rate kinetics: This quantity is described by extracting b as well as p and their confidence intervals from the models.

4.
The global difference between the two models. This quantity is given by the maximum difference between the conditionspecific curves:
$${\Delta }_{i,{{{{{\rm{max}}}}}}}=\mathop{\sup }\limits_{t} {\mu }_{i1}(t){\mu }_{i2}(t)$$(9)or the integral as suggested by^{34}
$${{{\Delta }}}_{i,{{{{{\rm{int}}}}}}}=\int_{t} {\mu }_{i1}(t){\mu }_{i2}(t) {{\mbox{d}}}t.$$(10) 
5.
Local differences between models; that is, an effect at specific time t_{*}. This quantity is given by the difference between the conditionspecific curves at that time:
$${{{\Delta }}}_{i,{t}_{* }}={\mu }_{i1}({t}_{* }){\mu }_{i2}({t}_{* }).$$(11)
Empirical Bayes
Estimates derived from a small number of replicates and timepoints can lead to unstable inferences, as is typically observed in microarray^{22} and RNAseq experiments^{23}. To improve stability, and hence power, we propose an empirical Bayes extension to our model. The idea is to shrink estimates of the sample variance towards a pooled estimate. This constituent a biasvariance tradeoff, where we trade a small amount of bias for increased precision. Following^{35}, inference can then be formulated using a socalled moderated Fstatistic. To elaborate, let \({s}_{i}^{2}=\frac{RS{S}_{i,1}}{{d}_{i,2}}\), we can then use this set of variances to identify a global \({s}_{0}^{2}\) and shrink our estimate \({s}_{i}^{2}\) towards \({s}_{0}^{2}\). We assume true variances \({\sigma }_{i}^{2}\) are drawn from the following scaled inverse χ^{2} distribution:
It can be shown that^{35}, the expected value of the posterior of \({\tilde{s}}_{i}^{2}\) is
where the hyperparameters d_{0} and \({s}_{0}^{2}\) are computed by fitting the following scaled Fdistribution \({s}_{i}^{2} \sim {s}_{0}^{2}F({d}_{2},{d}_{0})\). Hence, we compute the moderated Fstatistic with
Functional ANOVA
Our model takes the form of a functional analysis of variance (ANOVA). As a result, it allows for covariatebased experimental designs with multiples levels. One such example would be an analysis based on a set of antibodies or different concentrations of small molecules.
Linear mixedeffects models
In this section, we summarise the previous methodology for significance testing for hydrogen–deuterium exchange mass spectrometry that explicitly includes temporal components. The approach, using mixed effects models, is an extension of a previous linear modelling approach^{13,16}. In our notation, each set of peptide observations is modelled as
where β_{it}, β_{ic} and β_{tc} denote the coefficients of the fixed effects for time, condition and their interaction between time and condition for peptide i. The replicates are considered as random effects u_{r}. Random effects attempt to model the additional structured variance corresponding to a particular covariate. We note that in this interpretation that time is considered as a factor rather than a continuous quantity. That is, permuting the ordering of time does not change the model and the explicit correlation induced by the temporal dimension is not modelled. In the case that time is interpreted as a continuous quantity, the model becomes
however, HDX data are rarely linear in time and so the data have to be linearised. This can be performed by transforming time according to a shifted \(\log\) transform: \(t\to \log (t+\delta )\). Where δ is chosen to avoid taking the \(\log\) of 0. Though this approach reduces the number of tests performed and models the temporal dimension it is not recommended as it can lead to uncontrolled pvalues and unstable parameter estimates.
Simulations
This section describes our proposed simulation study. We begin by sampling, uniformly at random, the number of exchangeable amides of a peptide from between 5 and 25. The sampled number is the number of exchangeable amino acids in the peptide and we sample that number of amino acids from the 20 canonical amino acids with replacement. We then define time points at which to obtain data: T = {t_{1},…,t_{m}}, with t_{1} = 0 and t_{i} < t_{j} for i < j. For time t_{1}, we simulate the undeuterated isotope distribution using a binomial model. For a subsequent time point t_{i} we sample the percentage incorporation by first sampling from a m−1variate Dirichlet distribution with concentration parameter α, where α_{i} = 20/(i − 1). From this we obtain a vector π which sums to 1. We use the cumulative distribution of π as the schedule of incorporations. That is the incorporation at t_{i}\({D}_{i}=\mathop{\sum }\nolimits_{r = 1}^{i1}{\pi }_{r}\) for i > 1. This ensure that incorporation is nondecreasing in time. To simulate the effect of a condition, for each time point, we sample an indicator \({z}_{{t}_{i}}\in \{0,1\}\) such that the \(p({z}_{{t}_{i}}=0)=0.95\). If \({z}_{{t}_{i}}=1\), then we resample the incorporation amount and continue on the simulation process. This ensures that roughly 95% of the scenarios have no effect with respect to the condition. A binomial model is used to generate deuterated spectra, where the exchangeable hydrogens are randomly replaced with deuterium according to the incoperation percentage. The isotope distribution simulations are repeated R times to allow for replicates. Centroids summarising the average peptide mass are then computed from the isotope distribution. The centroids are then further corrupted by Gaussian noise, using \({{{{{{{\mathcal{N}}}}}}}}(0,0.05)\). In all cases, we simulate 500 measured peptides. We perform simulation scenarios as follows:

(Scenario 1) 4 time points, 3 replicates and 2 conditions

(Scenario 2) 4 time points, 2 replicates and 2 conditions

(Scenario 3) 5 time points, 2 replicates and 2 conditions

(Scenario 4) 6 time points, 2 replicates and 2 conditions

(Scenario 5) 6 time points, 2 replicates, 2 conditions and 5% missing values

(Scenario 6) 6 time points, 2 replicates, 2 conditions, 5% missing values, \(p({z}_{{t}_{i}}=0)=0.99\)
All simulations are performed 10 times and the distributions compared.
Performance metrics
We use the Fscore to assess the performance of the different statistical methods. The Fscore is the harmonic mean of the precision and recall. Precision is defined as \(\frac{tp}{tp+fp}\) and recall is \(\frac{tp}{tp+fn}\), where tp is true positives, fp is false positives and fn is false negatives. In words, the Fscore weighs how many of the selected peptides are relevant and how many of the relevant peptide are selected.
Implementation
The Weibulltype model is implemented using the LevenbergMarquardt algorithm, an iterative procedure that interpolates between the GaussNewton algorithm and gradient descent^{36}. The parameters are all constrained to be nonnegative and the algorithm ends after 500 iterations or the difference between the successive sum of square residuals is less than 10^{−8}.
Residuelevel analysis
For visualisation purposes, we propose a residuelevel analysis in the following manner. For each residue j = 1,…,J, where J is the total amino acids in the protein, we have a set of pvalues j_{p}, for p = 1,…,P_{j} where P_{j} is the sequence coverage at that amino acid. A residue level pvalue for residue j, for visualisation purposes, is taken as the harmonic mean of the pvalues \(\left\{{j}_{1},...,{j}_{{P}_{j}}\right\}\). The primary visualisation is a heatmap of the \({\log }_{10}\) of this computed value.
Reporting summary
Further information on research design is available in the Nature Research Reporting Summary linked to this article.
Data availability
Data to reproduce the figures are provided in the supplementary material. Experimental data are available from the original manuscripts. Data to reproduce the figure have been deposited on Zenodo: (https://doi.org/10.5281/zenodo.6408572)
Code availability
Code is available as part of the Rpackage “hdxstats”: https://github.com/ococrook/hdxstats.
References
Orengo, C. A., Todd, A. E. & Thornton, J. M. From protein structure to function. Current Opin. Struct. Biol. 9, 374–382 (1999).
Houde, D., Berkowitz, S. A. & Engen, J. R. The utility of hydrogen/deuterium exchange mass spectrometry in biopharmaceutical comparability studies. J. Pharmaceutical Sci. 100, 2071–2086 (2011).
Masson, G. R., Jenkins, M. L. & Burke, J. E. An overview of hydrogen deuterium exchange mass spectrometry (hdxms) in drug discovery. Expert Opin. Drug Discov. 12, 981–994 (2017).
Sauve, V. et al. Mechanism of parkin activation by phosphorylation. Nature Struct. Mol. Biol. 25, 623–630 (2018).
Engen, J. R. Analysis of protein conformation and dynamics by hydrogen/deuterium exchange MS. Anal. Chem. 81, 7870–7875 (2009).
Chalmers, M. J., Busby, S. A., Pascal, B. D., West, G. M. & Griffin, P. R. Differential hydrogen/deuterium exchange mass spectrometry analysis of protein–ligand interactions. Expert Rev. Proteomics 8, 43–59 (2011).
James, E. I., Murphree, T. A., Vorauer, C., Engen, J. R. & Guttman, M. Advances in hydrogen/deuterium exchange mass spectrometry and the pursuit of challenging biological systems. Chem. Rev. 122, 7562–7623 (2021).
Katta, V. & Chait, B. T. Hydrogen/deuterium exchange electrospray ionization mass spectrometry: a method for probing protein conformational changes in solution. J. Am. Chem. Soc. 115, 6317–6321 (1993).
Konermann, L., Pan, J. & Liu, Y.H. Hydrogen exchange mass spectrometry for studying protein structure and dynamics. Chem. Soc. Rev. 40, 1224–1234 (2011).
Kammari, R. & Topp, E. M. Effects of secondary structure on solidstate hydrogen–deuterium exchange in model alphahelix and betasheet peptides. Mol. Pharmaceutics 17, 3501–3512 (2020).
Jia, R. et al. Hydrogendeuterium exchange mass spectrometry captures distinct dynamics upon substrate and inhibitor binding to a transporter. Nat. Commun. 11, 1–10 (2020).
Slysz, G. W. et al. Hydra: software for tailored processing of h/d exchange data from ms or tandem ms analyses. BMC Bioinform. 10, 1–14 (2009).
Liu, S. et al. Hdxanalyzer: a novel package for statistical analysis of protein structure dynamics. BMC Bioinform. 12, 1–10 (2011).
Pascal, B. D. et al. Hdx workbench: software for the analysis of h/d exchange ms data. J. Am. Soc. Mass Spectrom. 23, 1512–1521 (2012).
Rey, M. et al. Mass spec studio for integrative structural biology. Structure 22, 1538–1548 (2014).
Hourdel, V. et al. Memhdx: an interactive tool to expedite the statistical validation and visualization of large hdxms datasets. Bioinformatics 32, 3413–3419 (2016).
Hageman, T. S. & Weis, D. D. Reliable identification of significant differences in differential hydrogen exchangemass spectrometry measurements using a hybrid significance testing approach. Anal. Chem. 91, 8008–8016 (2019).
Lau, A. M., Claesen, J., Hansen, K. & Politis, A. Deuteros 2.0: peptidelevel significance testing of data from hydrogen deuterium exchange mass spectrometry. Bioinformatics 37, 270–272 (2020).
Zhang, N., Yu, X., Zhang, X. & D’Arcy, S. Hdexplosion: visualization of hydrogen–deuterium exchange data as chiclet and volcano plots with statistical filtering. Bioinformatics 37, 1926–1927 (2021).
Schall, R. Estimation in generalized linear models with random effects. Biometrika 78, 719–727 (1991).
Ramsay, J. O. & Silverman, B. W. Applied Functional Data Analysis: Methods and Case Studies (Springer, 2007).
Ritchie, M. E. et al. limma powers differential expression analyses for RNAsequencing and microarray studies. Nucl. Acids Res. 43, e47–e47 (2015).
Love, M. I., Huber, W. & Anders, S. Moderated estimation of fold change and dispersion for RNAseq data with deseq2. Genome Biol. 15, 1–21 (2014).
Goeminne, L. J., Gevaert, K. & Clement, L. Experimental design and dataanalysis in labelfree quantitative lc/ms proteomics: a tutorial with msqrob. J. Proteomics 171, 23–36 (2018).
Claesen, J., Krishnamurthy, S., Lau, A. M. & Economou, A. Moderated test statistics to detect differential deuteration in hydrogen/deuterium exchange mass spectrometry experiments. Anal. Chem. (2021).
Tsai, Y.C. I. et al. Singledomain antibodies as crystallization chaperones to enable structurebased inhibitor development for RBR E3 ubiquitin ligases. Cell Chem. Biol. 27, 83–93 (2020).
Gatto, L. & Vanderaa, C. QFeatures: Quantitative features for mass spectrometry data (2021). https://github.com/RforMassSpectrometry/QFeatures. R package version 1.3.7.
Good, I. J. Significance tests in parallel and in series. J. Am. Stat. Assoc. 53, 799–813 (1958).
Benjamini, Y. & Hochberg, Y. Controlling the false discovery rate: a practical and powerful approach to multiple testing. J. Roy. Stat. Soc.: Series B (Methodological) 57, 289–300 (1995).
Kirisako, T. et al. A ubiquitin ligase complex assembles linear polyubiquitin chains. EMBO J. 25, 4877–4887 (2006).
Gerlach, B. et al. Linear ubiquitination prevents inflammation and regulates immune signalling. Nature 471, 591–596 (2011).
Spratt, D. E., Walden, H. & Shaw, G. S. RBR E3 ubiquitin ligases: new structures, new insights, new questions. Biochem. J. 458, 421–437 (2014).
Chetty, P. S. et al. Helical structure and stability in human apolipoprotein ai by hydrogen exchange and mass spectrometry. Proc. Natl Acad. Sci. 106, 19005–19010 (2009).
Mazur, S. J. & Weber, D. P. The area between exchange curves as a measure of conformational differences in hydrogendeuterium exchange mass spectrometry studies. J. Am. Soc. Mass Spectrom. 28, 978–981 (2017).
Smyth, G. K. Linear models and empirical Bayes methods for assessing differential expression in microarray experiments. Stat. Appl. Genet. Mol. Biol. 3, 3 (2004).
Marquardt, D. W. An algorithm for leastsquares estimation of nonlinear parameters. J. Soc. Ind. Appl. Math. 11, 431–441 (1963).
Acknowledgements
The authors thank Nathan Gittens for critical reading of the manuscript. O.M.C. acknowledges funding from GSK and a ToddBird Junior Research Fellowship from New College Oxford and EPSRC grant number EP/R511742/1. C.W.C. is an employee of GSK.
Author information
Authors and Affiliations
Contributions
O.M.C. conceived and developed the methodology. O.M.C. wrote the software. O.M.C. analysed and interpreted the results. O.M.C. wrote the manuscript. C.W.C. and C.M.D. supervised the project and, also, discussed the results and edited the manuscript. All authors shaped the research agenda.
Corresponding author
Ethics declarations
Competing interests
The authors declare the following competing interests: C.W.C. is an employee of G.S.K.
Peer review
Peer review information
Communications Biology thanks Glenn Masson and the other, anonymous, reviewers for their contribution to the peer review of this work. Primary Handling Editors: Mark Collins and Gene Chong. Peer reviewer reports are available.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Crook, O.M., Chung, Cw. & Deane, C.M. Empirical Bayes functional models for hydrogen deuterium exchange mass spectrometry. Commun Biol 5, 588 (2022). https://doi.org/10.1038/s42003022035173
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s42003022035173
Comments
By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.