I used the following R program for pairwise sequence alignment. My data set contains 90 protein sequences. I would like to do pairwise sequence alignment with each pair of sequences.
library("seqinr") seq1<- read.fasta(file = " first.fasta") seq2<- read.fasta(file = " second.fasta") seq1string <- toupper(c2s(seq1[])) seq2string <- toupper(c2s(seq2 [])) library(Biostrings) globalAlign<- pairwiseAlignment(seq1string, seq2string) globalAlign pid(globalAlign, type = "PID3")
file second.fasta is my dataset. first.fasta file contains first sequence . Using this program I am doing pairwise sequence alignment with first sequence and second sequence.Next, I have to do alignment with first and third sequence. first and 4th sequence etc upto 90. What all changes do I have to make in my program for visualizing the alignment of each pair of sequences?