A novel hierarchical clustering algorithm for gene sequences