BACKGROUND
clustering is a data mining method that aims to identify similar groups in huge datasets, and is widely used in various bioinformatics fields, such as cancer class discovery  <cit>  and protein structure prediction  <cit> .
biological sequence clustering is one of the main applications of clustering in bioinformatics, and has two main objectives: first, to reduce the size of the dataset by identifying representatives for each cluster and removing redundant sequences; and second, to find sequence patterns that appear in the dataset by checking cluster sizes .
recent progress in dna sequencing has enabled us to amass huge amounts of genomic data in a short time.
while current sequencers produce relatively short sequences , the number of such sequences is huge .
however, the analyses of these vast amounts of data require a considerable amount of time.
this necessitates a shift in focus from sequencing throughput to the computational speed of algorithms for sequence data analysis.
generally, clustering algorithms require o time for n sequences, making it difficult to scale them to large datasets.
several algorithms have been developed for more efficient sequence clustering for very similar sequences  <cit> ; however, it is still difficult to rapidly group remote homologous sequences into a cluster based on sequence identity  <cit> .
for clustering based on sequence identity, cd-hit  <cit>  is one of the most widely used sequence clustering tools.
cd-hit is used on public databases such as uniprot  <cit>  and pdb  <cit>  to remove redundant sequences, and has also been used for various bioinformatics analysis, including metagenomic data analysis  <cit> .
it clusters sequences on the basis of sequence identity between pairs, and can deal with large datasets in a relatively short time by relying on an approximate clustering approach and short word filtering.
short word filtering greatly decreases the burden of the sequence alignment calculation by identifying similar sequences on the basis of matches between short subsequences.
however, although this filtering scheme is very computationally efficient, it is too approximate to exclude many dissimilar sequence pairs.
thus, even this well-known tool requires at least  <dig> days to cluster  <dig> million sequences.
furthermore, given the potential of the next generation of sequencers, it is clear that further speed enhancement is necessary.
here, we present a faster and more accurate clustering program named lcs-hit.
we introduce a novel filtering technique to select similar sequence pairs on the basis of the longest common subsequence  before the sequence alignment process.
this approach is much faster than sequence alignment and is stricter than short word filtering.
thus, our clustering algorithm is significantly faster than cd-hit without compromising on clustering accuracy.
the program and source code of the lcs-hit, which are freely available for download at http://www.bi.cs.titech.ac.jp/lcshit/, are implemented in c++ and are supported on linux with gcc  and gnu make.
methods
algorithm
our sequence clustering method consists of several parts, as shown in figure  <dig>  and operates according to the following sequence of steps:
let q be the set of sequences to be clustered and r=∅ be the set of existing cluster representatives.
for each q∈q,
compare q and r by using the short word table, and find the set rq,k, the subset of representatives with ≥t common k-mers  with q .
for each q and each r∈rq,k,
compute the length of the longest common subsequence llcs between q and r. if llcs is above a certain threshold, save the pair as a candidate similar sequence pair that may belong to the same cluster.
otherwise, q and r are considered to belong to different clusters .
for each saved sequence pair q and r, compute the optimal sequence alignment using affine gap penalties and the sequence identity between q and r. if the sequence identity is greater than or equal to the threshold s, then q and r are considered to belong to the same cluster, and q is added to r's cluster .
otherwise, they are considered to belong to different clusters.
if q does not belong to any existing cluster, then create a new cluster whose member and representative is q. q is also registered in the short word table, and let r←r∪q.
an optimal alignment must be computed when checking whether a pair of sequences belongs to the same cluster.
however, the time complexity of computing an optimal alignment is o by dynamic programming, where m and n are the lengths of the two sequences.
this is very slow, making it unrealistic to attempt to compute alignments for all combinations of sequences.
additionally, the number of sequence pairs with a sequence identity less than the threshold s is much more than the number of similar sequence pairs with a sequence identity above the threshold.
thus, our method filters similar sequence pairs by a faster method in advance, and prunes the comparison set of dissimilar pairs.
as a result, the number of alignment computations dramatically decreases, and the whole clustering process can be completed in a reasonable length of time.
in the following sections, we describe the two filtering methods: short word filtering and the proposed lcs filtering.
when a new cluster is created, the first assigned sequence is selected as the representative for its cluster.
representatives of existing clusters are not updated, even if new sequences are added to the clusters.
this means that the clustering result depends on the order of input sequences, while the computational cost in comparing an input sequence with the cluster representative can be significantly reduced.
our clustering method is largely based on cd-hit and retains many similarities.
however, there are two main differences; our method employs a new filtering process  after short word filtering, and different filtering criteria are used for short word filtering.
filtering similar sequence pairs based on the longest common subsequence
short word filtering can process large amounts of sequence data in a short time because of the low computational complexity.
thus, it is suitable for filtering large sequence datasets.
however, the filtering is rough: many dissimilar sequence pairs, i.e., with sequence identity less than the threshold s, pass through the short word filter.
thus, the subsequent sequence alignment process will be hampered and the overall computation time for clustering will be prolonged.
instead, it is necessary to introduce a fast and accurate filtering process after the rough, short word filtering stage.
here, we introduce a new filtering method that relies on the relationship between the length of the lcs and the sequence identity.
although the computational cost for determining the lcs is generally not negligible, a bit-parallel algorithm can be used to accelerate its calculation and avoid a bottleneck.
the longest common subsequence
let a subsequence be created by picking up elements from a main sequence while preserving their relative order.
the lcs is the longest common subsequence among all possible common subsequences.
for example, "tagc" is the lcs of "atcagtc" and "ctagac."
finding the lcs of a sequence pair is equivalent to aligning the two sequences to maximize the number of the matched elements.
the length of the longest common subsequence
the lcs of two sequences x= and y= can be computed as follows:
let xi= and yj=; and let llcs be the length of the lcs between x and y. then,
llcs=0if i=0 or j=0llcs+1if xi=yjmaxllcs,llcsif xi≠yj
generally, llcs can be computed by dynamic programming, which has an o time complexity.
lcs filtering for similar sequence pairs
the length of the lcs of a sequence pair, llcs, equals the number of matches in the sequence alignment that maximizes matches between the two sequences.
suppose the sequence x is longer than or of equal length to y. the sequence identity of a sequence pair equals the number of matches in the alignment that maximizes the alignment score for the two sequences divided by the shorter sequence length n.
from this, the following relationship holds between the length of the lcs and the sequence identity.
llcsn≥sequence identity
this means that the ratio of llcs to the sequence length n equals the upper boundary of the sequence identity of the two sequences.
using this relationship, dissimilar sequence pairs whose sequence identity is less than the threshold s can be pruned by checking whether llcsn is greater than s before computing the sequence identity.
advantages of lcs filtering
first, lcs filtering can be performed with the threshold of sequence identity s as the filtering criterion and does not need new heuristic thresholds.
second, sequence pairs with sequence identity greater than the given threshold s always pass lcs filtering , because llcsn is always larger than the sequence identity.
thus, lcs filtering can be considered a suitable filtering process to follow the short word filter and precede the alignment computation.
fast bit-parallel llcs computation
as described above, using llcs, we can filter similar sequence pairs more accurately than the short word filter.
however, the time complexity of the llcs computation by dynamic programming is o, which is too large.
nevertheless, there are several bit-parallel lcs-length computation algorithms whose time complexity is almost o, which can compute llcs in a reasonable amount of time  <cit> .
we used the most efficient of hyyro's bit-parallel algorithms to reduce the computation time for llcs.
here, bi denotes i repetitions of bit b. with this notation, we can write 1111= <dig> and 0011100= <dig>  additionally, let Σ  be the set of alphabets that appear in x and y, and let σ=Σ be the number of alphabets.
let computepm be defined as in figure  <dig>  where "|" denotes the bitwise or operation.
computepm sets the corresponding positions of bits of pm  for each nucleotide in the sequence x. with this computepm, llcs can be computed as shown in figure  <dig>  in the figure, "&" denotes the bitwise and operation, and + and - denote arithmetic addition and subtraction of integers, respectively.
these operations will require carries and borrows between adjacent bits.
the time complexity of computepm is, oσmw+m and that of llcs is oσmwn, where w is the bit-length of a variable used for storing sequence data.
therefore, we can see that the computation of computepm and llcs is much faster than dynamic programming, and also faster than the alignment computation.
modification of short word filtering
short word filtering is a fast filtering method for finding similar sequence pairs between existing cluster representatives and a query sequence.
it checks for the number of common k-mers  between the two to find a match.
the theory behind this method is that a pair of similar sequences with high sequence identity must have short identical words.
the value k should be decided according to the length of the query sequences and the threshold of sequence identity.
the short word filter is used in cd-hit, but in the proposed method, we use different filtering criteria to accommodate the subsequent lcs filter.
in short word filtering, k-mers in the representatives are indexed in an index table  in advance; thus, cluster representatives with specific k-mers can be filtered quickly.
registering cluster representatives with the short word table
when a new cluster is created, its representative must be registered with the short word table.
first, every kth k-mer of a new cluster representative sequence is enumerated.
next, all the enumerated k-mers are indexed in the short word table and associated with the representative of the cluster that the k-mers belong to.
the short word table is implemented in the form of an index table.
this data structure enables rapid enumeration of cluster representatives that contain a specified k-mer.
in the case of nucleotides, the number of entries in the index table should be at least 4k since there are four dna bases and the number of possible k-mers is 4k.
searching cluster representatives in the short word table
when searching for cluster representatives that have common k-mers with the query sequence, all k-mers in the query sequence must be first enumerated.
then, cluster representatives with those k-mers are searched using the short word table.
if there are t or more common k-mers between the query and a cluster representative, this pair of sequences passes the short word filter as a candidate of similar sequences belonging to the same cluster.
dissimilar sequence pairs, i.e., those with fewer than t common k-mers, are discarded.
the threshold t should be set according to the length of sequences, k, and the threshold of the sequence identity s. in our method, t is set relatively low because our short word filtering only enumerates every kth k-mer of the cluster representatives.
ideally, t should be t′k, where t′ is the threshold used in cd-hit's short word filter.
the characteristics of the modified short word filter
as mentioned above, the short word filter used in our method enumerates every kth k-mer of cluster representatives and all k-mers of the query sequences.
by contrast, cd-hit's short word filter enumerates all the k-mers of the cluster representatives and query sequences.
there are two main advantages of enumerating and registering every kth k-mer instead of all the k-mers.
the first is that the size of the short word table in main memory is reduced to about 1/k.
second, the computation time necessary for searching cluster representatives in the short word table is also reduced because the number of entries decreases to about 1/k.
on the other hand, there are several possible demerits.
our short word filter uses a lower threshold t than that of cd-hit; therefore, it is possible that the number of dissimilar sequence pairs may increase because of coincidental partial matches between sequences.
also, short word filtering fails to find a common k-mer between similar sequences if mismatches and gaps between a cluster representative and the query sequence appear at equal intervals.
however, the first demerit can be addressed by introducing a fast and more accurate filtering process after the short word filter and before the alignment process.
our method uses lcs filtering for this purpose.
the second demerit occurs very rarely, because dna sequences are not random sequences, and it can be considered as a rare case that mismatches and gaps in a sequence pair will appear at equal intervals, even when their sequence identity meets the threshold s.
RESULTS
performance evaluation
we implemented our clustering method in c++ and compared its efficiency and accuracy with those of cd-hit.
for this evaluation, we used two different types of datasets of short reads.
one type comprised artificial datasets, including short reads, generated by the metasim software  <cit>  from the bacillus amyloliquefaciens genome sequence.
the datasets included reads of fixed length.
we used three different patterns of sequence lengths  and three different dataset sizes .
thus, the total number of the datasets was nine.
the other datasets comprised real sequencing data for metagenomic samples obtained by roche's  <dig> and illumina/solexa sequencers.
the  <dig> dataset includes  <dig>  reads of lengths from  <dig> to  <dig> bases, and the illumina dataset includes  <dig> , <dig> reads with lengths from  <dig> to  <dig> bases.
we set the thresholds and parameters as follows: the threshold of sequence identity s was  <dig> , the length of short word k was  <dig>  the thresholds of the number of common k-mers t were  <dig>  and  <dig> .
the setting of each parameter, especially sequence identity s, is highly dependent on the application and it should be determined during the research.
here, we used a value of s that has often been used in previous metagenomic analysis  <cit> .
we ran the clustering programs on a workstation running suse linux  <dig> with a single-core amd opteron processor  and  <dig> gb of memory.
tables  <dig>   <dig>   <dig> show the computation times of the clustering processes for the artificial sequencing datasets.
performance ratios of lcs-hit to cd-hit are shown in parentheses.
these results clearly show that lcs-hit was faster in all cases.
for the dataset with two million dna sequences, our method was approximately  <dig> ,  <dig> , and  <dig>  times faster than cd-hit for  <dig>   <dig>  and  <dig> bases, respectively.
the speed enhancement was large for shorter sequences, whereas longer sequence lengths tended to obtain less improvement with the proposed algorithm.
one of the reasons for this is that the longer are the sequences, the greater is the number of cases where sequence pairs with a sequence identity less than the threshold have an llcsn value larger than the threshold.
this is because there is more opportunity to make an alignment with sufficient matches using many gaps in a longer sequence pair.
thus, both our method and cd-hit suffer the same increases in computational time for increases in sequence length .
this problem might be solved by considering gaps in lcs alignments and compensating the lcs score.
we also applied our method to real sequencing datasets, roche's  <dig> and illumina/solexa reads, as shown in table  <dig>  our method outperformed cd-hit for both datasets, but did especially well for illumina/solexa, probably because of the shorter reads in the illumina/solexa data.
discussion
lcs-hit uses, at most,  <dig>  times more memory than cd-hit; it was about  <dig> gb for five million 400-base sequences.
our method only registers every kth k-mer in the short word table; therefore, the memory required for our short word table is less than that required by cd-hit.
however, the cd-hit program sets an upper boundary for memory usage by the short word table , and can run in this limited memory space.
therefore, overall, cd-hit uses less memory than lcs-hit, even though our method has a smaller short word table.
there is still room for improvement in the memory usage of lcs-hit, and thus it cannot be concluded that our method is inferior in this respect at this point.
in this work, we used a bit-parallel algorithm for calculating the length of lcs.
however, much faster implementations of the lcs calculation have already been proposed.
for instance, chen et al.
proposed an message passing interface -based fast parallel algorithm for finding the longest common sequence  <cit>  and yang et al.
proposed an efficient parallel algorithm on gpus  <cit> .
thus, clustering may be accelerated using these methods.
however, from the profiling of the program, the lcs calculation consumed less than 5% of total computation time, thanks to the bit-parallel algorithm.
therefore, it is difficult to increase the speed of the whole clustering process by accelerating only the lcs calculation.
CONCLUSIONS
we developed the lcs-hit fast clustering algorithm for dna sequence data, which employs a new filtering scheme based on the longest common subsequence .
this filtering scheme allows accurate pruning of dissimilar sequence pairs that are not discarded by short word filtering alone.
thus, it accelerates the clustering process as a whole.
the lcs filter is also effective as a second filter when relaxing the filtering criterion of the short word filter to reduce computation time.
for two million dna sequences, lcs-hit was about  <dig> ,  <dig>  and  <dig>  times faster than cd-hit for  <dig>   <dig>  and  <dig> bases, respectively.
lcs-hit will enable clustering of huge dna datasets that cannot be handled with conventional sequence clustering tools in a reasonable amount of time.
moreover, the filtering technique itself is independent from the cd-hit algorithm.
thus, this technique can be applied to similar clustering algorithms.
competing interests
the authors declare that they have no competing interests.
authors' contributions
yn carried out the study, implemented the method, analysed the results and wrote the manuscript.
ti designed the study, analysed the results and wrote the manuscript.
ya conceived of the study and wrote the manuscript.
all authors read and approved the final manuscript.
declarations
the publication of this research is funded by the hpci strategic program in computational life science and application in drug discovery and medical development by mext of japan.
this research was supported in part by the cancer research development funding by the national cancer center of japan.
this article has been published as part of bmc bioinformatics volume  <dig> supplement  <dig>  2013: proceedings of the  <dig> international conference on intelligent computing .
the full contents of the supplement are available online at http://www.biomedcentral.com/bmcbioinformatics/supplements/14/s <dig>

 clustering is a data mining method that aims to identify similar groups in huge datasets, and is widely used in various bioinformatics fields, such as cancer class discovery and protein structure prediction. biological sequence clustering is one of the main applications of clustering in bioinformatics, and has two main objectives: first, to reduce the size of the dataset by identifying representatives for each cluster and removing redundant sequences; and second, to find sequence patterns that appear in the dataset by checking cluster sizes. recent progress in dna sequencing has enabled us to amass huge amounts of genomic data in a short time. while current sequencers produce relatively short sequences, the number of such sequences is huge. however, the analyses of these vast amounts of data require a considerable amount of time. this necessitates a shift in focus from sequencing throughput to the computational speed of algorithms for sequence data analysis. generally, clustering algorithms require o time for n sequences, making it difficult to scale them to large datasets. several algorithms have been developed for more efficient sequence clustering for very similar sequences; however, it is still difficult to rapidly group remote homologous sequences into a cluster based on sequence identity. for clustering based on sequence identity, cd-hit is one of the most widely used sequence clustering tools. cd-hit is used on public databases such as uniprot and pdb to remove redundant sequences, and has also been used for various bioinformatics analysis, including metagenomic data analysis. it clusters sequences on the basis of sequence identity between pairs, and can deal with large datasets in a relatively short time by relying on an approximate clustering approach and short word filtering. short word filtering greatly decreases the burden of the sequence alignment calculation by identifying similar sequences on the basis of matches between short subsequences. however, although this filtering scheme is very computationally efficient, it is too approximate to exclude many dissimilar sequence pairs. thus, even this well-known tool requires at least days to cluster million sequences. furthermore, given the potential of the next generation of sequencers, it is clear that further speed enhancement is necessary. here, we present a faster and more accurate clustering program named lcs-hit. we introduce a novel filtering technique to select similar sequence pairs on the basis of the longest common subsequence before the sequence alignment process. this approach is much faster than sequence alignment and is stricter than short word filtering. thus, our clustering algorithm is significantly faster than cd-hit without compromising on clustering accuracy. the program and source code of the lcs-hit, which are freely available for download at http://www.bi.cs.titech.ac.jp/lcshit/, are implemented in c++ and are supported on linux with gcc and gnu make. methods algorithm our sequence clustering method consists of several parts, as shown in figure and operates according to the following sequence of steps: let q be the set of sequences to be clustered and r=∅ be the set of existing cluster representatives. for each q∈q, compare q and r by using the short word table, and find the set rq,k, the subset of representatives with ≥t common k-mers with q. for each q and each r∈rq,k, compute the length of the longest common subsequence llcs between q and r. if llcs is above a certain threshold, save the pair as a candidate similar sequence pair that may belong to the same cluster. otherwise, q and r are considered to belong to different clusters. for each saved sequence pair q and r, compute the optimal sequence alignment using affine gap penalties and the sequence identity between q and r. if the sequence identity is greater than or equal to the threshold s, then q and r are considered to belong to the same cluster, and q is added to r's cluster. otherwise, they are considered to belong to different clusters. if q does not belong to any existing cluster, then create a new cluster whose member and representative is q. q is also registered in the short word table, and let r←r∪q. an optimal alignment must be computed when checking whether a pair of sequences belongs to the same cluster. however, the time complexity of computing an optimal alignment is o by dynamic programming, where m and n are the lengths of the two sequences. this is very slow, making it unrealistic to attempt to compute alignments for all combinations of sequences. additionally, the number of sequence pairs with a sequence identity less than the threshold s is much more than the number of similar sequence pairs with a sequence identity above the threshold. thus, our method filters similar sequence pairs by a faster method in advance, and prunes the comparison set of dissimilar pairs. as a result, the number of alignment computations dramatically decreases, and the whole clustering process can be completed in a reasonable length of time. in the following sections, we describe the two filtering methods: short word filtering and the proposed lcs filtering. when a new cluster is created, the first assigned sequence is selected as the representative for its cluster. representatives of existing clusters are not updated, even if new sequences are added to the clusters. this means that the clustering result depends on the order of input sequences, while the computational cost in comparing an input sequence with the cluster representative can be significantly reduced. our clustering method is largely based on cd-hit and retains many similarities. however, there are two main differences; our method employs a new filtering process after short word filtering, and different filtering criteria are used for short word filtering. filtering similar sequence pairs based on the longest common subsequence short word filtering can process large amounts of sequence data in a short time because of the low computational complexity. thus, it is suitable for filtering large sequence datasets. however, the filtering is rough: many dissimilar sequence pairs, i.e., with sequence identity less than the threshold s, pass through the short word filter. thus, the subsequent sequence alignment process will be hampered and the overall computation time for clustering will be prolonged. instead, it is necessary to introduce a fast and accurate filtering process after the rough, short word filtering stage. here, we introduce a new filtering method that relies on the relationship between the length of the lcs and the sequence identity. although the computational cost for determining the lcs is generally not negligible, a bit-parallel algorithm can be used to accelerate its calculation and avoid a bottleneck. the longest common subsequence let a subsequence be created by picking up elements from a main sequence while preserving their relative order. the lcs is the longest common subsequence among all possible common subsequences. for example, "tagc" is the lcs of "atcagtc" and "ctagac." finding the lcs of a sequence pair is equivalent to aligning the two sequences to maximize the number of the matched elements. the length of the longest common subsequence the lcs of two sequences x= and y= can be computed as follows: let xi= and yj=; and let llcs be the length of the lcs between x and y. then, llcs=0if i=0 or j=0llcs+1if xi=yjmaxllcs,llcsif xi≠yj generally, llcs can be computed by dynamic programming, which has an o time complexity. lcs filtering for similar sequence pairs the length of the lcs of a sequence pair, llcs, equals the number of matches in the sequence alignment that maximizes matches between the two sequences. suppose the sequence x is longer than or of equal length to y. the sequence identity of a sequence pair equals the number of matches in the alignment that maximizes the alignment score for the two sequences divided by the shorter sequence length n. from this, the following relationship holds between the length of the lcs and the sequence identity. llcsn≥sequence identity this means that the ratio of llcs to the sequence length n equals the upper boundary of the sequence identity of the two sequences. using this relationship, dissimilar sequence pairs whose sequence identity is less than the threshold s can be pruned by checking whether llcsn is greater than s before computing the sequence identity. advantages of lcs filtering first, lcs filtering can be performed with the threshold of sequence identity s as the filtering criterion and does not need new heuristic thresholds. second, sequence pairs with sequence identity greater than the given threshold s always pass lcs filtering, because llcsn is always larger than the sequence identity. thus, lcs filtering can be considered a suitable filtering process to follow the short word filter and precede the alignment computation. fast bit-parallel llcs computation as described above, using llcs, we can filter similar sequence pairs more accurately than the short word filter. however, the time complexity of the llcs computation by dynamic programming is o, which is too large. nevertheless, there are several bit-parallel lcs-length computation algorithms whose time complexity is almost o, which can compute llcs in a reasonable amount of time. we used the most efficient of hyyro's bit-parallel algorithms to reduce the computation time for llcs. here, bi denotes i repetitions of bit b. with this notation, we can write 1111= and 0011100= additionally, let Σ  be the set of alphabets that appear in x and y, and let σ=Σ be the number of alphabets. let computepm be defined as in figure where "|" denotes the bitwise or operation. computepm sets the corresponding positions of bits of pm for each nucleotide in the sequence x. with this computepm, llcs can be computed as shown in figure in the figure, "&" denotes the bitwise and operation, and + and - denote arithmetic addition and subtraction of integers, respectively. these operations will require carries and borrows between adjacent bits. the time complexity of computepm is, oσmw+m and that of llcs is oσmwn, where w is the bit-length of a variable used for storing sequence data. therefore, we can see that the computation of computepm and llcs is much faster than dynamic programming, and also faster than the alignment computation. modification of short word filtering short word filtering is a fast filtering method for finding similar sequence pairs between existing cluster representatives and a query sequence. it checks for the number of common k-mers between the two to find a match. the theory behind this method is that a pair of similar sequences with high sequence identity must have short identical words. the value k should be decided according to the length of the query sequences and the threshold of sequence identity. the short word filter is used in cd-hit, but in the proposed method, we use different filtering criteria to accommodate the subsequent lcs filter. in short word filtering, k-mers in the representatives are indexed in an index table in advance; thus, cluster representatives with specific k-mers can be filtered quickly. registering cluster representatives with the short word table when a new cluster is created, its representative must be registered with the short word table. first, every kth k-mer of a new cluster representative sequence is enumerated. next, all the enumerated k-mers are indexed in the short word table and associated with the representative of the cluster that the k-mers belong to. the short word table is implemented in the form of an index table. this data structure enables rapid enumeration of cluster representatives that contain a specified k-mer. in the case of nucleotides, the number of entries in the index table should be at least 4k since there are four dna bases and the number of possible k-mers is 4k. searching cluster representatives in the short word table when searching for cluster representatives that have common k-mers with the query sequence, all k-mers in the query sequence must be first enumerated. then, cluster representatives with those k-mers are searched using the short word table. if there are t or more common k-mers between the query and a cluster representative, this pair of sequences passes the short word filter as a candidate of similar sequences belonging to the same cluster. dissimilar sequence pairs, i.e., those with fewer than t common k-mers, are discarded. the threshold t should be set according to the length of sequences, k, and the threshold of the sequence identity s. in our method, t is set relatively low because our short word filtering only enumerates every kth k-mer of the cluster representatives. ideally, t should be t′k, where t′ is the threshold used in cd-hit's short word filter. the characteristics of the modified short word filter as mentioned above, the short word filter used in our method enumerates every kth k-mer of cluster representatives and all k-mers of the query sequences. by contrast, cd-hit's short word filter enumerates all the k-mers of the cluster representatives and query sequences. there are two main advantages of enumerating and registering every kth k-mer instead of all the k-mers. the first is that the size of the short word table in main memory is reduced to about 1/k. second, the computation time necessary for searching cluster representatives in the short word table is also reduced because the number of entries decreases to about 1/k. on the other hand, there are several possible demerits. our short word filter uses a lower threshold t than that of cd-hit; therefore, it is possible that the number of dissimilar sequence pairs may increase because of coincidental partial matches between sequences. also, short word filtering fails to find a common k-mer between similar sequences if mismatches and gaps between a cluster representative and the query sequence appear at equal intervals. however, the first demerit can be addressed by introducing a fast and more accurate filtering process after the short word filter and before the alignment process. our method uses lcs filtering for this purpose. the second demerit occurs very rarely, because dna sequences are not random sequences, and it can be considered as a rare case that mismatches and gaps in a sequence pair will appear at equal intervals, even when their sequence identity meets the threshold s.  performance evaluation we implemented our clustering method in c++ and compared its efficiency and accuracy with those of cd-hit. for this evaluation, we used two different types of datasets of short reads. one type comprised artificial datasets, including short reads, generated by the metasim software from the bacillus amyloliquefaciens genome sequence. the datasets included reads of fixed length. we used three different patterns of sequence lengths and three different dataset sizes. thus, the total number of the datasets was nine. the other datasets comprised real sequencing data for metagenomic samples obtained by roche's and illumina/solexa sequencers. the dataset includes reads of lengths from to bases, and the illumina dataset includes, reads with lengths from to bases. we set the thresholds and parameters as follows: the threshold of sequence identity s was, the length of short word k was the thresholds of the number of common k-mers t were and. the setting of each parameter, especially sequence identity s, is highly dependent on the application and it should be determined during the research. here, we used a value of s that has often been used in previous metagenomic analysis. we ran the clustering programs on a workstation running suse linux with a single-core amd opteron processor and gb of memory. tables show the computation times of the clustering processes for the artificial sequencing datasets. performance ratios of lcs-hit to cd-hit are shown in parentheses. these results clearly show that lcs-hit was faster in all cases. for the dataset with two million dna sequences, our method was approximately,, and times faster than cd-hit for and bases, respectively. the speed enhancement was large for shorter sequences, whereas longer sequence lengths tended to obtain less improvement with the proposed algorithm. one of the reasons for this is that the longer are the sequences, the greater is the number of cases where sequence pairs with a sequence identity less than the threshold have an llcsn value larger than the threshold. this is because there is more opportunity to make an alignment with sufficient matches using many gaps in a longer sequence pair. thus, both our method and cd-hit suffer the same increases in computational time for increases in sequence length. this problem might be solved by considering gaps in lcs alignments and compensating the lcs score. we also applied our method to real sequencing datasets, roche's and illumina/solexa reads, as shown in table our method outperformed cd-hit for both datasets, but did especially well for illumina/solexa, probably because of the shorter reads in the illumina/solexa data. discussion lcs-hit uses, at most, times more memory than cd-hit; it was about gb for five million 400-base sequences. our method only registers every kth k-mer in the short word table; therefore, the memory required for our short word table is less than that required by cd-hit. however, the cd-hit program sets an upper boundary for memory usage by the short word table, and can run in this limited memory space. therefore, overall, cd-hit uses less memory than lcs-hit, even though our method has a smaller short word table. there is still room for improvement in the memory usage of lcs-hit, and thus it cannot be concluded that our method is inferior in this respect at this point. in this work, we used a bit-parallel algorithm for calculating the length of lcs. however, much faster implementations of the lcs calculation have already been proposed. for instance, chen et al. proposed an message passing interface -based fast parallel algorithm for finding the longest common sequence and yang et al. proposed an efficient parallel algorithm on gpus. thus, clustering may be accelerated using these methods. however, from the profiling of the program, the lcs calculation consumed less than 5% of total computation time, thanks to the bit-parallel algorithm. therefore, it is difficult to increase the speed of the whole clustering process by accelerating only the lcs calculation.  we developed the lcs-hit fast clustering algorithm for dna sequence data, which employs a new filtering scheme based on the longest common subsequence. this filtering scheme allows accurate pruning of dissimilar sequence pairs that are not discarded by short word filtering alone. thus, it accelerates the clustering process as a whole. the lcs filter is also effective as a second filter when relaxing the filtering criterion of the short word filter to reduce computation time. for two million dna sequences, lcs-hit was about, and times faster than cd-hit for and bases, respectively. lcs-hit will enable clustering of huge dna datasets that cannot be handled with conventional sequence clustering tools in a reasonable amount of time. moreover, the filtering technique itself is independent from the cd-hit algorithm. thus, this technique can be applied to similar clustering algorithms. competing interests the authors declare that they have no competing interests. authors' contributions yn carried out the study, implemented the method, analysed the results and wrote the manuscript. ti designed the study, analysed the results and wrote the manuscript. ya conceived of the study and wrote the manuscript. all authors read and approved the final manuscript. declarations the publication of this research is funded by the hpci strategic program in computational life science and application in drug discovery and medical development by mext of japan. this research was supported in part by the cancer research development funding by the national cancer center of japan. this article has been published as part of bmc bioinformatics volume supplement 2013: proceedings of the international conference on intelligent computing. the full contents of the supplement are available online at http://www.biomedcentral.com/bmcbioinformatics/supplements/14/s 
