Biostrings "global" alignment does NOT return a global alignment
Entering edit mode
map2085 ▴ 40
Last seen 3.4 years ago
United States

The pairwiseAlignment  function of BioStrings claims to return a global alignment if type = "global", but nowhere in the documentation does it say that it trims off the ends of the reported alignment if their are gaps on one side, and thus returns a local alignment of the two sequences.  This is a brazen contradiction of the term "global".  It also wasted the past several hours of my life trying to track down this bizarre undocumented misuse of the term "global".



algmt  <-  pairwiseAlignment( s1, s2 , type = "global")



Neither pattern(algmt)  nor   aligned(pattern(algmt))   return the global alignment of the two sequences if there are gaps on either/both ends.

This glaring issue has been raised and acknowledged in several previous posts:


obtaining a complete global alignment via pairwiseAlignment

unexpected behaviour of pairwiseAlignment() in Biostrings

unexpected behaviour of pairwiseAlignment() in Biostrings


Why is there not a fix yet?   Why is there not a special function or flag that simply returns the true global alignment?  Why is this surprise behavior not even mentioned in the documentation over 6 years after it was first reported?

Printing to file with "writePairwiseAlignments" is not helpful if you need these sequences in R, i.e. you want to do further work with these alignments.


biostrings alignment • 656 views

Login before adding your answer.

Traffic: 333 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6