diff ml_visualization_ex.xml @ 6:222c02df5d55 draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 9e28f4466084464d38d3f8db2aff07974be4ba69"
author bgruening
date Wed, 11 Mar 2020 13:59:57 -0400
parents 6b94d76a1397
children 6cf6f27547cb
line wrap: on
line diff
--- a/ml_visualization_ex.xml	Wed Jan 22 08:03:54 2020 -0500
+++ b/ml_visualization_ex.xml	Wed Mar 11 13:59:57 2020 -0400
@@ -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,33 @@
                 <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 +173,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[