I am trying to get the pairwise sequence alignment with biopython. I tried the following code as example.This code is only for two sequences. My data set contains 300 sequences.I have to get pairwise sequence alignment for each sequence. That is alignment between first and second sequence, first and third sequence,---------etc up to last sequence.How can I rearrange this code? Is it possible with pairwise2 module or any other module available in Biopython.
from Bio import pairwise2 from Bio.SubsMat import MatrixInfo as matlist matrix = matlist.blosum62 gap_open = -10 gap_extend = -0.5 p53_human = "MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGP" p53_mouse = "MEESQSDISLELPLSQETFSGLWKLLPPEDILPSPHCMDDLLLPQDVEEFFEGPSEALRV" alns = pairwise2.align.globalds(p53_human, p53_mouse, matrix, gap_open, gap_extend) top_aln = alns aln_human, aln_mouse, score, begin, end = top_aln print aln_human+'\n'+aln_mouse