From: gmungoc Date: Fri, 7 Apr 2017 13:27:45 +0000 (+0100) Subject: JAL-2393 code tidying for review comments X-Git-Tag: Release_2_10_2~3^2~105^2~2^2~31 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=bdff041b485dae497cfa699bb536e3e79105527b;p=jalview.git JAL-2393 code tidying for review comments --- diff --git a/src/jalview/analysis/AlignSeq.java b/src/jalview/analysis/AlignSeq.java index 6bf812c..07f43da 100755 --- a/src/jalview/analysis/AlignSeq.java +++ b/src/jalview/analysis/AlignSeq.java @@ -116,7 +116,7 @@ public class AlignSeq String type; // AlignSeq.PEP or AlignSeq.DNA - private ScoreMatrix scoreModel; + private ScoreMatrix scoreMatrix; private static final int GAP_INDEX = -1; @@ -343,7 +343,7 @@ public class AlignSeq } type = moleculeType; - scoreModel = ScoreModels.getInstance().getDefaultModel( + scoreMatrix = ScoreModels.getInstance().getDefaultModel( PEP.equals(type)); } @@ -589,7 +589,7 @@ public class AlignSeq { int t = 0; // float pairwiseScore = lookup[seq1[i]][seq2[j]]; - float pairwiseScore = scoreModel.getPairwiseScore(s1str.charAt(i), + float pairwiseScore = scoreMatrix.getPairwiseScore(s1str.charAt(i), s2str.charAt(j)); float max = score[i - 1][j - 1] + (pairwiseScore * 10); @@ -635,7 +635,7 @@ public class AlignSeq int m = seq2.length; // top left hand element - score[0][0] = scoreModel.getPairwiseScore(s1str.charAt(0), + score[0][0] = scoreMatrix.getPairwiseScore(s1str.charAt(0), s2str.charAt(0)) * 10; E[0][0] = -gapExtend; F[0][0] = 0; @@ -647,7 +647,7 @@ public class AlignSeq E[0][j] = max(score[0][j - 1] - gapOpen, E[0][j - 1] - gapExtend); F[0][j] = -gapExtend; - float pairwiseScore = scoreModel.getPairwiseScore(s1str.charAt(0), + float pairwiseScore = scoreMatrix.getPairwiseScore(s1str.charAt(0), s2str.charAt(j)); score[0][j] = max(pairwiseScore * 10, -gapOpen, -gapExtend); @@ -660,7 +660,7 @@ public class AlignSeq E[i][0] = -gapOpen; F[i][0] = max(score[i - 1][0] - gapOpen, F[i - 1][0] - gapExtend); - float pairwiseScore = scoreModel.getPairwiseScore(s1str.charAt(i), + float pairwiseScore = scoreMatrix.getPairwiseScore(s1str.charAt(i), s2str.charAt(0)); score[i][0] = max(pairwiseScore * 10, E[i][0], F[i][0]); traceback[i][0] = -1; @@ -674,7 +674,7 @@ public class AlignSeq E[i][j] = max(score[i][j - 1] - gapOpen, E[i][j - 1] - gapExtend); F[i][j] = max(score[i - 1][j] - gapOpen, F[i - 1][j] - gapExtend); - float pairwiseScore = scoreModel.getPairwiseScore(s1str.charAt(i), + float pairwiseScore = scoreMatrix.getPairwiseScore(s1str.charAt(i), s2str.charAt(j)); score[i][j] = max(score[i - 1][j - 1] + (pairwiseScore * 10), E[i][j], F[i][j]); @@ -776,7 +776,7 @@ public class AlignSeq for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); - encoded[i] = scoreModel.getMatrixIndex(c); + encoded[i] = scoreMatrix.getMatrixIndex(c); } return encoded; diff --git a/src/jalview/gui/PCAPanel.java b/src/jalview/gui/PCAPanel.java index 885c3bf..f75c756 100644 --- a/src/jalview/gui/PCAPanel.java +++ b/src/jalview/gui/PCAPanel.java @@ -273,7 +273,6 @@ public class PCAPanel extends GPCAPanel implements Runnable, // rc.invalidate(); nuclSetting.setSelected(pcaModel.isNucleotide()); protSetting.setSelected(!pcaModel.isNucleotide()); - jvVersionSetting.setSelected(pcaModel.isJvCalcMode()); top = pcaModel.getTop(); } catch (OutOfMemoryError er) @@ -322,14 +321,6 @@ public class PCAPanel extends GPCAPanel implements Runnable, } } - @Override - protected void jvVersionSetting_actionPerfomed(ActionEvent arg0) - { - pcaModel.setJvCalcMode(jvVersionSetting.isSelected()); - Thread worker = new Thread(this); - worker.start(); - } - /** * DOCUMENT ME! */ diff --git a/src/jalview/jbgui/GPCAPanel.java b/src/jalview/jbgui/GPCAPanel.java index 24961c0..3715acc 100755 --- a/src/jalview/jbgui/GPCAPanel.java +++ b/src/jalview/jbgui/GPCAPanel.java @@ -66,8 +66,6 @@ public class GPCAPanel extends JInternalFrame protected JCheckBoxMenuItem protSetting = new JCheckBoxMenuItem(); - protected JCheckBoxMenuItem jvVersionSetting = new JCheckBoxMenuItem(); - protected JLabel statusBar = new JLabel(); protected JPanel statusPanel = new JPanel(); @@ -299,17 +297,7 @@ public class GPCAPanel extends JInternalFrame protSetting_actionPerfomed(arg0); } }); - jvVersionSetting.setText(MessageManager - .getString("label.jalview_pca_calculation")); - jvVersionSetting.addActionListener(new ActionListener() - { - @Override - public void actionPerformed(ActionEvent arg0) - { - jvVersionSetting_actionPerfomed(arg0); - } - }); - // calcSettings.add(jvVersionSetting); // todo remove? JAL-2416 + calcSettings.add(nuclSetting); calcSettings.add(protSetting); calcSettings.add(scoreModelMenu); @@ -435,10 +423,4 @@ public class GPCAPanel extends JInternalFrame { } - - protected void jvVersionSetting_actionPerfomed(ActionEvent arg0) - { - // TODO Auto-generated method stub - - } }