Only 4 or more sequences allowed for PCA
authoramwaterhouse <Andrew Waterhouse>
Thu, 4 Nov 2004 17:58:04 +0000 (17:58 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 4 Nov 2004 17:58:04 +0000 (17:58 +0000)
src/jalview/gui/PCAPanel.java

index 97df517..7875567 100755 (executable)
@@ -23,6 +23,14 @@ public class PCAPanel extends GPCAPanel implements Runnable
   public PCAPanel(AlignViewport av, SequenceI[] s) {\r
 \r
     this.av = av;\r
+    if(av.getSelection().size()>3)\r
+    {\r
+      s = new Sequence[av.getSelection().size()];\r
+      for(int i=0; i<s.length; i++)\r
+        s[i] = av.getSelection().sequenceAt(i);\r
+    }\r
+\r
+\r
     if(s==null)\r
     {\r
       s = new Sequence[av.getAlignment().getHeight()];\r