nCopiesAlongFlank: Calculate the number of copies of the indel sequence are...

View source: R/detHomology.R

nCopiesAlongFlankR Documentation

Calculate the number of copies of the indel sequence are present in the flank sequence

Description

Helper function for extractSigsIndel(). Scans along the flanking sequence for copies of the indel sequence using a sliding window with a length equal to the length of the indel sequence. The sliding window jumps in increments equal to the indel length. Scanning stops prematurely when the indel sequence does not match the one in the sliding window. The indel sequence itself counts as one copy.

Scanning needs only to be done from the 5' -> 3' direction as the reported POS of an indel in a repeat region is always the first position of the repeat region.

Usage

nCopiesAlongFlank(indel.seq, flank.seq)

Arguments

indel.seq

The indel sequence as a character

flank.seq

The flanking sequence as a character

Value

An integer stating the number of copies found in the flanking sequence


UMCUGenetics/mutSigExtractor documentation built on Aug. 30, 2024, 2:12 p.m.