27
|
1 <tool id="MaREA_cluester" name="Cluster Analysis" version="1.0.4">
|
|
2 <description>of Reaction Activity Scores</description>
|
16
|
3 <macros>
|
|
4 <import>marea_macros.xml</import>
|
|
5 </macros>
|
|
6 <requirements>
|
17
|
7 <requirement type="package" version="0.25.1">pandas</requirement>
|
16
|
8 <requirement type="package" version="1.1.0">scipy</requirement>
|
|
9 <requirement type="package" version="0.10.1">cobra</requirement>
|
|
10 <requirement type="package" version="0.21.3">scikit-learn</requirement>
|
|
11 <requirement type="package" version="2.2.2">matplotlib</requirement>
|
|
12 <requirement type="package" version="1.17">numpy</requirement>
|
|
13 </requirements>
|
|
14 <command detect_errors="exit_code">
|
|
15 <![CDATA[
|
|
16 python $__tool_directory__/marea_cluster.py
|
|
17 --input $input
|
|
18 --tool_dir $__tool_directory__
|
|
19 --out_log $log
|
24
|
20 --cluster_type ${data.clust_type}
|
16
|
21 #if $data.clust_type == 'kmeans':
|
|
22 --k_min ${data.k_min}
|
|
23 --k_max ${data.k_max}
|
|
24 --elbow ${data.elbow}
|
|
25 --silhouette ${data.silhouette}
|
|
26 #end if
|
|
27 #if $data.clust_type == 'dbscan':
|
|
28 #if $data.dbscan_advanced.advanced == 'true'
|
|
29 --eps ${data.dbscan_advanced.eps}
|
|
30 --min_samples ${data.dbscan_advanced.min_samples}
|
|
31 #end if
|
|
32 #end if
|
|
33 #if $data.clust_type == 'hierarchy':
|
|
34 --k_min ${data.k_min}
|
|
35 --k_max ${data.k_max}
|
|
36 #end if
|
|
37 ]]>
|
|
38 </command>
|
|
39 <inputs>
|
|
40 <param name="input" argument="--input" type="data" format="tabular, csv, tsv" label="RNAseq of all samples" />
|
|
41
|
|
42 <conditional name="data">
|
|
43 <param name="clust_type" argument="--cluster_type" type="select" label="Choose clustering type:">
|
|
44 <option value="kmeans" selected="true">KMeans</option>
|
|
45 <option value="dbscan">DBSCAN</option>
|
|
46 <option value="hierarchy">Agglomerative Hierarchical</option>
|
|
47 </param>
|
|
48 <when value="kmeans">
|
|
49 <param name="k_min" argument="--k_min" type="integer" min="2" max="99" value="3" label="Min number of clusters (k) to be tested" />
|
|
50 <param name="k_max" argument="--k_max" type="integer" min="3" max="99" value="5" label="Max number of clusters (k) to be tested" />
|
|
51 <param name="elbow" argument="--elbow" type="boolean" value="true" label="Draw the elbow plot from k-min to k-max"/>
|
|
52 <param name="silhouette" argument="--silhouette" type="boolean" value="true" label="Draw the Silhouette plot from k-min to k-max"/>
|
|
53 </when>
|
|
54 <when value="dbscan">
|
|
55 <conditional name="dbscan_advanced">
|
|
56 <param name="advanced" type="boolean" value="false" label="Want to use custom params for DBSCAN? (if not optimal values will be used)">
|
|
57 <option value="true">Yes</option>
|
|
58 <option value="false">No</option>
|
|
59 </param>
|
|
60 <when value="false"></when>
|
|
61 <when value="true">
|
|
62 <param name="eps" argument="--eps" type="float" value="0.5" label="Epsilon - The maximum distance between two samples for one to be considered as in the neighborhood of the other" />
|
|
63 <param name="min_samples" argument="min_samples" type="integer" value="5" label="Min samples - The number of samples in a neighborhood for a point to be considered as a core point (this includes the point itself)"/>
|
|
64
|
|
65 </when>
|
|
66 </conditional>
|
|
67 </when>
|
|
68 <when value="hierarchy">
|
|
69 <param name="k_min" argument="--k_min" type="integer" min="2" max="99" value="3" label="Min number of clusters (k) to be tested" />
|
|
70 <param name="k_max" argument="--k_max" type="integer" min="3" max="99" value="5" label="Max number of clusters (k) to be tested" />
|
|
71 </when>
|
|
72 </conditional>
|
|
73 </inputs>
|
|
74
|
|
75 <outputs>
|
|
76 <data format="txt" name="log" label="${tool.name} - Log" />
|
|
77 <collection name="results" type="list" label="${tool.name} - Results">
|
|
78 <discover_datasets pattern="__name_and_ext__" directory="clustering"/>
|
|
79 </collection>
|
|
80 </outputs>
|
|
81 <help>
|
|
82 <![CDATA[
|
|
83
|
|
84 What it does
|
|
85 -------------
|
|
86
|
|
87
|
|
88 ]]>
|
|
89 </help>
|
|
90 <expand macro="citations" />
|
|
91 </tool>
|
|
92
|
|
93
|