SeqAlignR {SeqAlignR} | R Documentation |
Sequence Alignment Tool
Description
Sequence alignment and visualization tool designed to enhance understanding of sequence alignment algorithms, such as the Needleman-Wunsch algorithm. Through detailed matrix plot visualizations with arrows illustrating the path of different alignments, users can gain insights into how these algorithms score and identify optimal alignments between two sequences.
Getting started
Install the SeqAlignR package from CRAN using:
install.packages("SeqAlignR")
Load the SeqAlignR package into your R session:
library(SeqAlignR)
Explore the documentation for
align_sequences
or see the example below:?align_sequences
Author(s)
Leonard Persson Norblad leonard.norblad@gmail.com (ORCID)
References
The graphics in the package were inspired by this code by Kamil Slowikowski (ORCID).
Examples
seq1 <- "GCATGCG"
seq2 <- "GATTACA"
# Run the Needleman-Wunsch algorithm
alignment1 <- align_sequences(seq1, seq2, d = -1, mismatch = -1, match = 1, method="needleman")
# Print the alignments
print(alignment1)
# Plot the matrix
plot(alignment1)
[Package SeqAlignR version 0.1.1 Index]