Genomic evidence for adaptation by gene duplication