comparison pca.xml @ 0:ffcdde989859 draft

Uploaded
author iuc
date Tue, 29 Jul 2014 06:30:45 -0400
parents
children 2e7bc1bb2dbe
comparison
equal deleted inserted replaced
-1:000000000000 0:ffcdde989859
1 <tool id="pca1" name="Principal Component Analysis" version="1.1.0">
2 <description> </description>
3 <expand macro="requirements" />
4 <macros>
5 <import>statistic_tools_macros.xml</import>
6 </macros>
7 <command interpreter="python">
8 pca.py
9 $input1
10 $var_cols
11 $methodChoice.method
12 $out_file1
13 $out_file2
14 #if $methodChoice.method == "svd":
15 $methodChoice.scale
16 #end if
17 </command>
18 <inputs>
19 <param format="tabular" name="input1" type="data" label="Select data" help="Dataset missing? See TIP below."/>
20 <param name="var_cols" label="Select columns containing input variables " type="data_column" data_ref="input1" numerical="True" multiple="true" >
21 <validator type="no_options" message="Please select at least one column."/>
22 </param>
23 <conditional name="methodChoice">
24 <param name="method" type="select" label="Method" help="The correlation matrix can only be used if there are no constant variables">
25 <option value="cor" selected="true">Eigenvectors of Correlation (princomp)</option>
26 <option value="cov">Eigenvectors of Covariance (princomp)</option>
27 <option value="svd">Singular Value Decomposition (prcomp)</option>
28 </param>
29 <when value="cor" />
30 <when value="cov" />
31 <when value="svd">
32 <param name="scale" type="select" label="Centering and Scaling" help="Can be used to center and/or scale variables">
33 <option value="none" selected="true">None</option>
34 <option value="center">Center only</option>
35 <option value="scale">Scale only</option>
36 <option value="both">Center and Scale</option>
37 </param>
38 </when>
39 </conditional>
40 </inputs>
41 <outputs>
42 <data format="input" name="out_file1" metadata_source="input1" />
43 <data format="pdf" name="out_file2" />
44 </outputs>
45 <tests>
46 <test>
47 <param name="input1" value="iris.tabular"/>
48 <param name="var_cols" value="1,2,3,4"/>
49 <param name="method" value="cor"/>
50 <output name="out_file1" file="pca_out1.tabular"/>
51 <output name="out_file2" file="pca_out2.pdf"/>
52 </test>
53 <test>
54 <param name="input1" value="iris.tabular"/>
55 <param name="var_cols" value="1,2,3,4"/>
56 <param name="method" value="cov"/>
57 <output name="out_file1" file="pca_out3.tabular"/>
58 <output name="out_file2" file="pca_out4.pdf"/>
59 </test>
60 <test>
61 <param name="input1" value="iris.tabular"/>
62 <param name="var_cols" value="1,2,3,4"/>
63 <param name="method" value="svd"/>
64 <param name="scale" value="both"/>
65 <output name="out_file1" file="pca_out5.tabular"/>
66 <output name="out_file2" file="pca_out6.pdf"/>
67 </test>
68 </tests>
69 <help>
70
71
72 .. class:: infomark
73
74 **TIP:** If your data is not TAB delimited, use *Edit Datasets-&gt;Convert characters*
75
76 -----
77
78 .. class:: infomark
79
80 **What it does**
81
82 This tool performs Principal Component Analysis on the given numeric input data using functions from R statistical package - 'princomp' function (for Eigenvector based solution) and 'prcomp' function (for Singular value decomposition based solution). It outputs two files, one containing the summary statistics of PCA, and the other containing biplots of the observations and principal components.
83
84 *R Development Core Team (2009). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0, URL http://www.R-project.org.*
85
86 -----
87
88 .. class:: warningmark
89
90 **Note**
91
92 - This tool currently treats all variables as continuous numeric variables. Running the tool on categorical variables might result in incorrect results. Rows containing non-numeric (or missing) data in any of the chosen columns will be skipped from the analysis.
93
94 - The summary statistics in the output are described below:
95
96 - Std. deviation: Standard deviations of the principal components
97 - Loadings: a list of eigen-vectors/variable loadings
98 - Scores: Scores of the input data on the principal components
99
100 </help>
101 </tool>