powered by
Prints the alignments between seq1 and seq2 with the highest score.
seq1
seq2
# S3 method for alignment print(x, ...)
Console print of alignments.
Object of class alignment (see align_sequences).
alignment
align_sequences
Additional parameters to be passed to the cat() function, displaying the alignment.
cat()
The printed message includes the alignment score. This function may display multiple alignments, as alignments with the same score are possible.
seq1 <- "GCATGCG" seq2 <- "GATTACA" # Run the Needleman-Wunsch algorithm alignment1 <- align_sequences(seq1, seq2, d = -1, mismatch = -1, match = 1) # Print the alignments print(alignment1)
Run the code above in your browser using DataLab