From: Jim Procter Date: Thu, 23 May 2024 17:18:39 +0000 (+0100) Subject: JAL-4159 fix sense of console/alignment output suppression flags and make sure all... X-Git-Tag: Release_2_11_4_0~31^2~6^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=ec3c231594ec663860bf71f84444a8f4c88ca161;p=jalview.git JAL-4159 fix sense of console/alignment output suppression flags and make sure all output is suppressed when computing pairwise alignments --- diff --git a/src/jalview/gui/PairwiseAlignPanel.java b/src/jalview/gui/PairwiseAlignPanel.java index 6800b0c..fb89355 100755 --- a/src/jalview/gui/PairwiseAlignPanel.java +++ b/src/jalview/gui/PairwiseAlignPanel.java @@ -158,16 +158,13 @@ public class PairwiseAlignPanel extends GPairwiseAlignPanel float[][] alignmentScores = new float[seqs.length][seqs.length]; double totscore = 0D; int count = seqs.length; - suppressTextbox = count<10; - discardAlignments = count<15; + suppressTextbox = count>10; + discardAlignments = count>15; boolean first = true; progress = 0; firePropertyChange(TOTAL, 0, total); - suppressTextbox = count<10; - discardAlignments = count<15; - for (int i = 1; i < count; i++) { // fill diagonal alignmentScores with Float.NaN @@ -193,25 +190,25 @@ public class PairwiseAlignPanel extends GPairwiseAlignPanel } as.scoreAlignment(); - if (!first) + if (!first && !suppressTextbox) { jalview.bin.Console.outPrintln(DASHES); textarea.append(DASHES); sb.append(DASHES); } first = false; - if (discardAlignments) { + if (!discardAlignments) { as.printAlignment(System.out); } scores[i][j] = as.getMaxScore() / as.getASeq1().length; alignmentScores[i][j] = as.getAlignmentScore(); totscore = totscore + scores[i][j]; - if (suppressTextbox) + if (!suppressTextbox) { textarea.append(as.getOutput()); sb.append(as.getOutput()); } - if (discardAlignments) + if (!discardAlignments) { sequences.add(as.getAlignedSeq1()); sequences.add(as.getAlignedSeq2());