From 12e8a8c0dd1af827d42b281adf598db6fcdda76e Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Thu, 16 Feb 2006 17:30:04 +0000 Subject: [PATCH] translate cDNA adjusted --- src/jalview/gui/AlignFrame.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index a70adfc..35ac570 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -179,13 +179,8 @@ public class AlignFrame conservationMenuItem.setVisible( !nucleotide ); modifyConservation.setVisible( !nucleotide ); - //Deal with separators //Remember AlignFrame always starts as protein - if(nucleotide) - { - viewMenu.remove(viewMenu.getItemCount()-2); - } - else + if(!nucleotide) { calculateMenu.remove(calculateMenu.getItemCount()-2); } @@ -2448,6 +2443,8 @@ public void showTranslation_actionPerformed(ActionEvent e) protein = new StringBuffer(); seq = AlignSeq.extractGaps("-. ", viewport.alignment.getSequenceAt(s).getSequence()); resSize = seq.length(); + resSize -= resSize%3; + for(res = 0; res < resSize; res+=3) { String codon = seq.substring(res, res+3); -- 1.7.10.2