align_sequences {SeqAlignR} | R Documentation |
Sequence Alignment
Description
Performs sequence alignment on two sequences by a user specified alignment method. As of now, only the Needleman-Wunsch algorithm is supported.
Usage
align_sequences(seq1, seq2, d, mismatch, match, method = "needleman")
Arguments
seq1 |
First sequence to align. |
seq2 |
Second sequence to align. |
d |
Gap penalty, should be negative. |
mismatch |
Mismatch penalty, should be negative. |
match |
Match score, should be positive. |
method |
Name of alignment algorithm. Currently only supports "needleman". |
Value
Object of class alignment
representing the alignment result.
This object can be utilized with the plot.alignment
function to visualize
the alignment matrix and the print.alignment
function to display alignments
in the console.
References
For more details on the Needleman-Wunsch algorithm, see the wikipedia page.
Examples
seq1 <- "GCATGCG"
seq2 <- "GATTACA"
# Run the Needleman-Wunsch algorithm
align_sequences(seq1, seq2, d = -1, mismatch = -1, match = 1)
[Package SeqAlignR version 0.1.1 Index]