FindMaxRepeatIns: Return the number of repeat units in which an insertion is...

View source: R/ID_functions.R

FindMaxRepeatInsR Documentation

Return the number of repeat units in which an insertion is embedded.

Description

Return the number of repeat units in which an insertion is embedded.

Usage

FindMaxRepeatIns(context, rep.unit.seq, pos)

Arguments

context

A string into which rep.unit.seq was inserted at position pos.

rep.unit.seq

The inserted sequence and candidate repeat unit sequence.

pos

rep.unit.seq is understood to be inserted between positions pos and pos + 1.

Details

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.

Value

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.


ICAMS documentation built on June 22, 2024, 6:47 p.m.