changeset 1:d938b80a954f draft

planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 620159e95d2fae693b5f25d591528be159130f25
author bgruening
date Wed, 04 May 2016 13:09:40 -0400
parents dac8a9712939
children fe2d62fbf47b
files main_macros.xml test-data/pw_metric01.tabular test-data/pw_metric02.tabular test-data/pw_metric03.tabular test-data/test2.tabular
diffstat 5 files changed, 130 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/main_macros.xml	Mon May 02 16:16:42 2016 -0400
+++ b/main_macros.xml	Wed May 04 13:09:40 2016 -0400
@@ -126,11 +126,23 @@
       </param>
   </xml>
 
-  <xml name="multiple_sparse">
-    <repeat name="sparse_inputs" min="1" max="10" title="Inputs">
-        <param name="input" type="data" format="txt" label="Sparse matrix file (.mtx, .txt)" help="Specify a sparse matrix file in .txt format."/>
+  <xml name="gamma" token_default_value="1.0" token_label="Scaling parameter" token_help_text=" ">
+    <param argument="gamma" type="float" optional="true" value="@DEFAULT_VALUE@" label="@LABEL@" help="@HELP_TEXT@"/>
+  </xml>
+
+  <xml name="degree" token_default_value="3" token_label="Degree of the polynomial" token_help_text=" ">
+    <param argument="degree" type="integer" optional="true" value="@DEFAULT_VALUE@" label="@LABEL@" help="@HELP_TEXT@"/>
+  </xml>
+
+  <xml name="coef0" token_default_value="1" token_label="Zero coefficient" token_help_text=" ">
+    <param argument="coef0" type="integer" optional="true" value="@DEFAULT_VALUE@" label="@LABEL@" help="@HELP_TEXT@"/>
+  </xml>    
+
+  <xml name="multiple_input" token_name="input_files" token_max_num="10" token_format="txt" token_label="Sparse matrix file (.mtx, .txt)" token_help_text="Specify a sparse matrix file in .txt format.">
+    <repeat name="@NAME@" min="1" max="@MAX_NUM@" title="Select input file(s):">
+        <param name="input" type="data" format="@FORMAT@" label="@LABEL@" help="@HELP_TEXT@"/>
     </repeat>
-  </xml>
+  </xml>  
 
   <xml name="eden_citation">
     <citations>
@@ -338,4 +350,96 @@
       </when>
     </conditional>
   </xml>
