Functional profiling of cyanobacterial genomes and its role in ecological adaptations