X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FPCAPanel.java;h=e3959eaef7c091d7ea3461b4ae989ec5e7effed4;hb=a81cd4fa55b7cade14dc0ee9a0875c63e96d3f44;hp=eec9b6dd7eb26f9fe581251c357967319ff673a6;hpb=d3ad666c751eead380676d1c6bf08f7e66f70628;p=jalview.git diff --git a/src/jalview/gui/PCAPanel.java b/src/jalview/gui/PCAPanel.java index eec9b6d..e3959ea 100755 --- a/src/jalview/gui/PCAPanel.java +++ b/src/jalview/gui/PCAPanel.java @@ -54,7 +54,7 @@ public class PCAPanel extends GPCAPanel implements Runnable /** * use the identity matrix for calculating similarity between sequences. */ - private boolean useidentity=false; + private boolean nucleotide=false; /** * Creates a new PCAPanel object. @@ -72,7 +72,7 @@ public class PCAPanel extends GPCAPanel implements Runnable boolean sameLength = true; seqstrings = av.getAlignmentView(av.getSelectionGroup() != null); - useidentity=av.getAlignment().isNucleotide(); + nucleotide=av.getAlignment().isNucleotide(); if (av.getSelectionGroup() == null) { seqs = av.alignment.getSequencesArray(); @@ -136,7 +136,7 @@ public class PCAPanel extends GPCAPanel implements Runnable try { calcSettings.setEnabled(false); - pca = new PCA(seqstrings.getSequenceStrings(' '), useidentity); + pca = new PCA(seqstrings.getSequenceStrings(' '), nucleotide); pca.run(); // Now find the component coordinates @@ -177,6 +177,8 @@ public class PCAPanel extends GPCAPanel implements Runnable rc.repaint(); addKeyListener(rc); + nuclSetting.setSelected(nucleotide); + protSetting.setSelected(!nucleotide); } catch (OutOfMemoryError er) { @@ -188,14 +190,14 @@ public class PCAPanel extends GPCAPanel implements Runnable @Override protected void nuclSetting_actionPerfomed(ActionEvent arg0) { - useidentity=true; + nucleotide=true; Thread worker = new Thread(this); worker.start(); } @Override protected void protSetting_actionPerfomed(ActionEvent arg0) { - useidentity=false; + nucleotide=false; Thread worker = new Thread(this); worker.start(); }