From: gmungoc Date: Wed, 12 Apr 2017 13:43:39 +0000 (+0100) Subject: JAL-1632 remove unused check for sequences aligned X-Git-Tag: Release_2_10_2~3^2~105^2~2^2~19 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8a62c90cab2506fc5c52126fa5ddb84af917befc;p=jalview.git JAL-1632 remove unused check for sequences aligned --- diff --git a/src/jalview/gui/PCAPanel.java b/src/jalview/gui/PCAPanel.java index f75c756..482dff3 100644 --- a/src/jalview/gui/PCAPanel.java +++ b/src/jalview/gui/PCAPanel.java @@ -30,7 +30,6 @@ import jalview.datamodel.Alignment; 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; @@ -129,18 +128,6 @@ public class PCAPanel extends GPCAPanel implements Runnable, 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()); @@ -152,28 +139,6 @@ public class PCAPanel extends GPCAPanel implements Runnable, } /** - * 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 */