diff nn_classifier.xml @ 21:1d3447c2203c draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit e2a5eade6d0e5ddf3a47630381a0ad90d80e8a04"
author bgruening
date Tue, 13 Apr 2021 17:48:25 +0000
parents 699024d5c451
children 22f0b9db4ea1
line wrap: on
line diff
--- a/nn_classifier.xml	Thu Oct 01 20:23:20 2020 +0000
+++ b/nn_classifier.xml	Tue Apr 13 17:48:25 2021 +0000
@@ -1,19 +1,19 @@
-<tool id="sklearn_nn_classifier" name="Nearest Neighbors Classification" version="@VERSION@">
+<tool id="sklearn_nn_classifier" name="Nearest Neighbors Classification" version="@VERSION@" profile="20.05">
     <description></description>
     <macros>
         <import>main_macros.xml</import>
     </macros>
-    <expand macro="python_requirements"/>
-    <expand macro="macro_stdio"/>
+    <expand macro="python_requirements" />
+    <expand macro="macro_stdio" />
     <version_command>echo "@VERSION@"</version_command>
     <command><![CDATA[
     python '$nnc_script' '$inputs'
 ]]>
     </command>
     <configfiles>
-        <inputs name="inputs"/>
+        <inputs name="inputs" />
         <configfile name="nnc_script">
