Description of the scanning step in A-GLAM. The figures indicate the regulatory elements with rectangular boxes. The box colors indicate the strength of the corresponding match to A-GLAM's PSSM: strong (black), moderate (striped), or weak (white). A downward arrow-tip above a box indicates that the corresponding regulatory element contributes to A-GLAM's PSSM. The top figure shows that after the Gibbs sampling step, A-GLAM predicts at most one instance of a regulatory motif per sequence. The middle figure shows that after the Gibbs sampling step, the corresponding PSSM can sweep through the sequences to predict additional instances of the regulatory motif, i.e., the instances receiving an E-value less than a (user-defined) threshold E0 now receive arrow-tips. The bottom figure shows that the previous step can be iterated, by permitting the additional motif instances to contribute to A-GLAM's PSSM, which then can sweep through the sequences once again to predict additional motif instances, indicated by new arrow-tips. The process is iterated to convergence (i.e., no new motif instances are found) or up to a (user-specified) number of iterations, whichever comes first.