the proposed method uses a novel filtering technique based on the longest common subsequence to identify similar sequence pairs. the lcs-hit clustering program, using a novel filtering technique based on the longest common subsequence, is significantly faster than cd-hit without compromising clustering accuracy. 25- july the international conference on intelligent computing huangshan, china moreover, the filtering technique itself is independent from the cd-hit algorithm. for a dataset of two million dna sequences, our method was approximately,, and times faster than cd-hit for and bases, respectively. however, data analysis methods have not kept up, making it difficult to process the vast amounts of available sequence data.
 huge numbers of genomes can now be sequenced rapidly with recent improvements in sequencing throughput. however, data analysis methods have not kept up, making it difficult to process the vast amounts of available sequence data. this increased processing time is especially critical in dna sequence clustering because of the intrinsic difficulty in parallelization. thus, there is a strong demand for a faster clustering algorithm.  we developed a new fast dna sequence clustering method called lcs-hit, based on the popular cd-hit program. the proposed method uses a novel filtering technique based on the longest common subsequence to identify similar sequence pairs. this filtering technique makes the lcs-hit considerably faster than cd-hit, without loss of sensitivity. for a dataset of two million dna sequences, our method was approximately,, and times faster than cd-hit for and bases, respectively.  the lcs-hit clustering program, using a novel filtering technique based on the longest common subsequence, is significantly faster than cd-hit without compromising clustering accuracy. moreover, the filtering technique itself is independent from the cd-hit algorithm. thus, this technique can be applied to similar clustering algorithms. 25- july the international conference on intelligent computing huangshan, china 