JAL-845 tweaks and bug fixes for split frame view
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 16 Mar 2015 17:34:58 +0000 (17:34 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 16 Mar 2015 17:34:58 +0000 (17:34 +0000)
src/jalview/analysis/AlignmentUtils.java
src/jalview/gui/AlignFrame.java
src/jalview/gui/AlignViewport.java
src/jalview/gui/SequenceFetcher.java

index 988f2d1..337372d 100644 (file)
@@ -452,6 +452,9 @@ public class AlignmentUtils
       if (translated == null
               || !(aaRes == translated.charAt(0)))
       {
+        // debug
+        System.out.println(("Mismatch at " + i + "/" + aaResidue + ": "
+                + codon + "(" + translated + ") != " + aaRes));
         return false;
       }
     }
index 4dc064d..5cc48fd 100644 (file)
@@ -4796,8 +4796,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
             boolean asSplitFrame = true;
             if (asSplitFrame)
             {
-              final Alignment copyAlignment = new Alignment(
-                      AlignFrame.this.viewport.getAlignment());
+              final Alignment copyAlignment = new Alignment(new Alignment(
+                      AlignFrame.this.viewport.getSequenceSelection()));
               AlignFrame copyThis = new AlignFrame(copyAlignment,
                       AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT);
               copyThis.setTitle(AlignFrame.this.getTitle());
index 289a0ea..405782d 100644 (file)
@@ -1095,7 +1095,6 @@ public class AlignViewport extends AlignmentViewport implements
             : copyMe;
     AlignmentI protein = proteinFrame.viewport.getAlignment();
     protein.setCodonFrames(mappings);
-    proteinFrame.viewport.initComplementConsensus();
 
     cdnaFrame.setVisible(true);
     proteinFrame.setVisible(true);
index 6c5d09a..72a7167 100755 (executable)
@@ -792,6 +792,10 @@ public class SequenceFetcher extends JPanel implements Runnable
 
     if (al != null && al.getHeight() > 0)
     {
+      if (title == null)
+      {
+        title = getDefaultRetrievalTitle();
+      }
       if (alignFrame == null)
       {
         AlignFrame af = new AlignFrame(al, AlignFrame.DEFAULT_WIDTH,
@@ -804,10 +808,6 @@ public class SequenceFetcher extends JPanel implements Runnable
           // Alignments?
         }
 
-        if (title == null)
-        {
-          title = getDefaultRetrievalTitle();
-        }
         SequenceFeature[] sfs = null;
         List<SequenceI> alsqs;
         synchronized (alsqs = al.getSequences())