annotate tools/multivariate_stats/pca.xml @ 1:cdcb0ce84a1b

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:45:15 -0500
parents 9071e359b9a3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 <tool id="pca1" name="Principal Component Analysis" version="1.0.2">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 <description> </description>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 <command interpreter="python">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 pca.py
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 $input1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 $var_cols
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 $methodChoice.method
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 $out_file1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 $out_file2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 #if $methodChoice.method == "svd":
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11 $methodChoice.scale
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 #end if
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 </command>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 <inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 <param format="tabular" name="input1" type="data" label="Select data" help="Dataset missing? See TIP below."/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 <param name="var_cols" label="Select columns containing input variables " type="data_column" data_ref="input1" numerical="True" multiple="true" >
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 <validator type="no_options" message="Please select at least one column."/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19 <conditional name="methodChoice">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20 <param name="method" type="select" label="Method" help="The correlation matrix can only be used if there are no constant variables">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21 <option value="cor" selected="true">Eigenvectors of Correlation (princomp)</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 <option value="cov">Eigenvectors of Covariance (princomp)</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23 <option value="svd">Singular Value Decomposition (prcomp)</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25 <when value="cor" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26 <when value="cov" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27 <when value="svd">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
28 <param name="scale" type="select" label="Centering and Scaling" help="Can be used to center and/or scale variables">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
29 <option value="none" selected="true">None</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
30 <option value="center">Center only</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
31 <option value="scale">Scale only</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
32 <option value="both">Center and Scale</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
33 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
34 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
35 </conditional>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
36 </inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
37 <outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
38 <data format="input" name="out_file1" metadata_source="input1" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
39 <data format="pdf" name="out_file2" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
40 </outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
41 <requirements>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
42 <requirement type="python-module">rpy</requirement>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
43 </requirements>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
44 <tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
45 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
46 <param name="input1" value="iris.tabular"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
47 <param name="var_cols" value="1,2,3,4"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
48 <param name="method" value="cor"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
49 <output name="out_file1" file="pca_out1.tabular"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
50 <output name="out_file2" file="pca_out2.pdf"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
51 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
52 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
53 <param name="input1" value="iris.tabular"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
54 <param name="var_cols" value="1,2,3,4"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
55 <param name="method" value="cov"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
56 <output name="out_file1" file="pca_out3.tabular"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
57 <output name="out_file2" file="pca_out4.pdf"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
58 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
59 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
60 <param name="input1" value="iris.tabular"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
61 <param name="var_cols" value="1,2,3,4"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
62 <param name="method" value="svd"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
63 <param name="scale" value="both"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
64 <output name="out_file1" file="pca_out5.tabular"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
65 <output name="out_file2" file="pca_out6.pdf"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
66 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
67 </tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
68 <help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
69
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
70
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
71 .. class:: infomark
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
72
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
73 **TIP:** If your data is not TAB delimited, use *Edit Datasets-&gt;Convert characters*
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
74
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
75 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
76
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
77 .. class:: infomark
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
78
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
79 **What it does**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
80
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
81 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.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
82
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
83 *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.*
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
84
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
85 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
86
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
87 .. class:: warningmark
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
88
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
89 **Note**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
90
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
91 - 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.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
92
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
93 - The summary statistics in the output are described below:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
94
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
95 - Std. deviation: Standard deviations of the principal components
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
96 - Loadings: a list of eigen-vectors/variable loadings
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
97 - Scores: Scores of the input data on the principal components
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
98
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
99 </help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
100 </tool>