  To recognize pathogens, B and T lymphocytes are endowed with a wide
repertoire of receptors generated stochastically by V(D)J recombination.
Measuring and estimating the diversity of these receptors is of great
importance for understanding adaptive immunity. In this chapter we review
recent modeling approaches for analyzing receptor diversity from
high-throughput sequencing data. We first clarify the various existing notions
of diversity, with its many competing mathematical indices, and the different
biological levels at which it can be evaluated. We then describe inference
methods for characterizing the statistical diversity of receptors at different
stages of their history: generation, selection and somatic evolution. We
discuss the intrinsic difficulty of estimating the diversity of receptors
realized in a given individual from incomplete samples. Finally, we emphasize
the limitations of diversity defined at the level of receptor sequences, and
advocate the more relevant notion of functional diversity relative to the set
of recognized antigens.
