I used Biopython pairwise2 to globally align two sequences. Is there any tool or algorithm to unify (combine, merge, I don't know the best term for this action) these two sequences based on their global alignment?
"consensus" will be the word you're looking for :)
there is a tool from the EMBOSS package that does exactly this: take a multiple (or pairwise) alginment as input and outputs the consensus from that alignment.
Not sure if there is any Biopython approach to achieve this
Thanks for your response. I knew about EMBOSS and it is included in Biopython, but, the consensus sequence (or canonical sequence) is the calculated order of most frequent residues, either nucleotide or amino acid, found at each position in a sequence alignment. consensus is for multiple alignment. I am looking something suitable for global pairwise alignment. Thank you again.
whether it's global or local alignment that does not make a difference.
Yes, the pairwise <-> MSA will indeed make a difference in the sense that it will not for every position will be able to resolve the 'consensus'. That being said, what kind of behaviour are you looking for than?
alternatively you could 'assemble' those sequences (with an assembly tool) but that will omit the output of the alignment all together.
Login before adding your answer.
Use of this site constitutes acceptance of our User Agreement and Privacy