getEvents: Transform aligned strings into GRanges representation of...

View source: R/helpers_general.R

getEventsR Documentation

Transform aligned strings into GRanges representation of events.

Description

Transforms aligned strings into GRanges representation with events of deletions, insertions and mismatches. Subject should come from one amplicon sequence, after alignment to many sequences (patterns).

Usage

getEvents(
  pattern,
  subject,
  scores,
  ID = "NA",
  ampl_shift = 1L,
  ampl_start = 1L,
  strand_info = "+"
)

Arguments

pattern

(character) Aligned pattern.

subject

(character) Aligned subject.

scores

(integer) Alignment scores of the pattern and subject.

ID

(character) Will be used as seqnames of output GRanges.

ampl_shift

(numeric) Possible shift of the amplicons.

ampl_start

(numeric) Real amplicon starts. pairwiseAlignment clips alignments, therefore to output GRanges relative to the amplicon sequence (subject) ranges have to be shifted.

strand_info

(character) Strands to assign.

Value

(GRanges) Same as events.


valenlab/amplican documentation built on Jan. 28, 2024, 5:10 a.m.