hoDCA: higher order direct-coupling analysis

Background Direct-coupling analysis (DCA) is a method for protein contact prediction from sequence information alone. Its underlying principle is parameter estimation for a Hamiltonian interaction function stemming from a maximum entropy model with one- and two-point interactions. Vastly growing sequence databases enable the construction of large multiple sequence alignments (MSA). Thus, enough data exists to include higher order terms, such as three-body correlations. Results We present an implementation of hoDCA, which is an extension of DCA by including three-body interactions into the inverse Ising problem posed by parameter estimation. In a previous study, these three-body-interactions improved contact prediction accuracy for the PSICOV benchmark dataset. Our implementation can be executed in parallel, which results in fast runtimes and makes it suitable for large-scale application. Conclusion Our hoDCA software allows improved contact prediction using the Julia language, leveraging power of multi-core machines in an automated fashion.


Background
Thanks to rapidly growing sequence databases, the prediction of protein contacts from sequence information has become an promising route for computational structural biophysics [1][2][3][4]. The so called direct-coupling analysis (DCA) uses a multiple sequence alignment (MSA) to predict residue contacts in a maximum entropy approach. Its high accuracy was shown in various studies [5][6][7][8][9][10][11] and also made it suitable for protein structure prediction software [12][13][14].
The DCA approach leads to a Potts model with probability for a sequence σ = (σ 1 , . . . , σ N ) given as σ j consisting of local fields and two-body interactions and N being the length of the sequences. Z = σ ∈A N P( σ ) is the partition function as the sum over all sequences where each position is chosen from the alphabet A. After estimation of parameters h i , J ij from empirical sequences σ (b) , a contact *Correspondence: schmidt@cbs.tu-darmstadt.de 1 Department of Physics, TU Darmstadt, Karolinenpl. 5, 64287 Darmstadt, Germany Full list of author information is available at the end of the article prediction score for residue i and j can be obtained by taking the l 2 -norm J ij 2 . In a recent study [15], an improved prediction accuracy was shown by incorporating threebody interactions V ijk σ i , σ j , σ k into H, obtaining a threebody Hamiltonian Here, we present an implementation of this method, which we call hoDCA. Implementation hoDCA is implemented in the julia language (0.6.2) [16], and depends directly on a) the ArgParse [17] module for command-line arguments and b) on the GaussDCA [18] module for performing preprocessing operations on the MSA and the implicit dependencies for those packages. A typical command-line call is julia hoDCA.jl Example.fasta Example.csv -No_A_Map=1 -Path_Map=A_Map.csv -MaxGap=0.9 -theta=0.2 -Pseudocount=4.0 -No_Threads=2 -Ign_Last=0 with input Example.fasta and output Example.csv. The latter consists of lists of all two-body contact scores J ij separated by at least one residue along the backbone. The meaning of the remaining (optional) parameters will become clear in the following.
General notes. For inference of parameters h i , J ij , V ijk , we use the mean-field approximation as described in [15] with a reduced alphabet for three-body couplings. This is accomplished by a mapping with q being the full alphabet of the MSA and q red ≤ q.
On the one hand, this accounts for the so called curse of dimensionality [19], occuring if the size of the MSA is too small to observe all possible q 3 combinations for each V ijk . On the other hand, this significantly reduces memory usage and allows for a faster computation of contact prediction scores. The mapping μ can be specified by Path_Map, which is a csv file with every row representing a mapping. No_A_Map tells which row to choose. As the bottleneck is still the calculation of three-body couplings, it can be performed using parallel threads by specifying the No_Threads flag. In traditional DCA, the last amino acid q usually represents the gap character and is not taken into account for score computation within the l 2 -norm. In hoDCA, each two-body coupling state l ≤ q contains contributions from {n ≤ q|μ(n) = μ(l)} due to the reduced alphabet. We therefore take gap contributions into account by default, which can be changed by the Ign_Last flag.
MSA preprocessing. The MSA is read in by the GaussDCA module, ignoring sequences with a higher amount of gaps than MaxGap, and subsequently converted into an array of integers. However, in contrast to GaussDCA, we check for the actual number of amino acids types contained in the MSA given. We, then, reduce the alphabet from q = 21 to the number of present characters (amino acid types). Afterwards, the reweighting for every sequence σ (b) is obtained by the GaussDCA module via w b = 1/|{a ∈ {1, ..., B} : difference σ (a) , σ (b) ≤ theta}|, where the difference is computed by the percentage hamming distance [6]. The aim of reweighting is to reduce potential phylogenetic bias.
Frequency computation. Empirical frequency counts for the full alphabet are computed according to [6] with δ being the Kronecker delta, B the number of sequences in the MSA, B eff = B b=1 w b and λ c = Pseudocount · B eff . The Pseudocount parameter shifts empirical data towards a uniform distribution. This is necessary to ensure invertibility of the empirical covariance matrix in the mean-field approach.
Frequency counts for the reduced alphabet are computed via The computation of three-point frequencies takes some time and will be executed on No_Threads threads. For this, we parallelized their calculation over the sequence size N, meaning that the i-th process computes f red ijk for all k ≥ j ≥ i and fixed i. Besides the parallelization scheme, three-point frequencies are preprocessed in the same manner as one-and two-point frequencies.
Contact prediction scores. Contact prediction scores follow directly from two-body couplings. Two-body couplings are obtained within the mean-field approximation by where g ij (l, m) is the inverse of the empirical twopoint covariance matrix e ij (l, m) = f ij (l, m) − f i (l)f j (m). g red ijk (α, β, γ ) is given by a relation to the three-point covariance matrix over the reduced alphabet where g ij (α, β) is the inverse of the two-point covariance matrix over the reduced alphabet (see [15] for more details). For the calculation of scores, J ij are transformed into so called zero-sum gauge, satisfying q lĴ ij (l, .) = q mĴ ij (., m) = 0, where "." stands for an arbitrary state viâ The purpose of the gauge transformation is to shift local bias from two-body couplings into local fields [8,20]. Above calculations are the most time consuming parts and run on No_Threads threads. The final scores result from average product correction (APC) of l 2 norm [21] via and Ĵ ij 2 = q l,m=1Ĵ ij (l, m) 2 .

