Diversity and evolution of ecosystems: From genomes to the biosphere