diff ml_visualization_ex.xml @ 16:a536d2736c2d draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 3c1e6c72303cfd8a5fd014734f18402b97f8ecb5
author bgruening
date Fri, 22 Sep 2023 16:40:38 +0000
parents 9c19cf3c4ea0
children
line wrap: on
line diff
--- a/ml_visualization_ex.xml	Wed Aug 09 13:48:55 2023 +0000
+++ b/ml_visualization_ex.xml	Fri Sep 22 16:40:38 2023 +0000
@@ -21,6 +21,11 @@
             --infile1 '$plotting_selection.infile1'
             #elif $plotting_selection.plot_type == 'keras_plot_model'
             --model_config '$plotting_selection.infile_model_config'
+            #elif $plotting_selection.plot_type == 'classification_confusion_matrix'
+            --true_labels '$plotting_selection.infile_true'
+            --predicted_labels '$plotting_selection.infile_predicted'
+            --plot_color '$plotting_selection.plot_color'
+            --title '$plotting_selection.title'
             #end if
         ]]>
     </command>
@@ -36,6 +41,7 @@
                 <option value="rfecv_gridscores">Number of features vs. Recursive Feature Elimination gridscores with corss-validation</option>
                 <option value="feature_importances">Feature Importances plot</option>
                 <option value="keras_plot_model">keras plot model - plot configuration of a neural network model</option>
+                <option value="classification_confusion_matrix">Confusion matrix for classes</option>
             </param>
             <when value="learning_curve">
                 <param name="infile1" type="data" format="tabular" label="Select the dataset containing values for plotting learning curve." help="This dataset should be the output of tool model_validation->learning_curve." />
@@ -96,6 +102,31 @@
                 <param name="title" type="hidden" value="" optional="true" label="Plot title" help="Optional. If change is desired." />
                 <param name="plot_format" type="hidden" value="png" label="The output format and library" />
             </when>
+            <when value="classification_confusion_matrix">
+                <param name="infile_true" type="data" format="tabular" label="Select dataset containing true labels" />
+                <param name="header_true" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" label="Does the dataset contain header:" />
+                <conditional name="column_selector_options_true">
+                    <expand macro="samples_column_selector_options" multiple="true" column_option="selected_column_selector_option" col_name="col1" infile="infile_true" />
+                </conditional>
+
+                <param name="infile_predicted" type="data" format="tabular" label="Select dataset containing predicted labels" />
+                <param name="header_predicted" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" label="Does the dataset contain header:" />
+                <param name="title" type="text" value="Confusion matrix between true and predicted labels" label="Plot title" />
+                <param name="plot_format" type="hidden" value="png" label="The output format and library" />
+                <param name="plot_color" type="select" label="Choose plot color">
+                    <option value="Greys">Greys</option>
+                    <option value="Purples">Purples</option>
+                    <option value="Blues">Blues</option>
+                    <option value="Greens" selected="true">Greens</option>
+                    <option value="Oranges">Oranges</option>
+                    <option value="Reds">Reds</option>
+                    <option value="Summer">Summer</option>
+                    <option value="Autumn">Autumn</option>
+                    <option value="RdYlGn">RdYlGn</option>
+                    <option value="Spectral">Spectral</option>
+                    <option value="winter">winter</option>
+                </param>
+            </when>
         </conditional>
     </inputs>
     <outputs>
@@ -140,6 +171,28 @@
             <param name="infile_model_config" value="deepsear_1feature.json" ftype="json" />
             <output name="output" file="ml_vis05.png" compare="sim_size" delta="20000" />
         </test>
+        <test>
+            <param name="plot_type" value="classification_confusion_matrix" />
+            <param name="infile_true" value="ml_confusion_true.tabular" ftype="tabular" />
+            <param name="header_true" value="False" />
+            <param name="selected_column_selector_option" value="all_columns" />
+            <param name="infile_predicted" value="ml_confusion_predicted.tabular" ftype="tabular" />
+            <param name="header_predicted" value="False" />
+            <param name="title" value="Confusion matrix" />
+            <param name="plot_color" value="winter" />
+            <output name="output" file="ml_confusion_viz.png" compare="sim_size" />
+        </test>
+        <test>
+            <param name="plot_type" value="classification_confusion_matrix" />
+            <param name="infile_true" value="true_header.tabular" ftype="tabular" />
+            <param name="header_true" value="True" />
+            <param name="selected_column_selector_option" value="all_columns" />
+            <param name="infile_predicted" value="predicted_header.tabular" ftype="tabular" />
+            <param name="header_predicted" value="True" />
+            <param name="title" value="Confusion matrix" />
+            <param name="plot_color" value="winter" />
+            <output name="output" file="ml_confusion_viz.png" compare="sim_size" />
+        </test>
     </tests>
     <help>
         <![CDATA[