Detection and Analysis of Functional Specialization in Duplicated Genes