between analytical mode and iteratively computed mode. A second approach is both more computationally efficient and arguably more directly compa- rable to the sampling mechanism inherent in SAGE. For convenience, we begin by assuming that the total number of mRNA in the sample is N ∼ P ois ( λ ). Given this mRNA popula- tion size, the vector g of counts of each category of mRNA prior to tag formation follows a multinomial distribution, whose probabilities are the m$_{i}$ and are assumed to follow a Dirichlet distribution with pa- rameter vector α . The joint posterior distribution can now be written as, 18 [ m , g , N | T , α , γ$_{1}$, γ$_{2}$ ] ∝ k ∏ i =1 $^{(}$g$_{i}$ t$_{i}$$^{)}$ φ t$_{i}$ i (1 − φ$_{i}$ ) g$_{i}$ − $_{t$_{i}$}$e − $^{λ}$λN N ! ×$^{(}$ N g$_{1}$, g$_{2}$, . . . , g$_{k}$$^{)}$ m g$_{1}$ + α$_{1}$ − 1 1 m g$_{2}$ + α$_{2}$ − 1 2 , . . . , m g$_{k}$ + α$_{k}$ − 1 k . [ g | α ] ∼ ( N g$_{1}$, g$_{2}$, . . . , g$_{k}$$^{)}$ m g$_{1}$ 1 m g$_{2}$ 2 , . . . , m g$_{k}$ k 4.2 A Dirichlet-Multinomial-Binomial Approach. Algorithm 1: Dirichlet-Poisson-Binomial posterior mode estimation via the Lindley- Smith algorithm // Initialization Set the initial values γ$_{1}$, γ$_{2}$, N , m$_{0}$ , g . // Main loop while $^{∑}$| m new i − m$_{i}$ | > 10 − 5 do m new i = max[ π ( m$_{i}$ | t$_{i}$, g$_{i}$, N, φ , α , γ$_{1}$, γ$_{2}$ ] = ( g$_{i}$ + α ) / ( N ) g new i = max[ π ( g$_{i}$ | T , m , N, φ , α , γ$_{1}$, γ$_{2}$ ] = t$_{i}$ + floor( Nm$_{i}$ (1 − φ$_{i}$ )) N new = max[ π ( N | T , g , m , φ , α , γ$_{1}$, γ$_{2}$ ] = ( $^{∑}$g$_{i}$ + γ$_{1}$ ) / (1 + γ$_{2}$ ) end