Comparative genomics compares the genomes of different species to identify conserved regions, including genes. By analyzing the similarities and differences between genomes, comparative genomics helps predict gene locations and infer gene functions.