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