Genomes on a tree