Improvement of base-calling by using Partitioning and Re-sampling (PnR) technique. For an observed base (shaded boxes), VarDetect divides a chromatogram peak into four equal parts (partitions) and focuses at the two middle parts (a). The two vectors and are created by connecting the points that the curve segment of the secondary peak crosses over the two partitions (b). Let ⊥ be a perpendicular vector of by rotating it 90 counter-clockwise (c). Then the secondary peak curve has a turning point if the dot product of ⊥· produces a negative value. In other words, if the angle θ between and ⊥ is obtuse, this secondary peak could be interpreted as being heterozygous peak (d).