getMutatedPositions {tigger} | R Documentation |
Find the location of mutations in a sequence
Description
getMutatedPositions
takes two vectors of aligned sequences and
compares pairs of sequences. It returns a list of the nucleotide positions of
any differences.
Usage
getMutatedPositions(
samples,
germlines,
ignored_regex = "[\\.N-]",
match_instead = FALSE
)
Arguments
samples |
vector of strings respresenting aligned sequences |
germlines |
vector of strings respresenting aligned sequences
to which |
ignored_regex |
regular expression indicating what characters should be ignored (such as gaps and N nucleotides). |
match_instead |
if |
Value
A list of the nucleotide positions of any differences between the input vectors.
Examples
# Create strings to act as a sample sequences and a reference sequence
seqs <- c("----GATA", "GAGAGAGA", "TANA")
ref <- "GATAGATA"
# Find the differences between the two
getMutatedPositions(seqs, ref)
[Package tigger version 1.1.0 Index]