import jalview.datamodel.AlignmentI;
import jalview.datamodel.AlignmentView;
import jalview.datamodel.ColumnSelection;
-import jalview.datamodel.SeqCigar;
import jalview.datamodel.SequenceI;
import jalview.jbgui.GPCAPanel;
import jalview.util.MessageManager;
seqs = av.getSelectionGroup().getSequencesInOrder(av.getAlignment());
}
- // TODO can we allow PCA on unaligned data given choice of
- // similarity measure parameters?
- if (!checkAligned(seqstrings))
- {
- JvOptionPane.showMessageDialog(Desktop.desktop,
- MessageManager.getString("label.pca_sequences_not_aligned"),
- MessageManager.getString("label.sequences_not_aligned"),
- JvOptionPane.WARNING_MESSAGE);
-
- return;
- }
-
pcaModel = new PCAModel(seqstrings, seqs, nucleotide, scoreModel,
params);
PaintRefresher.Register(this, av.getSequenceSetId());
}
/**
- * Answers true if all sequences have the same aligned length, else false
- *
- * @param seqstrings
- * @return
- */
- protected boolean checkAligned(AlignmentView seqstrings)
- {
- SeqCigar sq[] = seqstrings.getSequences();
- int length = sq[0].getWidth();
- boolean sameLength = true;
- for (int i = 0; i < sq.length; i++)
- {
- if (sq[i].getWidth() != length)
- {
- sameLength = false;
- break;
- }
- }
- return sameLength;
- }
-
- /**
* Ensure references to potentially very large objects (the PCA matrices) are
* nulled when the frame is closed
*/