A computational framework for Bayesian estimation of antigen-driven selection in immunoglobulin sequences based on the analysis of somatic mutation patterns. BASELINe represents a fundamental advance over previous methods by shifting the problem from one of simply detecting selection to one of quantifying selection. Along with providing a more intuitive means to assess and visualize selection, BASELINe allows comparative analysis between groups of sequences derived from different germline V(D)J segments.