From: MorellThomas Date: Mon, 18 Sep 2023 07:33:44 +0000 (+0200) Subject: Fix buttons on the PaSiMap plot window X-Git-Tag: Release_2_11_4_0~31^2~34 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=2a862754ef7069c5e9a99dc127af9b0b93c37d35;p=jalview.git Fix buttons on the PaSiMap plot window --- diff --git a/src/jalview/analysis/PaSiMap.java b/src/jalview/analysis/PaSiMap.java index 13bc3d2..4a670bf 100755 --- a/src/jalview/analysis/PaSiMap.java +++ b/src/jalview/analysis/PaSiMap.java @@ -170,12 +170,18 @@ public class PaSiMap implements Runnable /* * coordinates matrix, with D vector */ - sb.append(" --- Coordinates ---\n"); - eigenMatrix.print(ps, "%8.6f "); + sb.append(" --- Pairwise correlation coefficients ---\n"); + pairwiseScores.print(ps, "%8.6f "); + ps.println(); + sb.append(" --- Eigenvalues ---\n"); eigenMatrix.printD(ps, "%15.4e"); ps.println(); + sb.append(" --- Coordinates ---\n"); + eigenMatrix.print(ps, "%8.6f "); + ps.println(); + return sb.toString(); } @@ -204,12 +210,10 @@ public class PaSiMap implements Runnable pairwiseScores = new Matrix(scores); pairwiseScores.fillDiagonal(); - ccAnalysis cc = new ccAnalysis(pairwiseScores, dim); - pairwiseScores = cc.run(); - eigenMatrix = pairwiseScores.copy(); - eigenMatrix.setD(pairwiseScores.getD()); - + + ccAnalysis cc = new ccAnalysis(pairwiseScores, dim); + eigenMatrix = cc.run(); } catch (Exception q) { @@ -253,7 +257,7 @@ public class PaSiMap implements Runnable public int getHeight() { // TODO can any of seqs[] be null? - return pairwiseScores.height();// seqs.getSequences().length; + return eigenMatrix.height();// seqs.getSequences().length; } /** @@ -265,7 +269,7 @@ public class PaSiMap implements Runnable public int getWidth() { // TODO can any of seqs[] be null? - return pairwiseScores.width();// seqs.getSequences().length; + return eigenMatrix.width();// seqs.getSequences().length; } /** diff --git a/src/jalview/viewmodel/PaSiMapModel.java b/src/jalview/viewmodel/PaSiMapModel.java index a97277f..4bb6d8a 100644 --- a/src/jalview/viewmodel/PaSiMapModel.java +++ b/src/jalview/viewmodel/PaSiMapModel.java @@ -202,24 +202,10 @@ public class PaSiMapModel for (int s = 0; s < seqs.length; s++) { csv.append("\"" + seqs[s].getName() + "\""); - double fl[]; - if (!transformed) - { - // output pasimap in correct order - fl = pasimap.component(s); - for (int d = fl.length - 1; d >= 0; d--) - { - csv.append(","); - csv.append(fl[d]); - } - } - else - { - Point p = points.get(s).coord; - csv.append(",").append(p.x); - csv.append(",").append(p.y); - csv.append(",").append(p.z); - } + Point p = points.get(s).coord; + csv.append(",").append(p.x); + csv.append(",").append(p.y); + csv.append(",").append(p.z); csv.append("\n"); } return csv.toString();