Genome evolution in structured systems