In silico segmentations of lentivirus envelope sequences

Background The gene encoding the envelope of lentiviruses exhibits a considerable plasticity, particularly the region which encodes the surface (SU) glycoprotein. Interestingly, mutations do not appear uniformly along the sequence of SU, but they are clustered in restricted areas, called variable (V) regions, which are interspersed with relatively more stable regions, called constant (C) regions. We look for specific signatures of C/V regions, using hidden Markov models constructed with SU sequences of the equine, human, small ruminant and simian lentiviruses. Results Our models yield clear and accurate delimitations of the C/V regions, when the test set and the training set were made up of sequences of the same lentivirus, but also when they were made up of sequences of different lentiviruses. Interestingly, the models predicted the different regions of lentiviruses such as the bovine and feline lentiviruses, not used in the training set. Models based on composite training sets produce accurate segmentations of sequences of all these lentiviruses. Conclusion Our results suggest that each C/V region has a specific statistical oligonucleotide composition, and that the C (respectively V) regions of one of these lentiviruses are statistically more similar to the C (respectively V) regions of the other lentiviruses, than to the V (respectively C) regions of the same lentivirus.


Background
Retroviruses are RNA viruses infecting vertebrates and many non vertebrates. Virus particles are spherical and surrounded by an envelope. Their viral replication is dependent of the RT (Reverse Transcriptase), a viral RNAdependent DNA-polymerase. The lentivirus genus is part of the retrovirus family. Lentiviruses infect animals and humans and cause slowly progressing diseases. Among the lentivirus genus, HIV-1 and HIV-2 (Human Immunodeficiency Virus type 1 and 2) infect humans, EIAV (Equine Infectious Anemia Virus) infects equids, SRLV (Small Ruminant LentiVirus) infects goats and sheep, SIV (Simian Immunodeficiency Virus) infects non primate monkeys, BIV (Bovine Immunodeficiency Virus) infects bovines and FIV (Feline Immunodeficiency Virus) infects felines.
The considerable plasticity of the genome of lentiviruses is quite obvious in the env gene, encoding the envelope, particularly in the region encoding the surface (SU) glycoprotein forming spikes. Causes of this plasticity are, among other factors, the low fidelity of the viral reverse tran-scriptase (RT) during the retrotranscription of the viral RNA genome into DNA, the lack of proofreading activity of the RT, the high level of virus replication, and some recombination events in co-infected cells [1][2][3][4].
Interestingly, SU mutations do not appear uniformly along the env gene, but are clustered in restricted and specific areas defined as variable (V) regions flanked by constant (C) regions. On average, and depending on the lentivirus considered, from 10 % to 35 % of the aminoacids in SU vary between isolates, and more than 70 % of these variable amino-acids are located in V regions. Such C/V segmentations hold for all the lentiviruses [5][6][7][8][9][10][11].
It is unclear whether the accumulation of mutations in V regions is mainly due to locally high intrinsic mutation rates, or if mutations occur at similar rates at every SU sites with subsequent selection mechanisms eliminating most variants from the C regions. In any case, the plasticity of these genomes allows them to escape immune control very efficiently, while keeping their identity. Most of amino acids encoded by the V regions are on the outside of SU, while the amino acids encoded by the C regions are in the internal part. In this respect, one should note that the replication acts on one-dimensional molecules, at a moment when most of the information about their threedimensional conformation seems unavailable. In other words, if the intrinsic mutation rates are indeed different in C regions and in V regions, this might be due to some specific signals encoded by the nucleotide (linear) viral sequence itself, possibly corresponding to interactions with the RT. To test this hypothesis, we developed a mathematical model based on lentivirus sequences, as simple and robust as possible, able to localize and to characterize their C/V segmentation of the SU region. Our approach was based on HMMs (hidden Markov models). These models are tailored to describe heterogeneous sequences, since they basically break down a given sequence into a succession of locally homogeneous subsequences. HMMs were initially introduced in the context of speech recognition [12] and they are now major tools of the analysis of genomic and proteomic sequences [13][14][15][16][17][18][19]. In sequence analysis, each of the subsequences called a region, is described by the value of a Markov chain, called the hidden state, taken from a finite collection of values. Each state is characterized by its own statistical composition in nucleotides or in amino-acids. The succession of states itself is ruled by a master Markov chain, called the hidden chain.
Our main findings are as follows. Using SU sequences of EIAV, HIV, SRLV or SIV to train the HMMs, we obtained clear and accurate delimitations of the C and V regions of these lentiviruses. This suggests that the statistical composition of the C regions is markedly different from the sta-tistical composition of the V regions. Additionally, we developed combined models, based on EIAV, HIV, SIV and SRLV sequences. These were able to predict simultaneously the C and V regions of every lentivirus in the collection above. Our combined models also predicted the C/V segmentation of other lentiviruses which were not used in the training sets: BIV and FIV. This indicates that the C and V regions are statistically distinct and that the V regions of all the lentiviruses share common statistical signatures.

