From 8a62c90cab2506fc5c52126fa5ddb84af917befc Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 12 Apr 2017 14:43:39 +0100 Subject: [PATCH] JAL-1632 remove unused check for sequences aligned --- src/jalview/gui/PCAPanel.java | 35 ----------------------------------- 1 file changed, 35 deletions(-) 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 */ -- 1.7.10.2