1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/5952ac09af12/ changeset: 5952ac09af12 user: guru date: 2011-07-15 16:33:02 summary: Fixed a bug in PCA tool - standard deviation & prop variance values are now sorted by PC order. affected #: 4 files (70 bytes) --- a/test-data/pca_out1.tabular Thu Jul 14 22:54:43 2011 +0200 +++ b/test-data/pca_out1.tabular Fri Jul 15 10:33:02 2011 -0400 @@ -1,6 +1,6 @@ #Component 1 2 3 4 -#Std. deviation 0.9598 0.1436 0.3839 1.706 -#Proportion of variance explained 0.2303 0.005152 0.03684 0.7277 +#Std. deviation 1.706 0.9598 0.3839 0.1436 +#Proportion of variance explained 0.7277 0.2303 0.03684 0.005152 #Loadings 1 2 3 4 c1 0.5224 -0.3723 0.721 0.262 c2 -0.2634 -0.9256 -0.242 -0.1241 --- a/test-data/pca_out3.tabular Thu Jul 14 22:54:43 2011 +0200 +++ b/test-data/pca_out3.tabular Fri Jul 15 10:33:02 2011 -0400 @@ -1,6 +1,6 @@ #Component 1 2 3 4 -#Std. deviation 0.4905 0.1534 0.2793 2.049 -#Proportion of variance explained 0.05302 0.005183 0.01719 0.9246 +#Std. deviation 2.049 0.4905 0.2793 0.1534 +#Proportion of variance explained 0.9246 0.05302 0.01719 0.005183 #Loadings 1 2 3 4 c1 0.3616 -0.6565 0.581 0.3173 c2 -0.08227 -0.7297 -0.5964 -0.3241 --- a/tools/multivariate_stats/pca.py Thu Jul 14 22:54:43 2011 +0200 +++ b/tools/multivariate_stats/pca.py Fri Jul 15 10:33:02 2011 -0400 @@ -83,10 +83,12 @@ ncomps = len(summary['sdev']) if type(summary['sdev']) == type({}): - comps = summary['sdev'].keys() + comps_unsorted = summary['sdev'].keys() + comps=[] sd = summary['sdev'].values() for i in range(ncomps): - sd[comps.index('Comp.%s' %(i+1))] = summary['sdev'].values()[i] + sd[i] = summary['sdev'].values()[comps_unsorted.index('Comp.%s' %(i+1))] + comps.append('Comp.%s' %(i+1)) elif type(summary['sdev']) == type([]): comps=[] for i in range(ncomps): --- a/tools/multivariate_stats/pca.xml Thu Jul 14 22:54:43 2011 +0200 +++ b/tools/multivariate_stats/pca.xml Fri Jul 15 10:33:02 2011 -0400 @@ -1,4 +1,4 @@ -<tool id="pca1" name="Principal Component Analysis" version="1.0.1"> +<tool id="pca1" name="Principal Component Analysis" version="1.0.2"><description></description><command interpreter="python"> pca.py Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.