Mercurial > repos > kellrott > cluster3
comparison cluster3.xml @ 0:cde61e2fea1e draft default tip
Uploaded
author | kellrott |
---|---|
date | Wed, 25 Jul 2012 12:23:22 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:cde61e2fea1e |
---|---|
1 <tool id="cluster3" name="Cluster 3" version="1.0.0"> | |
2 <description>Cluster 3.0</description> | |
3 <command interpreter="python">$scriptfile</command> | |
4 <inputs> | |
5 <param name="filename" type="data" format="tab" label="Matrix"/> | |
6 <param name="row_center" type="select" label="Row Center (gene)"> | |
7 <option value="x">No row Center</option> | |
8 <option value="a">Substact mean of row</option> | |
9 <option value="m">Substact median of row</option> | |
10 </param> | |
11 <param name="log_transform" type="boolean" label="Log transform data" default="false"/> | |
12 <param name="row_normalize" type="boolean" label="Normalize Rows (gene)"/> | |
13 | |
14 <param name="col_center" type="select" label="Column Center (sample)"> | |
15 <option value="x">No column Center</option> | |
16 <option value="a">Substact mean of column</option> | |
17 <option value="m">Substact median of column</option> | |
18 </param> | |
19 <param name="col_normalize" type="boolean" label="Normalize Columns (sample)"/> | |
20 | |
21 | |
22 <param name="col_algorithm" type="select" label="Column (sample) clustering"> | |
23 <option value="0">No clustering</option> | |
24 <option value="1">Uncentered correlation</option> | |
25 <option value="2">Pearson correlation</option> | |
26 <option value="3">Uncentered correlation, absolute value</option> | |
27 <option value="4">Pearson correlation, absolute value</option> | |
28 <option value="5">Spearman's rank correlation</option> | |
29 <option value="6">Kendall's tau</option> | |
30 <option value="7">Euclidean distance</option> | |
31 <option value="8">City-block distance</option> | |
32 </param> | |
33 | |
34 <param name="row_algorithm" type="select" label="Row (gene) clustering"> | |
35 <option value="0">No clustering</option> | |
36 <option value="1">Uncentered correlation</option> | |
37 <option value="2">Pearson correlation</option> | |
38 <option value="3">Uncentered correlation, absolute value</option> | |
39 <option value="4">Pearson correlation, absolute value</option> | |
40 <option value="5">Spearman's rank correlation</option> | |
41 <option value="6">Kendall's tau</option> | |
42 <option value="7">Euclidean distance</option> | |
43 <option value="8">City-block distance</option> | |
44 </param> | |
45 | |
46 <param name="hclustermethod" type="select" label="Hierarchical clustering method"> | |
47 <option value="x">Off</option> | |
48 <option value="m">Pairwise complete-linkage</option> | |
49 <option value="s">Pairwise single-linkage</option> | |
50 <option value="c">Pairwise centroid-linkage</option> | |
51 <option value="a">Pairwise average-linkage</option> | |
52 </param> | |
53 | |
54 <param name="knum" type="integer" optional="true" label="K-Means count"/> | |
55 <param name="kcount" type="integer" optional="true" label="K-Means run count"/> | |
56 | |
57 <param name="prow" type="boolean" label="Principal Component Analysis to rows (genes) instead of clustering"/> | |
58 <param name="pcol" type="boolean" label="Principal Component Analysis to cols (samples) instead of clustering"/> | |
59 | |
60 | |
61 </inputs> | |
62 <outputs> | |
63 <data name="cdtfile" format="cdt"/> | |
64 <data format="atr" name="atrfile" > | |
65 <filter>col_algorithm != "0"</filter> | |
66 </data> | |
67 <data format="atr" name="atrfile" > | |
68 <filter>col_algorithm != "0"</filter> | |
69 </data> | |
70 <data format="gtr" name="gtrfile" > | |
71 <filter>row_algorithm != "0"</filter> | |
72 </data> | |
73 </outputs> | |
74 <configfiles> | |
75 | |
76 <configfile name="scriptfile"><![CDATA[#!/usr/bin/env python | |
77 import subprocess | |
78 import shutil | |
79 | |
80 cmd = ["cluster", "-f", "$filename", "-u", "galaxy_cluster"] | |
81 | |
82 if "$col_algorithm" != "0": | |
83 cmd.extend( ['-e', '$col_algorithm'] ) | |
84 | |
85 if "$row_algorithm" != "0": | |
86 cmd.extend( ['-g', '$row_algorithm'] ) | |
87 | |
88 if len("$knum"): | |
89 cmd.extend(['-k', '$knum']) | |
90 | |
91 if len("$kcount"): | |
92 cmd.extend(['-k', '$kcount']) | |
93 | |
94 if "$col_normalize" == "true": | |
95 cmd.append("-na") | |
96 | |
97 if "$row_normalize" == "true": | |
98 cmd.append("-ng") | |
99 | |
100 if "$log_transform" == "true": | |
101 cmd.append("-l") | |
102 | |
103 print cmd | |
104 | |
105 proc = subprocess.Popen(cmd) | |
106 proc.communicate() | |
107 | |
108 shutil.move("galaxy_cluster" + ".cdt", "$cdtfile") | |
109 | |
110 if "$col_algorithm" != "0": | |
111 shutil.move("galaxy_cluster" + ".atr", "$atrfile") | |
112 | |
113 if "$row_algorithm" != "0": | |
114 shutil.move("galaxy_cluster" + ".gtr", "$gtrfile") | |
115 | |
116 | |
117 ]]></configfile> | |
118 </configfiles> | |
119 <help> | |
120 | |
121 A Wrapper for the Cluster3.0 library http://bonsai.hgc.jp/~mdehoon/software/cluster/software.htm | |
122 | |
123 Source code at http://bonsai.hgc.jp/~mdehoon/software/cluster/cluster-1.50.tar.gz | |
124 | |
125 For command line version, | |
126 ./configure --without-x | |
127 make | |
128 make install | |
129 | |
130 </help> | |
131 </tool> |