String type; // AlignSeq.PEP or AlignSeq.DNA
- private ScoreMatrix scoreModel;
+ private ScoreMatrix scoreMatrix;
private static final int GAP_INDEX = -1;
}
type = moleculeType;
- scoreModel = ScoreModels.getInstance().getDefaultModel(
+ scoreMatrix = ScoreModels.getInstance().getDefaultModel(
PEP.equals(type));
}
{
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);
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;
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);
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;
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]);
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;
// rc.invalidate();
nuclSetting.setSelected(pcaModel.isNucleotide());
protSetting.setSelected(!pcaModel.isNucleotide());
- jvVersionSetting.setSelected(pcaModel.isJvCalcMode());
top = pcaModel.getTop();
} catch (OutOfMemoryError er)
}
}
- @Override
- protected void jvVersionSetting_actionPerfomed(ActionEvent arg0)
- {
- pcaModel.setJvCalcMode(jvVersionSetting.isSelected());
- Thread worker = new Thread(this);
- worker.start();
- }
-
/**
* DOCUMENT ME!
*/
protected JCheckBoxMenuItem protSetting = new JCheckBoxMenuItem();
- protected JCheckBoxMenuItem jvVersionSetting = new JCheckBoxMenuItem();
-
protected JLabel statusBar = new JLabel();
protected JPanel statusPanel = new JPanel();
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);
{
}
-
- protected void jvVersionSetting_actionPerfomed(ActionEvent arg0)
- {
- // TODO Auto-generated method stub
-
- }
}