Learn R Programming

CrispRVariants (version 1.0.2)

seqsToAln: Creates a text alignment from a set of cigar strings

Description

Creates a one-to-one text alignment of a set of cigar strings with respect to the reference sequence by collapsing insertions and introducing gaps across deletions.

When genomic coordinates for the alignment start and the target region are provided, aligned sequences are cropped to the target region

Usage

seqsToAln(cigar, dnaseq, target, del_char = "-", aln_start = NULL)

Arguments

cigar
A list of cigar strings to align
dnaseq
The set of sequences corresponding to the cigars, as Biostrings::DNAStrings
target
The target region to return, as GRanges. Sequences overlapping the target region are trimmed to exactly match it.
del_char
The character to represent deleted bases. Default "-"
aln_start
Genomic start locations of aligned sequences. Should be used in conjunction with target_start and target_end.

Value

The sequences with insertions collapsed and deletions padded