C/V segmentations of EIAV
We first tried to differentiate the C and V regions of the EIAV SU, using HMMs with N = 2 hidden states, for different orders m. The parameters of the models were estimated on training sets of 94 nucleotide sequences, by the EM algorithm. We used various training sets, dividing at random our complete set of sequences into two equal parts (1:1), the training and the test sets. Then, none of the various HMMs was able to identify the C and V regions of the EIAV SU. We obtained hidden states sequences which oscillated and repeatedly jumped from one hidden state to the other (data not shown). Hence, this method was not reliable to identify homogeneous regions corresponding to the C and V regions of the EIAV SU.
By contrast, fixed EM, as described in section Methods, yielded a clear delimitation of the known C and V regions on the whole test set, for HMMs of different order. For example, HMM of order m = 2 allowed us to predict most of the V regions on nucleotide sequences. HMMs of higher orders (m ≥ 3) gave even more accurate prediction. To evaluate the fit quality and to select the best model among the candidates, we used the Akaike information criterion (AIC) [20]. This criterion is defined by where L is the likelihood of the candidate model and n the number of free parameters. AIC is based on the Kullback-Leibler distance between different distributions of sequences (for this notion, see our section below on Separation of the EIAV C/V regions) and is designed to achieve a balance between fit quality and number of parameters corresponding to the model with the lowest AIC. The best model to predict the C and V regions on nucleotide sequences of the EIAV SU was of order m = 6, according to the AIC criterion (Table 1). However, for m = 5, the fit of the predicted C and V regions with the segmentations deduced from alignments was almost perfect (Figure 1A) and minimized the risk of overfitting the data.
To differentiate the variable regions V1 to V8 and the C regions, we then used HMMs with N = 9 states on nucle-otide sequences. Thus, we trained one hidden state with each variable region and one hidden state with the constant regions as a whole, and we estimated the parameters of a HMM of different orders by the fixed EM algorithm. The best model is of order m = 5 (Table 1). This yields a precise delimitation of the C and V regions on nucleotide sequences, each V region showing a distinct signal ( Figure  1B). Estimating the parameters of the models with the direct counting methods gave similar results.
Finally, HMMs with N = 2 or N = 9 hidden states, able to locate the C and V regions on deduced amino-acid sequences, were trained by the fixed EM algorithm and the direct counting method. We obtained accurate predictions of the C and V regions on the test sequences, with every training method, using a HMM of order m = 1 (Figures 2A  and 2B).
The reconstructed sequences of the hidden states did not oscillate between the different hidden states as in the models based on the EM algorithm. The transition matrix obtained without prior information on the length of the regions allowed to identify long homogeneous regions and to compare them to the C and V regions previously defined.
At this point, we developed models with an unique C region. This C region do not fit a real region but represent an average of all the constant regions. There is no guarantee a priori that the constant regions are grouped together and can be modeled by an unique state. However, the C region introduced in our models allowed to predict all the constant regions with an amazing accuracy.

