An improved alignment-free model for DNA sequence similarity metric.

BACKGROUND
DNA Clustering is an important technology to automatically find the inherent relationships on a large scale of DNA sequences. But the DNA clustering quality can still be improved greatly. The DNA sequences similarity metric is one of the key points of clustering. The alignment-free methodology is a very popular way to calculate DNA sequence similarity. It normally converts a sequence into a feature space based on words' probability distribution rather than directly matches strings. Existing alignment-free models, e.g. k-tuple, merely employ word frequency information and ignore many types of useful information contained in the DNA sequence, such as classifications of nucleotide bases, position and the like. It is believed that the better data mining results can be achieved with compounded information. Therefore, we present a new alignment-free model that employs compounded information to improve the DNA clustering quality.


RESULTS
This paper proposes a Category-Position-Frequency (CPF) model, which utilizes the word frequency, position and classification information of nucleotide bases from DNA sequences. The CPF model converts a DNA sequence into three sequences according to the categories of nucleotide bases, and then yields a 12-dimension feature vector. The feature values are computed by an entropy based model that takes both local word frequency and position information into account. We conduct DNA clustering experiments on several datasets and compare with some mainstream alignment-free models for evaluation, including k-tuple, DMk, TSM, AMI and CV. The experiments show that CPF model is superior to other models in terms of the clustering results and optimal settings.


CONCLUSIONS
The following conclusions can be drawn from the experiments. (1) The hybrid information model is better than the model based on word frequency only. (2) For DNA sequences no more than 5000 characters, the preferred size of sliding windows for CPF is two which provides a great advantage to promote system performance. (3) The CPF model is able to obtain an efficient stable performance and broad generalization.


