Refactored sequential K-means for DNA.