Tests of the models of EIAV C/V regions
Since our models were able to predict the C and V regions on both deduced amino-acid and nucleotide sequences of EIAV SU, we put them under trial in several directions. First, we checked that the models were not overfitted, keeping in mind that pseudo-counts were introduced to limit the overfitting problem. We checked whether the models were not overly specific of the training data, and whether it was possible to make them encompass new data tests. To perform such tests, the models were trained using nucleotide or amino-acid sequences sharing a minimal amount of motifs with the test sequences. For example, we trained the models on virus sequences, which were present at the beginning of the disease induced in horses by EIAV, and we tested them on virus sequences at later stages of the disease [6]. Because of the variations due to viral replication during the time course of the EIAV infection, the training and test sequences displayed 7.8 % (± 1.3) of divergence at the amino-acid level. In particular, the test and training sequences displayed 43.8 % (± 20.2) of divergence in the third V region (V3). Despite this important level of divergence between the training and test sequences, the models correctly predicted the C and V regions, notably V3.
To check that the models were not simply following the order and positions of the V regions along the sequence, we also assembled artificial sequences with a greater number of V regions than in the real ones. For instance, we inserted a copy of 15 amino-acids, taken from V7, into C2. The models which were trained with the fixed EM algorithm on the original sequences, managed to predict perfectly the additional V region of these modified sequences ( Figure 2C).
Regions predicted by the hidden Markov models on the nucleotide sequence of EIAV SU  Combined C/V models Models based on EIAV sequences were unable to predict C and V regions of HIV, SIV or SRLV SU sequences ( Figure  3). Hence, we developed a new specific model for each lentivirus. We trained models of order m = 1 on deduced amino-acid sequences and models of order m = 5 on nucleotide sequences, on 78 HIV sequences, 45 SIV sequences and 51 SRLV sequences respectively, using either the fixed EM algorithm or the direct counting methods. These new models, specific to each lentivirus, were indeed able to predict the C and V regions of test sequences of the corresponding virus, but failed to predict the C and V regions of the other lentiviruses. On the contrary, a combined HMM of order m = 1 with N = 2 hidden states, trained on a composite training set of EIAV, HIV, SIV and SRLV deduced amino-acid sequences, was powerful enough to localize accurately the V regions of test sequences of EIAV (V1 to V8), HIV (V1 to V4), and SIV or SRLV (V1 to V5). Rather to our surprise, the model also discriminated V1 and V2 of HIV, although these two regions were given as a unique region V1/V2 in the training set ( Figure 4). The C and V regions of EIAV, HIV, SIV and SRLV were also predicted with great accuracy by HMMs of order m = 5 with N = 2 hidden states, trained on the corresponding nucleotide sequences. Finally, the combined models, trained on EIAV, HIV, SIV and SRLV sequences, were able to predict C and V regions of two lentiviruses which were not used to train them, namely BIV and FIV ( Figure 4).

Separation of the EIAV C/V regions
The models developed in our study allow us to differentiate the C and V regions of EIAV and to distinguish each of the 8 variable regions. This indicates that the C and V regions have distinct statistical composition and that the 8 variable regions are statistically distinct too. A classical method to quantify the differences between the Markov chains which represent the C and V regions of EIAV, is to consider the relative entropy, also named Kullback-Leibler divergence, between these models, see [21][22][23][24][25][26]. The relative entropy of two Markov chains is given by where P and Q are the transition matrix of the two Markov chains and π the invariant distribution associated to P. We used a symmetrized form of the relative entropy, defined as The computation of the symmetrized relative entropy between the Markov chains modeling the 9 constant regions and the 8 variable regions of EIAV (see Table 2) indicates that the different C (respectively V) regions are closer to the global C (respectively V) region than to any of the V (respectively C) regions. Furthermore, the V regions are closer to each other than to any of the C regions.
To quantify this overall feeling, we first used the symmetrized relative entropy δ to study the distances between the C and V regions, representing them by a dendogram.
Note that δ is not a true metric because it does not satisfy the triangle inequality. However, one can visualize the distances between the different regions by an unrooted tree, computed by the program Kitch (Phylip 3.5c) using the distance matrix previously estimated ( Figure 5). The dendogram shows a distinct separation between a first group, made of the C regions, and a second group, made of the V regions. This confirms the fact that the C and V regions of EIAV differ in their statistical composition.
To further quantify this separation between the C and V regions, we built an asymptotic statistical test for the empirical transition matrices of two different regions, based on the following considerations. Assuming in general that and are empirical transition matrices of the same Markov chain with theoretical transition matrix q, based on two independent sequences of length L of the Regions predicted on HIV sequences by hidden Markov mod-els trained on EIAV sequences  Regions predicted by the hidden Markov models on the deduced amino-acid sequence of EIAV SU  Regions predicted by the combined hidden Markov model trained on EIAV, HIV, SIV, and SRLV SU

