Inspired by concepts from ergodic theory, we give a new approach to coding sequence (CDS) density estimation, focusing on the human genome. Our approach is based on the introduction and study of topological pressure, which assigns a real number to any finite sequence based on an appropriate notion of `weighted information content'. For human DNA sequences, each codon is assigned a suitable weight and we can train these parameters so that the topological pressure and the observed CDS density correlate arbitrarily well. We cross-validate our results to check that we are not overfitting, and use the parameters obtained by training on the human genome for ab initio estimation of CDS density on the genomes of Rhesus Macaque and Mus Musculus. We demonstrate that our predictions compare well with those given by the standard single genome ab initio gene-finding programs. Our method is entirely combinatorial, and extracts information from our training data without reference to any biological model. As such, our method can be adapted for the analysis of any eukaryote. An anticipated application is the identification of gene-rich regions, which is of particular importance to the study of plant genomes. Inspired again by ergodic theory, we use the weightings on the codons to define a probability distribution on finite sequences, which we show to be effective in distinguishing between coding and non-coding human DNA sequences of lengths between 750bp and 5,000bp. At the end of the paper, we explain the theoretical underpinning for our approach, which is the theory of Thermodynamic Formalism from the dynamical systems literature. Mathematica and MATLAB implementations of our method are available at http://sourceforge.net/projects/topologicalpres/.