JAL-4366 fix reconstruction of peptide alignment...
authorJames Procter <j.procter@dundee.ac.uk>
Thu, 11 Jan 2024 17:17:15 +0000 (17:17 +0000)
committerJames Procter <j.procter@dundee.ac.uk>
Thu, 11 Jan 2024 17:17:15 +0000 (17:17 +0000)
src/jalview/datamodel/Alignment.java

index 73ccdc5..6532a2d 100755 (executable)
@@ -1830,7 +1830,13 @@ public class Alignment implements AlignmentI, AutoCloseable
     {
       return AlignmentUtils.alignCdsAsProtein(this, al);
     }
-    return AlignmentUtils.alignAs(this, al);
+    else if (thatIsProtein && !thisIsNucleotide)
+    {
+       // honour sense we were called - align this according to al 
+       return AlignmentUtils.alignAs(this, al);
+    }
+    // otherwise doing a DNA to DNA alignment - so use legacy obverse sense
+    return AlignmentUtils.alignAs(al, this);    
   }
 
   /**