Discussion
We report that HMMs are able to predict the C/V segmentations of various lentiviruses, based only on their deduced amino-acid sequences or their nucleotide sequences, with an amazing accuracy and a great robustness.
We would like to stress the fact that our algorithms identify the V regions without any comparison by alignment with known sequences. The models developed in this study are not based on computations of divergences between sequences. Furthermore, the lengths of the regions exhibit great variability, and the numbers of regions themselves may be, and indeed are sometimes, different from one sequence to another. These, and the various tests presented in section Results, prove that the models do not rely on the relative positions of the regions, nor on their lengths, to identify C/V segmentations of the sequences. On the contrary, they have to rely only on some statistical differences between the compositions in words of nucleotides or amino-acids of length 1 + m, where m is the order of the model.  More detailed consequences of the performances of the models are as follows. First, all the C regions can be suitably modeled by a unique state. This proves that they have similar statistical properties. The V regions can be modeled either by one state or by several states. This suggests that V regions share common properties, when compared to C regions, and, at the same time, that each V region has its own statistical profile.
To highlight similarities and differences between data, a classical statistical method is based on Principal Components Analysis (PCA). Knowing that first order HMMs were able to differentiate between the C and V regions on deduced amino-acid sequences of EIAV SU and used only frequencies of words of two amino-acids, we performed a PCA of the 9 constant regions and the 8 variable regions of EIAV, using the frequencies of 20 × 20 = 400 words of two amino-acids as variables. Figure 6 shows a projection of the C and V regions of EIAV onto the plane defined by the two first principal axes. One sees that, contrary to our method based on HMMs, PCA does not allow to separate the EIAV regions into two groups, whether these groups correspond to the C regions and the V regions or not. With PCA, all the regions seem to have nearly the same statistical composition in words of two amino-acids, although it is not the case. Thus our method, based on HMMs, is able to reveal rather subtle differences between the group of V regions and the group of C regions.
It may be of interest to note that a model, trained on EIAV sequences only, failed to identify the C and V regions of other lentiviruses, and conversely. Hence, the genetic compositions of the env genes of these different lentiviruses are distinct. However, the C and V regions of EIAV, HIV, SIV and SRLV do share some properties which are similar enough, so as to be recognized by a unique HMM, trained on a combined pool of EIAV, HIV, SIV and SRLV SU sequences. This combined model also predicts the C/ V segmentation of BIV and FIV, whose sequences were not used to train the model. This supports the conclusion that the statistical compositions in words of nucleotides or amino-acids of the envelope genes of all these lentiviruses share some common features.
Models of order m = 5 on nucleotide sequences, based on the frequencies of words of length 6, predict with an amazing accuracy the C/V segmentations. These words correspond to one or two complete codons. This length is also compatible with the number of nucleotides that are in the neighborhood of the palm of RT during the retrotranscription [27][28][29]. This suggests that some mechanism of inaccurate nucleotide substitution, possibly due to Principal Components Analysis of the C/V regions of EIAV Figure 6 Principal Components Analysis of the C/V regions of EIAV. Plot of the two first axes of the principal components analysis of the composition in words of two amino-acids of the constant C1 to C9 and variable V1 to V8 regions of EIAV.
Graphic representation of the distances between the C and V regions of EIAV Figure 5 Graphic representation of the distances between the C and V regions of EIAV. A distance matrix between the C and V regions is computed with the symmetrised form of the relative entropy. A dendogram was evaluated with the Kitsch (Phylip 3.5c) program with the default parameters and drawn with the "Unrooted" software [41].
sequence-specific variations and in interaction with the side chains of the RT protein, might modify the speed and/or the precision of the passage along the portion of the RNA chain which the RT copies.

Conclusion
The constant and variable regions of the lentiviruses EIAV, HIV, SLRV, SIV, BIV, and FIV can be identified by rather crude mathematical models based on HMMs. We attempt at present to extract the nature of the statistical signals which allow to distinguish between these regions. In this spirit, it has been reported that the retroviral G → A hypermutation occurs mainly in specific dinucleotide contexts, like GpG and GpA [30,31]. Hence, one of our objectives now is to compare to known contexts of mutation the nucleotide words which are, as the present study shows, statistically characteristic of the variable regions of these lentiviruses.
The most interesting contribution of the combined models based on nucleotide or deduced amino-acid sequences of different lentiviruses is the rapid identification of the C and V regions on newly identified lentivirus sequences without the requirement to alignment. This should be especially useful for highly divergent sequences.
HMMs are usually used to identify homogeneous segments in long sequences. In this study, we showed that HMMs are powerful tools able to identify very short segments in sequences of just few hundred nucleotides. We are considering to generalize our method to study small motifs in short sequences.

Biological data
This section describes the sets of SU nucleotide sequences, used to train and to test the models (Table 3). When the set of sequences for a virus was sufficiently large, like for EIAV or HIV, we chose to break down it into two equal parts and to use half of the sequences to train the models and half to test the models. When the number of available sequences of a virus is more limited, we chose to use 3/4 of the sequences for the traning set in order to have enougth data to estimate the parameters of the models.
Variable regions V1 to V5 are as defined in [7]. However, V1 and V2 are considered as a unique variable region V1/ V2, since these variable regions are separated by a small constant region composed of only a few nucleotides.
Variable regions V1 to V5 are as defined in [5].
Variable regions V1 to V5 are as defined in [8].
We compared the predicted regions with the variable regions V1 to V6 previously defined in [10].
We compared the predicted regions with the variable regions V1 to V5 previously defined in [11].

