X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FPCA.java;h=9be0e3ced5135a4077ae6707d2ab0b4f8a33b11d;hb=06931e7445db77675739e0f206d7b5fafc3f9c05;hp=a14be50d2b05b8d85a9dba8601cefa5897051ee4;hpb=2de8acfae59aced665e4c37ad0f7dcc2ed68818e;p=jalview.git
diff --git a/src/jalview/analysis/PCA.java b/src/jalview/analysis/PCA.java
index a14be50..9be0e3c 100755
--- a/src/jalview/analysis/PCA.java
+++ b/src/jalview/analysis/PCA.java
@@ -1,20 +1,19 @@
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
- * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
+ * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This file is part of Jalview.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with Jalview. If not, see .
*/
package jalview.analysis;
@@ -47,7 +46,7 @@ public class PCA implements Runnable
* Creates a new PCA object.
*
* @param s
- * Set of sequences to perform PCA on
+ * Set of sequences to perform PCA on
*/
public PCA(String[] s)
{
@@ -115,7 +114,7 @@ public class PCA implements Runnable
* Returns Eigenvalue
*
* @param i
- * Index of diagonal within matrix
+ * Index of diagonal within matrix
*
* @return Returns value of diagonal from matrix
*/
@@ -128,13 +127,13 @@ public class PCA implements Runnable
* DOCUMENT ME!
*
* @param l
- * DOCUMENT ME!
+ * DOCUMENT ME!
* @param n
- * DOCUMENT ME!
+ * DOCUMENT ME!
* @param mm
- * DOCUMENT ME!
+ * DOCUMENT ME!
* @param factor
- * DOCUMENT ME!
+ * DOCUMENT ME!
*
* @return DOCUMENT ME!
*/
@@ -156,7 +155,7 @@ public class PCA implements Runnable
* DOCUMENT ME!
*
* @param n
- * DOCUMENT ME!
+ * DOCUMENT ME!
*
* @return DOCUMENT ME!
*/
@@ -177,9 +176,9 @@ public class PCA implements Runnable
* DOCUMENT ME!
*
* @param row
- * DOCUMENT ME!
+ * DOCUMENT ME!
* @param n
- * DOCUMENT ME!
+ * DOCUMENT ME!
*
* @return DOCUMENT ME!
*/
@@ -208,7 +207,8 @@ public class PCA implements Runnable
Matrix mt = m.transpose();
details.append(" --- OrigT * Orig ---- \n");
- eigenvector = mt.preMultiply(m2);
+ // eigenvector = mt.preMultiply(m); // standard seqspace comparison matrix
+ eigenvector = mt.preMultiply(m2); // jalview variation on seqsmace method
PrintStream ps = new PrintStream(System.out)
{
@@ -241,12 +241,15 @@ public class PCA implements Runnable
eigenvector.tqli();
details.append(" --- New diagonalization matrix ---\n");
+ eigenvector.print(ps);
details.append(" --- Eigenvalues ---\n");
eigenvector.printD(ps);
ps.println();
- // taps.println();
- // taps.println("Transformed sequences = ");
- // Matrix trans = m.preMultiply(eigenvector);
- // trans.print(System.out);
+ /*
+ * for (int seq=0;seq