Background
With the rapid development of bioinformatics, the collected biologic data has become a giant monster and is still explosively growing. It is necessary to use data mining methods to analyze this tremendous data and find useful or interesting information from the data sets. Due to the extremely huge amount and complex structure of the data, sequence analysis of DNA and protein is a challenging issue in the bioinformatics field. There are many approaches proposed for the sequence analysis on DNA and protein. Among them, the Clustering approach is one of the most popular approaches because it requires less transcendental knowledge and need not mark the targets' category before learning. After clustering, DNA sequence segments can be automatically divided into clusters to show their similarity in structure, which implies their functional similarity [1,2]. Such a treatment has many benefits. For example, it is a powerful intelligent way to predict a genome's function and learn the new world of bioinformatics. When an unknown genome is assigned to a known cluster, it can be convinced that the new genome may have the very similar function with others in the same cluster. But the DNA clustering quality can still be improved greatly. Since the DNA sequence similarity metric has a vital http://www.biomedcentral.com/1471-2105/15/321 impact on the clustering result. We present a new DNA sequence similarity model to improve the DNA clustering quality.
The similarity of DNA sequence is a fundamental metric in bioinformatics, which is a basis for many applications including predicting unknown sequences' functions or effects, constructing creatures(or species) phylogenetic tree, and analyzing homologous. Generally, there are two categories of DNA sequence similarity measuring approaches. One is alignment-based and the other is alignment-free. The alignment-based method directly compares two DNA sequences using string matching algorithms, such as BLAST [3], FASTA [4], UCLUST [5] and CD-HIT [6]. Obviously, it is a time-consuming process to match strings in a large scale database [7], and the violent changes of sequence lengths decline the performance of clustering.
The alignment-free method converts each piece of DNA sequence into a feature vector in a new space, in which the similarity can be quickly computed. Some alignmentfree algorithms exploit probabilistic models to generate feature vectors, of which the Markov model [8][9][10] is extremely important and widely used in bioinformatic applications. However, there are some arguments on the Markov model. Deshpande and Karypis [11] reported that the SVM-based approaches are more effective than many traditional sequence classification algorithms, especially Markov model based techniques, in the DNA sequence comparison. Lu et al. [12] argued that the assumption of Markov model on the DNA sequences impairs its capability.
Qi et al. [13] proposed a comparison method based on the probability of appearance of K-Strings. In order to suppress single-sequence noises, Reinert et al. [14] proposed D S 2 and D * 2 for sequence comparison based on k-tuple content. They are two variants of the D 2 word count statistic. The D 2 based alignment-free models measure the difference between two word probability distributions for sequence comparison. It is a widely used statistics method for sequence comparison based on the joint ktuple content in the two sequences. Bauer et al. [15] confirmed the existence of a species specific Average Mutual Information (AMI) profile and took these profiles to measure the evolutionary relationships between genomic sequences.
The k-tuple algorithm [16,17] is a very popular alignment-free method. It segments a DNA sequence via a sliding window of length k. A segment of DNA sequence in the window is a tuple, usually called a word of length k. The k-tuple algorithm counts the frequency of each tuple, i.e. word, to build a feature vector based on the frequency value. Since a DNA sequence is converted into a fixed length vector, it can be quickly measured by some distance metric.
It has been proved in many researches that the simple k-tuple method cannot completely describe all information contained in a DNA sequence, since it only contains the word frequency information. Therefore, many modified k-tuple algorithms are proposed to contain more information in models. Liu et al. [18] appended the mean and variance value of each word's position distribution into the feature vector. As a result, the size of the final feature vector becomes three times of 4 k . This method increases the information contained in a feature vector at the expense of computing overhead, in terms of larger processing latency and memory. Wei et al. [19,20] presented a Distance Measure based k-tuples (DMk) method for DNA sequence clustering. According to the position distribution of each word, the DMk method calculates its entropy value to construct a feature vector. Dai et al. [21] utilized both the word frequency and overlapping structure of words to improve the efficiency of sequence comparison. Li and Wang [22] counted the information of codon positions, and calculated the relative entropy over 12-dimension feature vectors to discriminate protein coding and non-coding sequences in the yeast genome. Wang and Zheng [23] presented the Weighted Sequence Entropy (WSE) based comparison on word frequencies to modify the classical relative entropy. Zhao et al. [24] transformed the DNA sequence into the 60-dimension distribution vectors. Lu et al. [12] summarized the word frequency information over a serial of sliding windows with their size varying from 1 to k. Consequently, they have to observe all k-mer strings' probability, and the amount of sub-strings is up to 4 k .
The key issue of the alignment-free method is that various DNA characteristics and features should be integrally considered and carefully composed so as to contain sufficient original DNA information in the converted feature space. Shi and Huang [25] proposed a Three Sequence Method (TSM) to build a twelve-component feature vector. Yu [26] converted a DNA sequence into three 2-dimension cumulative ratio curves instead of symbolic sequences. Li and Wang [27] presented a 16dimension binary vector based on the group of nucleotide bases.
A segment of DNA data can be considered as a text written by using a four-letters alphabet. So some researchers apply text clustering methods to DNA data, such as [2,[28][29][30]. It is confirmed that key words are flocking and not randomly distributed in DNA sequences [2,28].
In this paper, we present an improved alignment-free model, named as CPF model, which combines advantages of other algorithms, such as k-tuple [16,17], DMk [20] and TSM [25]. The CPF model converts a DNA sequence into three new sequences according to the classification of nucleotide bases, takes both frequency and position distribution information into account, and measures the http://www.biomedcentral.com/1471-2105/15/321 similarity in a 12-dimension space. Thus, the CPF model contains more information than traditional alignmentfree algorithms and achieves better clustering quality. The experimental results demonstrate the effectiveness of the CPF model.

Motivation
Our direct motivation is to improve the DNA clustering quality rather than detect homologous sequences. It is well known that the basic k-tuple method only containing word frequency information is not sufficient to fully describe a DNA sequence. Unsufficient information in a feature vector is the most important reason that causes poor clustering results. For instance, Dong and Pei [31] argued that the position inside sequence is important information for the sequence data clustering or classification. Thus, many modified algorithms adopt the position information of nucleotide bases. Among them, the DMk method [20] considers the occurrence, location and order relation of k-tuple in a DNA sequence. It produces a feature vector based on the Shannon entropy that reflects the degree of importance of positions in a sequence, instead of simply adding new statistical information. The vector size of DMk is equal to that of k-tuple under the same sliding window size. However, the DMk method ignores the classifications of nucleotide bases, which are very useful information to discriminate DNA pieces.
Many researches show that the classification over nucleotide bases improves the efficiency when comparing DNA sequences. TSM [25] converts a DNA sequence into three symbolic sequences utilizing the classifications of nucleotide bases and their chemical properties. TSM benefits from such a treatment. But the improvement of TSM is limited because it only involves the classification and word frequency information, while the position information is not included.
In this paper, we aim at using the word frequency, position and nucleotide bases classification in calculating the DNA sequence similarity. We integrate them together to enrich the feature vector but without big dimensions. This idea inspired us to design a new model, named Category-Position-Frequency model (CPF).

The feature vector space
According to the chemical properties of nucleotide bases, they can be divided into three categories, In terms of a specific category, each nucleotide base is mapped to a group. Hence a DNA sequence is mapped to a new alphabet space that is shrunk from 4 k to 2 k . In this paper, we set the size of sliding window as 2, which is the preferred value verified by our experiments. Thus, the length of a word is 2 so that a mapped sequence contains 2 2 = 4 words. Consequently, three categories produce twelve different words, which form our feature vector space. Namely, each dimension represents a word as follows.
The Figure 1 illustrates the construction process of a DNA sequence feature vector.

The feature value
Instead of the frequency of the word in the mapped sequence, we set the value of each dimension equal to the Shannon Entropy of words. The Shannon Entropy can Figure 1 The construction process of a DNA sequence feature vector. http://www.biomedcentral.com/1471-2105/15/321 expose the importance of the position distribution in the word [22]. A non-negative sequence X = {x 1 , x 2 , . . . , x n } produces a sequence of its partial sum S, i.e.
Let Z denote the sum of the whole sequence S, i.e.
Obviously, the smaller the position of x r , the more it contributes to Z. Because the element x r at the position r(r = 1, 2, . . . , n) is summed (n − r + 1) times, i.e., the preceding element has a larger weight than x r . It implies that the partial sum based model prefers the element at a small position. Then the discrete probability at the position r, denoted by p r , is defined as follows.
The entropy of the sequence X can be calculated as This entropy is able to reflect the importance of position in a sequence. Indeed, the front position tends to have a larger entropy. The biggest value of entropy is log 2 n, where n is the length of the sequence. Li and Wang [22] make the original sequence from the word frequency at some positions. The frequency, termed Global Frequency, is counted over the whole sequence. Wei et al. [20] propose another frequency, called the Local Frequency, by counting the distance between two positions where a word occur twice.
where LF w r is the local frequency, r is the order of occurrence of a word w, l w r denotes the position of the rth occurrence of the w, and l w 0 is defined as 0. LF emphasizes the position of occurrence and the local density of a word. A single LF cannot contain the global information of the word. But a sequence of LFs can show the word's global distribution more precisely and clearly than the GF. In this paper, we exploit the LF to make the original nonnegative sequence.
The Table 1 illustrates examples to show the differences between entropy value and LF based entropy value. The length of the example sequences is eight so that the range of entropy is [0, 3], where the sequence "10000000" gets the biggest value, and "00000001" gets the smallest. When the sequences are regularly shifting from "10000001" to "11000000", the LF based entropy values keep a consistent trend, but the entropy values are fluctuant. It is believed that the LF based entropy reflects more subtle structural information than basic entropy.
Finally, a DNA sequence's feature vector is made from the LF based entropy according to the Eq. 1. The similarity between sequences is measured by the Euclidean Distance of feature vectors, i.e.
where d 1 and d 2 are two DNA sequences, H(d 1 ) and H(d 2 ) denote their feature vectors respectively.

The pseudo code
The following is the pseudo code of the CPF model. for all DNA sequence d do 3: for all category C do 4: for all word w ∈ C do 6: (5) 10: , by Eq. (7) 16:

The time and space complexity
The entire clustering process has two stages, first it makes the feature vectors from the raw DNA sequences, and then it runs the clustering algorithm. At the first stage, the CPF time complexity of making a feature vector is O(3 × (n + 2 k × 4n)), where n is the length of a DNA sequence, k is the length of a sliding window,n is the average count of a word in a sequence. It is assumed that the occurrence probability of each word is equal to each other. Hence, the average count of a word isn = n/2 k . Therefore, the CPF time complexity of making a feature vector is O(15n), i.e.
At the second stage, the CPF model runs a clustering algorithm in a 12-dimension feature space because the preferred size of sliding window is two. The time and space complexity depend on the specific clustering algorithm. It is well known that the time complexity of the standard k-means is O(Icdn), where I is the number of iterations, c is the number of clusters and d is the dimensions of the feature vector. As a result, when the CPF model runs the standard k-means clustering algorithm, the total time complexity of the two stages is O(15n + 12Icn).
The CPF space complexity of making a feature vector is O(n + 3 × (n + 2 k ×n)). According to the above assumption, it equals O(7n). When the CPF is implemented by a serial program without any parallel processing, the first stage time complexity on the whole dataset is O(15n × |D|) where |D| denotes the number of DNA sequences in the dataset D. And the space complexity is still O(7n).

Experiment settings
We use the k-means algorithm, which is implemented by the scipy module in Python, to test our CPF model and compare it with other five alignment-free models, i.e. k-tuple, DMk, TSM, AMI [15] and CV [13]. We also compare the CPF based k-means with UCLUST and CD-HIT, which are two alignment based DNA clustering models.
Seven datasets DS2, DS3, DS4, HOG20, HOG50, HOG80 and HOG100 are collected from PBIL [32]. The DS2 dataset is the HOVERGEN from PBIL, which is a database of homologous vertebrate genes. The DS4 is randomly selected from HOMOLENS, which is a database of homologous genes from Ensembl organisms and Ensembl families. The rest are randomly selected from HOGENOM, which contains homologous gene families from microbial organisms.
Each DS* dataset, which is also used by Wei et al. [20], contains six families. Each HOG* dataset contains much more families that are varying from 20 to 100. The Table 2 lists the details of these datasets. The goal of the test is to divide the DNA sequences that belong to the same family into the same cluster as well as possible. Though the data origin is clear, no clustering algorithm can precisely and correctly re-arrange all data into the correct clusters. As well known, the initial cluster centers, which are randomly selected in the k-means algorithm, have a great effect on the results. In fact, the k-means clustering results are varying every time because of the random initial cluster centers. In order to eliminate the occasional disturbance, we repeat each experiment 10 times to count its average performance. At last, all models are evaluated in terms of average purity and F-measure, which are defined as follows.
Let M denotes the number of families in the dataset, M denotes the number of clusters in the whole clustering result, |D| denotes the number of the total DNA sequences in the dataset, N i denotes the number of sequences in the family i,N j denotes the number of sequences in the cluster j, N ij denotes the number of sequences that belong to both family i and cluster j. lbl j denotes the familiy label of the cluster j, i.e. most members in the cluster j belong to the familiy lbl j . The purity of the cluster j is defined as: The purity of the whole clustering result is: Usually, the members in a cluster may be from several families. But the cluster is labelled by the dominated members. The familiy label of the cluster j is: Since a family is often divided into serval clusters. We count the precision and recall of a family over the clusters that have the same family label. The precision of the familiy i is: The recall of the familiy i is: where m i dontes the number of clusters whose familiy labels are equal to i. The F-measure of the familiy i is: The F-measure of the whole clustering result is:

Clustering results
Since the k-means clustering results depend on the number of initial cluster centers, which is denoted by c value in the following. We vary c value to observe the performance variation tendency of models. It is noted that the sliding windows size of CPF and TSM is 2, the rest is 3. When a feature vector is created from a DNA sequence, the k value, i.e. the size of the sliding window, has a significant effect on it. It is well known that a DNA sequence is composed of four letters alphabet {A, C, G, T}. Hence the size of the feature vector is 4 k . Nevertheless, it is not always true that the bigger k value the better it is. Wei et al. [20] suggested that k value should be set 3 because the length of a DNA codon is 3. They believe that this value is helpful to conserve the inherited information in a DNA sequence. For using the same token, it is also set 3 in DMk, k-tuple, AMI and CV. Aita et al. [33] attempted to optimize the k value according to a mathematical model of mutational events. Although the CPF model transforms a DNA sequence into three new sequences, the newly generated sequences are composed of only two letters. Consequently, we assign the sliding window size to 2 in CPF and TSM. The experimental results show that it is suitable for CPF model. The Figure 2 illustrates the clustering results measured in purity against the number of initial clusters on the dataset DS4. The Figure 3 illustrates the same clustering results measured in F-measure on the same dataset. The Figure 4 illustrates the clustering results measured in purity against the number of initial clusters on the dataset HOG50. The Figure 5 illustrates the F-measure results on the dataset HOG50. The variation tendencies of cluster results on the dataset DS2 and DS3 are similar to the DS4. The tendencies on the HOG* datasets are similar to that of HOG50. On the HOG50 dataset, we vary c value from 10 to 280.
All models achieve the peak F-measure value in the range [50-150] whereas the purity value tends to be flat when the c value is greater than 50. Obviously, the bigger c value, the more cluster numbers, and the smaller a cluster is. A smaller cluster certainly has a higher purity (i.e. precision) but a lower recall. A cluster that contains only one sequence will get the highest purity and the lowest recall. But it is meaningless to our test because our goal is to put the similar DNA sequences together and ensure that they are from the same family. So the F-measure assesses clustering results more comprehensive than purity.
In General, the CPF is the best in most cases, and DMk is slightly worse than CPF, but it is much better than the rest models. TSM, k-tuple, AMI and CV are about the same level in most cases. For the F-measure, the CPF  achieves the best result when c value is equal to or slightly greater than the number of families in the dataset, The Table 3 lists the best clustering results in F-measure of CPF and two alignment based models, i.e. UCLUST and CD-HIT, on different datasets. The two alignment based models are far worse than CPF. However, UCLUST and CD-HIT are designed for finding the most similar DNA sequences, namely, every sequence in the cluster must have similarity above a given identity threshold (T).
So these two alignment based models always get plenty of small clusters, which leads to a high precision (i.e. purity) score but a very poor recall score. As a result, their F-measure scores are worse. For example, on the HOG50 dataset, the UCLUST outputs 484 clusters, and the CD-HIT outputs 625 clusters, though all DNA sequences are from 50 families.
Based on above evaluation, CPF model performs stably and consistently with various datasets. It is very easy to set optimal configurations for CPF, which implies that the CPF model has a good capability of generalization and applicability.

The preferred sliding window size
The sliding window size, i.e. k value, determines the dimension of feature vector. The longer sliding windows size, the bigger feature vector dimension is. We vary the size of sliding window from 2 to 6 to observe its influence on the alignment-free models, while the number of k-means initial clusters is fixed on the number of families in the dataset. The Figure 6 illustrates the clustering results measured in purity against the size of sliding window on the dataset DS4. The Figure 7 illustrates the same clustering results measured in F-measure on the same dataset. The Figure 8 illustrates the clustering results measured in purity against the size of sliding window on the dataset HOG50. The The clustering results measured in F-measure against sliding window size on the dataset HOG50. http://www.biomedcentral.com/1471-2105/15/321 Figure 9 illustrates the F-measure results on the dataset HOG50. The variation tendencies of cluster results on the DS* datasets are similar to that of DS4. The tendencies on the HOG* datasets are similar to that of HOG50. The Tables 4 and 5 list the details on all datasets. Generally, the CPF performance is very stable and better than other models in most cases, the sliding window size has a few effect on the CPF model. Namely, it achieves the best or near the best clustering result when the sliding window size is 2. That imples a great virtue of the CPF model. Because the longer sliding window size will consume much more computing resources including both time and space. In contrary, the DMk is unstable though it may be slightly better than the CPF occasionally.   As a result, a larger sliding window may not harvest a better clustering result. A shorter window size produces a shorter feature vector, which is greatly helpful in the large scale DNA processing because a shorter vector can reduce the computation overhead and speed up running time exponentially.
It is apparent that the word-frequency-only method (e.g. k-tuple, TSM, AMI and CV) performs worse than the other two hybrid methods (DMk and CPF) because they miss some useful information. In contrast, CPF considers more useful information and achieves better results.

The running time
The Table 6 lists the average running time of six models at two stages against different k value on the dataset HOG80. Each of them is repeated 200 times to sum the running time. The running environment is as follows.
At the feature vector building stage, the CPF model is slower than others except AMI. But at the k-means clustering stage, the CPF model is faster than others except AMI. Especially when k value is greater than 3, ktuple, DMk and CV are tens times slower than CPF, TSM and AMI though the former three models are faster at the feature vector building stage.
It is a disadvantage for the CPF model to spend a long time on the feature vector building stage. But the CPF model runns very fast at the k-means clustering stage, If the feature vectors are not stored, namely, they are rebuilt in each clustering process, the total running time of CPF is near to AMI, but bigger than k-tuple, DMk and TSM. However, the feature vector of a DNA sequence is its inherent property, which is invariant. It can be built once and stored for repeated use. The CPF model is helpful to save time in the repeated clustering application.

Discussion
There are a variety of features extracted from a raw DNA sequence, such as word frequency, classifications of nucleotide bases, position and so on. Different alignmentfree models employ different features to build feature space. The dimension of a feature vector depends on the specific model. Generally, it varies from (k + 1) to 4 k . While k = 6, it may be 4 6 = 4096. But, how much is adequate for DNA sequence comparison?
As far as I know, the theoretical boundary is not presented by now. But it is a fact that the longer feature vector may not guarantee the better clustering result. On the small size datasets, our experiments verified that the 12dimension CPF model outperforms the 4096-dimension k-tuple model. Moreover, the experiments illustrate that the CPF model gets the best result when the sliding window is two, i.e. the dimension of a feature vector is 12 (3 * 2 2 = 12). Namely, the longer CPF vector (i.e. the longer sliding window) is not always better than the 12dimension CPF vector. We have tested the CPF model on several datasets, the results show that CPF's performance is steady. As a result, for not too long DNA sequences, the best configuration of CPF model is fixed.
However, the length of a DNA sequence is not very huge in our experiments, which is no more than 5000 characters. It believed that the 12-dimension vector is not adequate for huge DNA sequences. Obviously, if 10,000 characters size of sequences are compressed into 12dimension vectors, too much information are lost so that they can not be effectively distinguished.
When the dataset grows large, all six models becomes worse. The best F-measure value declines from near 1.0 to near 0.5 when the family number of dataset grows from six to 100. All models' F-measure value will less than 0.5 on the more larger dataset. Since the larger the dataset is, the more families may be overlapped eath other. That is a hard obstacle for alignment-free clustering models. It is a big challenge to solve the issue on the wild large scale datasets.
Consequently, it is still an problem for future research to estimate the optimal size of feature vectors for different size of DNA sequences. Our work illustrates that the 12-dimension CPF model can get an excellent clustering result for DNA sequences no more than 5000 characters.

Conclusions
It is believed that an alignment-free model containing more useful information can achieve better data mining results. This paper presents the CPF model that employs the word frequency, position and nucleotide bases classification information from DNA sequences. The experimental results show that CPF is superior to other models, including k-tuple, DMk, TSM, AMI and CV. The following conclusions can be drawn from the experiments.
(1) The hybrid information model is better than the model only based on word frequency.
(2) For DNA sequences no more than 5000 characters, the preferred size of sliding windows for CPF is two, which provides a great advantage to promote system performance. (3) The CPF model is able to make an efficient stable performance and broad generalization.
In the future, we will perform the CPF model on a large scale DNA data to deeply observe DNA sequence similarity and mining relationships among them. And a more efficient clustering method will be presented to promote the clustering results on unknown DNA sequences.