Return the number of repeat units in which an insertion is embedded.
FindMaxRepeatIns(context, rep.unit.seq, pos)A string into which rep.unit.seq was
inserted at position pos.
The inserted sequence and candidate repeat unit sequence.
rep.unit.seq is understood to be inserted between
positions pos and pos + 1.
If same sequence as rep.unit.seq occurs ending at
pos or starting at pos + 1 then the number of
repeat units before the insertion, otherwise 0.
For example
rep.unit.seq = ac pos = 2 context = xyaczt return 1
rep.unit.seq = ac pos = 4 context = xyaczt return 1
rep.unit.seq = cgct pos = 2 rep.unit.seq = at return 0
context = gacacacacg rep.unit.seq = ac pos = any of 1, 3, 5, 7, 9 return 4
If
substr(context, pos, pos + nchar(rep.unit.seq) - 1) != rep.unit.seq,
then stop.