SequenceI [] seqs;\r
\r
\r
- public PCAPanel(AlignViewport av, SequenceI[] s)\r
+ public PCAPanel(AlignViewport av)\r
{\r
\r
this.av = av;\r
- if (av.getSelectionGroup().getSize() > 3)\r
+ if (av.getSelectionGroup()!=null && av.getSelectionGroup().getSize() > 3)\r
{\r
seqs = new Sequence[av.getSelectionGroup().getSize()];\r
- for (int i = 0; i < s.length; i++)\r
+ for (int i = 0; i < av.getSelectionGroup().getSize(); i++)\r
{\r
seqs[i] = av.getSelectionGroup().getSequenceAt(i);\r
}\r
}\r
-\r
- if (seqs == null)\r
+ else\r
{\r
seqs = new Sequence[av.getAlignment().getHeight()];\r
for (int i = 0; i < av.getAlignment().getHeight(); i++)\r