Discussion
A performance benchmark on the PSICOV-dataset [10], consisting of 150 proteins, is presented in [15]. For eval-uating the performance of a single protein, the so called area under precision curve was used, where C is the total amount of contacts and p i is the number of true positives of the first i predictions. Figure 1 shows the predicted contact map of the protein data bank entry 1fx2A as an exemplary case. For this particular protein, the classical two-body DCA has an A-value of A ≈ 0.5 while hoDCA shows a superior A ≈ 0.72. Interestingly, the majority of hoDCA's false positives are located in the lower and upper right corner of the contact map. We hypothesize that this finding is due to correlated gap regions in the corresponding MSA: For this particular pdb entry, many sequences were too short and had to be extended by gaps on both termini. This, in turn, leads to intra and inter correlations between the left and right termini. Figure 2 shows the two-point gap-gap frequencies of the non-preprocessed MSA (i.e. without sequence reweighting, pseudocount modification or deletion of sequences). As can be seen, there is indeed an accumulation of gap regions at the beginning and ending of the protein, thus possibly leading to false correlations. Figure 3 shows the runtime behavior of hoDCA when No_Threads are used for calculation of three-body  terms. We used entry 1tqhA for the benchmark, which has one of the largest MSAs in the PSICOV dataset (N = 242, B = 18, 170) and parameters as in Eq. (2). The overall speedup is about five-fold when executed on n ≥ 12 threads in comparison to a single CPU core. A fit of Amdahl's law T = T 0 · (1 − p · (1 − 1/n)), with T 0 being the Fig. 3 Runtime behaviour of hoDCA for PSICOV entry 1tqhA. The benchmark system was a Debian-operating server with two Intel(R) Xeon(R) CPU E5-2687W v2 @ 3.40GHz. Runtimes were taken for julia-compiled code, thus potential initalization overhead is omitted. The solid line shows a fit of Amdahl's law single-threaded runtime and n = No_Threads, reveals the proportion of parallelized routines as p ≈ 0.86. The serial runtime proportion of ≈ 0.14 comes mainly due to computation of two-body terms. Also note that we did not modify the standard julia parameters, meaning, e.g., a parallel computation of the matrix inverse by default.

Conclusions
Higher-order interactions have been shown to have a strong influence on contact prediction in certain proteins [15,22,23]. Here, we implemented hoDCA, an extension of DCA by incorporating three-body couplings into the Hamiltonian. The accessible command-line user interface and the significant speedup within parallel execution make hoDCA suitable for contact prediction in a variety of proteins, using biochemical inspired alphabet reduction schemes. We hope to have made this method easily accessible for other researchers by this software release.

Availability and requirements
Project name: hoDCA Project home page: http://www.cbs.tu-darmstadt.de/ hoDCA/ Operating systems: Linux, Windows, macOS Programming language: julia (0.6.2) Other requirements: julia packages Argparse, Gauss-DCA License: GNU General Public License v3, http://www. gnu.org/licenses/gpl-3.0.html Any restrictions to use by non-academics: Any commercial use is subject to a contractual agreement between involved parties.
Abbreviations APC: Average product correction; DCA: Direct-coupling analysis; MSA: Multiple sequence alignment