seqdiffs2seq: Computes a string from a difference encoding

Description Usage Arguments Details

View source: R/RcppExports.R

Description

This takes a difference encoding (position, 1-based index, the type of event (sub, insert, delete), and the base change) and constructs a string based on that difference encoding. All encodings are vectorized. The positions are positions in the Tseq (reference). The events need to be ordered by position then type (mismatches need to be first, really) checks on mutually exclusive events are not made.

Usage

1
seqdiffs2seq(Tseq, positions, types, events, initBuff = -1L)

Arguments

Tseq

(the target sequence; e.g., the reference genome)

positions

(the positions where the sequence differences are, 1 based indexing)

types

(the types of events (0,1,2 for mismatch, deletions and insertions)

events

(the nucleotides involved with the event)

initBuff

(guess as to the final size of the query sequence. Overestimating is better than under)

Details

insertions at position i are assumed to occur between positions i and i+1 insertions prior to the first base are allowed (position ==0)

This was originally designed to work with: ksw2_gg_align_df but that is no longer supported (the indexing of the SNPs has changed)


Ahhgust/MMDIT documentation built on Jan. 27, 2021, 11:48 a.m.