A method to evaluate the relative weights of structural and functional constraints on a genome