-<![CDATA[
+            <![CDATA[
 import sys
 import json
 import numpy as np
@@ -68,13 +68,13 @@
         </configfile>
     </configfiles>
     <inputs>
-        <expand macro="sl_Conditional" model="zip"><!--Todo: add sparse to targets-->
+        <expand macro="sl_Conditional" model="zip">            <!--Todo: add sparse to targets-->
             <param name="selected_algorithm" type="select" label="Classifier type">
                 <option value="nneighbors">Nearest Neighbors</option>
                 <option value="ncentroid">Nearest Centroid</option>
             </param>
             <when value="nneighbors">
-                <expand macro="sl_mixed_input"/>
+                <expand macro="sl_mixed_input" />
                 <conditional name="sampling_methods">
                     <param name="sampling_method" type="select" label="Neighbor selection method">
                         <option value="KNeighborsClassifier" selected="true">K-nearest neighbors</option>
@@ -82,94 +82,91 @@
                     </param>
                     <when value="KNeighborsClassifier">
                         <expand macro="nn_advanced_options">
-                            <param argument="n_neighbors" type="integer" optional="true" value="5" label="Number of neighbors" help=" "/>
+                            <param argument="n_neighbors" type="integer" optional="true" value="5" label="Number of neighbors" help=" " />
                         </expand>
                     </when>
                     <when value="RadiusNeighborsClassifier">
                         <expand macro="nn_advanced_options">
-                            <param argument="radius" type="float" optional="true" value="1.0" label="Radius"
-                                help="Range of parameter space to use by default for :meth ''radius_neighbors'' queries."/>
+                            <param argument="radius" type="float" optional="true" value="1.0" label="Radius" help="Range of parameter space to use by default for :meth ''radius_neighbors'' queries." />
                         </expand>
                     </when>
                 </conditional>
             </when>
             <when value="ncentroid">
-                 <expand macro="sl_mixed_input"/>
+                <expand macro="sl_mixed_input" />
                 <section name="options" title="Advanced Options" expanded="False">
-                    <param argument="metric" type="text" optional="true" value="euclidean" label="Metric"
-                        help="The metric to use when calculating distance between instances in a feature array."/>
-                    <param argument="shrink_threshold" type="float" optional="true" value="" label="Shrink threshold"
-                        help="Floating point number for shrinking centroids to remove features."/>
+                    <param argument="metric" type="text" optional="true" value="euclidean" label="Metric" help="The metric to use when calculating distance between instances in a feature array." />
+                    <param argument="shrink_threshold" type="float" optional="true" value="" label="Shrink threshold" help="Floating point number for shrinking centroids to remove features." />
                 </section>
             </when>
         </expand>
     </inputs>
 
-    <expand macro="output"/>
+    <expand macro="output" />
 
     <tests>
         <test>
-            <param name="infile1" value="train_set.tabular" ftype="tabular"/>
-            <param name="infile2" value="train_set.tabular" ftype="tabular"/>
-            <param name="header1" value="True"/>
-            <param name="header2" value="True"/>
-            <param name="col1" value="1,2,3,4"/>
-            <param name="col2" value="5"/>
-            <param name="selected_task" value="train"/>
-            <param name="selected_algorithm" value="nneighbors"/>
+            <param name="infile1" value="train_set.tabular" ftype="tabular" />
+            <param name="infile2" value="train_set.tabular" ftype="tabular" />
+            <param name="header1" value="True" />
+            <param name="header2" value="True" />
+            <param name="col1" value="1,2,3,4" />
+            <param name="col2" value="5" />
+            <param name="selected_task" value="train" />
+            <param name="selected_algorithm" value="nneighbors" />
             <param name="sampling_method" value="KNeighborsClassifier" />
             <param name="algorithm" value="brute" />
-            <output name="outfile_fit" file="nn_model01" compare="sim_size" delta="5"/>
+            <output name="outfile_fit" file="nn_model01" compare="sim_size" delta="5" />
         </test>
         <test>
-            <param name="infile1" value="train_set.tabular" ftype="tabular"/>
-            <param name="infile2" value="train_set.tabular" ftype="tabular"/>
-            <param name="header1" value="True"/>
-            <param name="header2" value="True"/>
-            <param name="col1" value="1,2,3,4"/>
-            <param name="col2" value="5"/>
-            <param name="selected_task" value="train"/>
-            <param name="selected_algorithm" value="nneighbors"/>
+            <param name="infile1" value="train_set.tabular" ftype="tabular" />
+            <param name="infile2" value="train_set.tabular" ftype="tabular" />
+            <param name="header1" value="True" />
+            <param name="header2" value="True" />
+            <param name="col1" value="1,2,3,4" />
+            <param name="col2" value="5" />
+            <param name="selected_task" value="train" />
+            <param name="selected_algorithm" value="nneighbors" />
             <param name="sampling_method" value="RadiusNeighborsClassifier" />
-            <output name="outfile_fit" file="nn_model02" compare="sim_size" delta="5"/>
+            <output name="outfile_fit" file="nn_model02" compare="sim_size" delta="5" />
         </test>
         <test>
-            <param name="infile1" value="train_set.tabular" ftype="tabular"/>
-            <param name="infile2" value="train_set.tabular" ftype="tabular"/>
-            <param name="header1" value="True"/>
-            <param name="header2" value="True"/>
-            <param name="col1" value="1,2,3,4"/>
-            <param name="col2" value="5"/>
-            <param name="selected_task" value="train"/>
-            <param name="selected_algorithm" value="ncentroid"/>
-            <output name="outfile_fit" file="nn_model03" compare="sim_size" delta="5"/>
+            <param name="infile1" value="train_set.tabular" ftype="tabular" />
+            <param name="infile2" value="train_set.tabular" ftype="tabular" />
+            <param name="header1" value="True" />
+            <param name="header2" value="True" />
+            <param name="col1" value="1,2,3,4" />
+            <param name="col2" value="5" />
+            <param name="selected_task" value="train" />
+            <param name="selected_algorithm" value="ncentroid" />
+            <output name="outfile_fit" file="nn_model03" compare="sim_size" delta="5" />
         </test>
         <test>
-            <param name="infile_model" value="nn_model01" ftype="zip"/>
-            <param name="infile_data" value="test_set.tabular" ftype="tabular"/>
-            <param name="header" value="True"/>
-            <param name="selected_task" value="load"/>
-            <output name="outfile_predict" file="nn_prediction_result01.tabular"/>
+            <param name="infile_model" value="nn_model01" ftype="zip" />
+            <param name="infile_data" value="test_set.tabular" ftype="tabular" />
+            <param name="header" value="True" />
+            <param name="selected_task" value="load" />
+            <output name="outfile_predict" file="nn_prediction_result01.tabular" />
         </test>
         <test>
-            <param name="infile_model" value="nn_model02" ftype="zip"/>
-            <param name="infile_data" value="test_set.tabular" ftype="tabular"/>
-            <param name="header" value="True"/>
-            <param name="selected_task" value="load"/>
-            <output name="outfile_predict" file="nn_prediction_result02.tabular"/>
+            <param name="infile_model" value="nn_model02" ftype="zip" />
+            <param name="infile_data" value="test_set.tabular" ftype="tabular" />
+            <param name="header" value="True" />
+            <param name="selected_task" value="load" />
+            <output name="outfile_predict" file="nn_prediction_result02.tabular" />
         </test>
         <test>
-            <param name="infile_model" value="nn_model03" ftype="zip"/>
-            <param name="infile_data" value="test_set.tabular" ftype="tabular"/>
-            <param name="header" value="True"/>
-            <param name="selected_task" value="load"/>
-            <output name="outfile_predict" file="nn_prediction_result03.tabular"/>
+            <param name="infile_model" value="nn_model03" ftype="zip" />
+            <param name="infile_data" value="test_set.tabular" ftype="tabular" />
+            <param name="header" value="True" />
+            <param name="selected_task" value="load" />
+            <output name="outfile_predict" file="nn_prediction_result03.tabular" />
         </test>
     </tests>
     <help><![CDATA[
 **What it does**
 This module implements the k-nearest neighbors classification algorithms.
 For more information check http://scikit-learn.org/stable/modules/neighbors.html
-    ]]></help>
-    <expand macro="sklearn_citation"/>
+    ]]>    </help>
+    <expand macro="sklearn_citation" />
 </tool>