Skip to main content
Fig. 6 | Algorithms for Molecular Biology

Fig. 6

From: Bayesian localization of CNV candidates in WGS data within minutes

Fig. 6

A small three-step example of recording marginal counts using Algorithm 4. Starting at position \(t = 0\), 7 observations of state 5 are inserted. In the count queue, black boxes indicate that state counts of zero have been skipped; those numbers encode the next higher state that has a non-zero count. White boxes indicate the counts for the state. For instance, the right-most part of the count queue in the top subfigure is stored as \((0, -1, -2, 4, -7)\), indicating that there is 1 count for state 0, 2 counts for state 1, and 7 counts for state 4. The segment starts at position \(t=9\), and has a length of 1. Note that 0 is used to mark the start of a new segment. Each segment has a total of 10 counts already recorded. Arrows indicate contiguous elements in the count queue. With every iteration, a segment is moved to the back with the new state count included. Note that in the last iteration, the segment \(t=6, \dots , 8\) is split. After finishing this step, the next count would be recorded starting at position \(t=7\). Notice how each run of zeros in the state queue is represented by a single number, thus allowing for arbitrarily large state indices without much overhead

Back to article page