-</macros>
+
+  <xml name="distance_metrics">
+    <param argument="metric" type="select" label="Distance metric" help=" ">
+      <option value="euclidean" selected="true">euclidean</option>
+      <option value="cityblock">cityblock</option>
+      <option value="cosine">cosine</option>
+      <option value="l1">l1</option>
+      <option value="l2">l2</option>
+      <option value="manhattan">manhattan</option>
+      <yield/>
+    </param>
+  </xml>
+
+  <xml name="distance_nonsparse_metrics">
+    <option value="braycurtis">braycurtis</option>
+    <option value="canberra">canberra</option>
+    <option value="chebyshev">chebyshev</option>
+    <option value="correlation">correlation</option>
+    <option value="dice">dice</option>
+    <option value="hamming">hamming</option>
+    <option value="jaccard">jaccard</option>
+    <option value="kulsinski">kulsinski</option>
+    <option value="mahalanobis">mahalanobis</option>
+    <option value="matching">matching</option>
+    <option value="minkowski">minkowski</option>
+    <option value="rogerstanimoto">rogerstanimoto</option>
+    <option value="russellrao">russellrao</option>
+    <option value="seuclidean">seuclidean</option>
+    <option value="sokalmichener">sokalmichener</option>
+    <option value="sokalsneath">sokalsneath</option>
+    <option value="sqeuclidean">sqeuclidean</option>
+    <option value="yule">yule</option>
+  </xml>
+
+  <xml name="pairwise_kernel_metrics">
+    <param argument="metric" type="select" label="Pirwise Kernel metric" help=" ">
+      <option value="rbf" selected="true">rbf</option>
+      <option value="sigmoid">sigmoid</option>
+      <option value="polynomial">polynomial</option>
+      <option value="linear" selected="true">linear</option>
+      <option value="chi2">chi2</option>
+      <option value="additive_chi2">additive_chi2</option>
+    </param>
+  </xml>
+
+  <xml name="sparse_pairwise_metric_functions">
+    <param name="selected_metric_function" type="select" label="Select the pairwise metric you want to compute:">
+      <option value="euclidean_distances" selected="true">Euclidean distance matrix</option>
+      <option value="pairwise_distances">Distance matrix</option>
+      <option value="pairwise_distances_argmin">Minimum distances between one point and a set of points</option>
+      <yield/>
+    </param>
+  </xml>
+
+  <xml name="pairwise_metric_functions">
+    <option value="additive_chi2_kernel" >Additive chi-squared kernel</option>
+    <option value="chi2_kernel">Exponential chi-squared kernel</option>
+    <option value="linear_kernel">Linear kernel</option>
+    <option value="manhattan_distances">L1 distances</option>
+    <option value="pairwise_kernels">Kernel</option>
+    <option value="polynomial_kernel">Polynomial kernel</option>
+    <option value="rbf_kernel">Gaussian (rbf) kernel</option>
+    <option value="laplacian_kernel">Laplacian kernel</option>
+  </xml>
+
+  <xml name="sparse_pairwise_condition">
+    <when value="pairwise_distances">
+      <section name="options" title="Advanced Options" expanded="False">
+          <expand macro="distance_metrics">
+              <yield/>
+          </expand>
+      </section>
+    </when>
+    <when value="euclidean_distances">
+      <section name="options" title="Advanced Options" expanded="False">
+          <param argument="squared" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolflase" checked="false" label="Return squared Euclidean distances" help=" "/>
+      </section>
+    </when>
+  </xml>
+
+  <xml name="argmin_distance_condition">
+    <when value="pairwise_distances_argmin">
+      <section name="options" title="Advanced Options" expanded="False">
+          <param argument="axis" type="integer" optional="true" value="1" label="Axis" help="Axis along which the argmin and distances are to be computed."/>
+          <expand macro="distance_metrics">
+              <yield/>
+          </expand>
+          <param argument="batch_size" type="integer" optional="true" value="500" label="Batch size" help="Number of rows to be processed in each batch run."/>
+      </section>
+    </when>
+  </xml>
+
+</macros>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/pw_metric01.tabular	Wed May 04 13:09:40 2016 -0400
@@ -0,0 +1,4 @@
+3.04314666148e-10	1.0	0.00141780612013	0.0463660971622	0.0121201634953	0.0121201634953	0.0396647854754	4.83715268652e-11
+0.00827235898638	0.00141780612013	1.0	0.503053072591	0.00594941515478	0.00594941515478	0.00182136461404	1.44729848866e-15
+0.00018054338976	0.0463660971622	0.503053072591	1.0	0.0515464606948	0.0515464606948	0.0321278551948	6.21733947367e-13
+1.90871172058e-06	0.0121201634953	0.00594941515478	0.0515464606948	1.0	1.0	0.688276578535	7.17147837147e-07
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/pw_metric02.tabular	Wed May 04 13:09:40 2016 -0400
@@ -0,0 +1,4 @@
+0.0	6.9919893272	4.70030205564	5.5832796797
+6.9919893272	0.0	2.29168727157	5.55871315041
+4.70030205564	2.29168727157	0.0	4.07832320094
+5.5832796797	5.55871315041	4.07832320094	0.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/pw_metric03.tabular	Wed May 04 13:09:40 2016 -0400
@@ -0,0 +1,4 @@
+-2.88657986403e-15	0.780145991999	0.696415427396	0.649889281728
+0.780145991999	-1.11022302463e-15	0.772719316767	0.766951176109
+0.696415427396	0.772719316767	3.33066907388e-15	0.676197268433
+0.649889281728	0.766951176109	0.676197268433	3.33066907388e-16
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/test2.tabular	Wed May 04 13:09:40 2016 -0400
@@ -0,0 +1,9 @@
+0	1	2	3
+3.68258022948	2.82110345641	-3.990140724	-1.9523364774
+0.015942057224	-0.711958594347	0.125502976978	-0.972218263337
+2.08690768825	0.929399321468	-2.12924084484	-1.99714022188
+1.41321052084	0.523750660422	-1.4210539291	-1.49298569451
+0.76831404394	1.38267855169	-0.989045048734	0.649504257894
+0.76831404394	1.38267855169	-0.989045048734	0.649504257894
+0	1	-0.9	0.6
+1	2	2	5