Hidden Markov models
We recalled in the introduction that HMMs involve pairs of random processes, called respectively the hidden process and the observed process. In our context, the hidden process (S i ) 1 ≤ i ≤ L describes the succession of homogene- Hence, the full model is specified by the pair of matrices (T, B) and by some initial distributions.

Reconstruction algorithms
When the segmentation of the training sequences is not available, the maximum likelihood estimators ( , ) of (T, B) cannot be directly computed. But there exists several algorithms which estimate iteratively the parameters of the models with no foreknowledge of either the observation process or the state process. The most classical one is the expectation-maximization (EM) algorithm, introduced by [36]. In the context of hidden Markov chains, this algorithm is known as the Baum-Welch algorithm, see [13,37] for a detailed description of the algorithm, and [12]. To compute maximum likelihood estimates of the parameters, this algorithm alternates E-steps and M-steps until convergence. During each E-step, the algorithm estimates the missing data (the hidden states sequence), computing the most likely state sequence with respect to the current value of the parameters, obtained through the preceding M-step. During each M-step, the algorithm maximizes the transition and emission probabilities, using the state sequence computed during the preceding E-step.
There is no guarantee that the EM algorithm should produce a sequence (T n , B n ) n ≥ 0 of models which converges to ( , ). Indeed, starting from an unspecified initial point (T 0 , B 0 ), the algorithm can get stuck in one of many local maxima of the likelihood. But there exists a neighborhood of ( , ), such that, for any (T 0 , B 0 ) in this neighborhood, (T n , B n ) n ≥ 0 indeed converges to ( , ) ([38,39]). To introduce some information about the composition of the different regions, we also define and use a new algorithm based on the EM algorithm and on direct counting methods. The details of this new algorithm are as follows. The emission matrix B, corresponding to the transition probabilities between observations for each state, is defined by counting on training sequences. Then one estimates iteratively the state transition probabilities of the T matrix with the EM algorithm, keeping every emission probabilities at their calculated value. The Mstep of the EM algorithm is modified, to omit the usual maximization of the emission probabilities. Then, the Estep and the maximization of the transition probabilities are performed as in the classical EM algorithm. We call this new algorithm fixed EM algorithm (which stands for EM algorithm with fixed emission probabilities). In details, the fixed EM algorithm produces a sequence (T n , B n ) n ≥ 0 of models as follows.
Step Initiation The transition probabilities T 0 are initialized using random values. The emission matrix B 0 is defined by counting on training sequences as follows: with the same notations than in the section "Parameter estimation".
Step Estimation (E) Computation of the probability P k, ᐍ of every successives states k and ᐍ in S, under the current value (T n , B n ). P k, ᐍ = P(S i = k, S i+1 = ᐍ|x 1 , ..., x L , (T n , B n )).
This probability can be computed using the forward and backward variables f k (i) and b k (i) defined by: f k (i) = P(x 1 , ..., x i , S i = k), and b k (i) = P(x i+1 , ..., x n | S i = k, x i-m+1 , ..., x i ).
Step End The steps E and M are executed alternatively until convergence.
The fixed EM algorithm converges to the maximum likeli- T B than the model ( , ) obtained with the EM algorithm. Experimentally, on EIAV sequences, we observe that the convergence of fixed EM occurs 10 times faster than the convergence of the EM algorithm. We defined the fixed EM algorithm to introduce some information about the number N of types of regions and the statistical composition in words of nucleotides or amino-acids of these regions. On the contrary, we introduced no information about the order or the position of the regions along the sequence.
In both EM and fixed EM algorithms, to reconstruct the hidden states sequence and to identify the predicted C and V regions, one determines the sequence of the most probable hidden states, that is, one computes at each position i of the sequence the likelihood of the different hidden states (S i = s) conditionally on the observed sequence and one selects the state with the highest likelihood. The likelihood of the hidden states for each position is computed using the classical forward-backward algorithm, described by [40].

Authors' contributions
ABQ developed the methods, performed the in silico experiments and drafted the manuscript under the supervision of CL and DP. DP conceived the statistical test described in the appendix. CL and DP conceived, designed and coordinated the project, assured its supervision, participated in the interpretation of data and helped to draft the manuscript. All authors read and approved the final manuscript.