Bayesian methods using genomic data to gain insights into the history of photosynthesis