title: repgenHMM: a dynamic programming tool to infer the rules of immune receptor generation from sequence data.
abstract: The diversity of the immune repertoire is initially generated by random rearrangements of the receptor gene during early T and B cell development. Rearrangement scenarios are composed of random events-choices of gene templates, base pair deletions and insertions-described by probability distributions. Not all scenarios are equally likely, and the same receptor sequence may be obtained in several different ways. Quantifying the distribution of these rearrangements is an essential baseline for studying the immune system diversity. Inferring the properties of the distributions from receptor sequences is a computationally hard problem, requiring enumerating every possible scenario for every sampled receptor sequence.
  
  
  
  We present a Hidden Markov model, which accounts for all plausible scenarios that can generate the receptor sequences. We developed and implemented a method based on the Baum-Welch algorithm that can efficiently infer the parameters for the different events of the rearrangement process. We tested our software tool on sequence data for both the alpha and beta chains of the T cell receptor. To test the validity of our algorithm, we also generated synthetic sequences produced by a known model, and confirmed that its parameters could be accurately inferred back from the sequences. The inferred model can be used to generate synthetic sequences, to calculate the probability of generation of any receptor sequence, as well as the theoretical diversity of the repertoire. We estimate this diversity to be [Formula: see text] for human T cells. The model gives a baseline to investigate the selection and dynamics of immune repertoires.
  
  
  
  Source code and sample sequence files are available at https://bitbucket.org/yuvalel/repgenhmm/downloads
  
  
  
  elhanati@lpt.ens.fr or tmora@lps.ens.fr or awalczak@lpt.ens.fr.
authors.affiliation: Laboratoire de physique théorique, CNRS, UPMC and Ecole normale supérieure, Paris, France.
authors.forename: Yuval
authors.initials: Y
authors.lastname: Elhanati
authors.affiliation: Laboratoire de physique théorique, CNRS, UPMC and Ecole normale supérieure, Paris, France.
authors.forename: Quentin
authors.initials: Q
authors.lastname: Marcou
authors.affiliation: Laboratoire de physique statistique, CNRS, UPMC and Ecole normale supérieure, Paris, France.
authors.forename: Thierry
authors.initials: T
authors.lastname: Mora
authors.affiliation: Laboratoire de physique théorique, CNRS, UPMC and Ecole normale supérieure, Paris, France.
authors.forename: Aleksandra M
authors.initials: AM
authors.lastname: Walczak
mesh_terms: D000465:Algorithms; D015329:Gene Rearrangement, T-Lymphocyte; D006801:Humans; D011336:Probability; D011948:Receptors, Antigen, T-Cell / Q000235:genetics*; D016415:Sequence Alignment; D012984:Software; D060152:V(D)J Recombination
chemical_list: D011948:Receptors, Antigen, T-Cell