Fix output of all dimensions
authorMorellThomas <morellth@yahoo.co.jp>
Fri, 15 Mar 2024 09:25:36 +0000 (10:25 +0100)
committerMorellThomas <morellth@yahoo.co.jp>
Fri, 15 Mar 2024 09:25:36 +0000 (10:25 +0100)
src/jalview/analysis/PaSiMap.java
src/jalview/viewmodel/PaSiMapModel.java

index 07256a3..96f1e15 100755 (executable)
@@ -135,7 +135,7 @@ public class PaSiMap implements Runnable
 
     for (int i = 0; i < out.length; i++)
     {
-      out[i] = component(i, n);
+      out[i] = component(n, i);
     }
 
     return out;
index ba9ad6a..c2116f8 100644 (file)
@@ -207,10 +207,20 @@ public class PaSiMapModel
     for (int s = 0; s < seqs.length; s++)
     {
       csv.append("\"" + seqs[s].getName() + "\"");
-      Point p = points.get(s).coord;
-      csv.append(",").append(p.x);
-      csv.append(",").append(p.y);
-      csv.append(",").append(p.z);
+      if (!transformed)
+      {
+       double[] 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);
+      }
       csv.append("\n");
     }
     return csv.toString();