diff ml_visualization_ex.xml @ 4:6b94d76a1397 draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 5b2ac730ec6d3b762faa9034eddd19ad1b347476"
author bgruening
date Mon, 16 Dec 2019 05:40:29 -0500
parents 09efff9a5765
children 222c02df5d55
line wrap: on
line diff
--- a/ml_visualization_ex.xml	Thu Nov 07 05:43:19 2019 -0500
+++ b/ml_visualization_ex.xml	Mon Dec 16 05:40:29 2019 -0500
@@ -4,11 +4,7 @@
         <import>main_macros.xml</import>
         <import>keras_macros.xml</import>
     </macros>
-    <expand macro="python_requirements">
-        <requirement type="package" version="3.1.1">plotly</requirement>
-        <requirement type="package" version="2.40.1">graphviz</requirement>
-        <requirement type="package" version="1.4.1">pydot</requirement>
-    </expand>
+    <expand macro="python_requirements"/>
     <expand macro="macro_stdio"/>
     <version_command>echo "@VERSION@"</version_command>
     <command>
@@ -45,24 +41,42 @@
                 <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."/>
                 <param name="plot_std_err" type="boolean" truevalue="booltrue" falsevalue="boolfalse" optional="true" checked="false" label="Whether to plot standard error bar?"/>
                 <param name="title" type="text" value="" optional="true" label="Plot title" help="Optional. If change is desired."/>
+                <param name="plot_format" type="select" label="The output format and library">
+                    <option value="html" selected="true">An interactive html by plotly</option>
+                    <!--<option value="png">PNG image by matplotlib</option> TODO-->
+                </param>
             </when>
             <when value="pr_curve">
-                <param name="infile1" type="data" format="tabular" label="Select the dataset containing true labels." help="No headers. For 2-class, single column contains both class labels (e.g. True and False). For multi-label, each column, hot-encoded, corresponds to one label."/>
-                <param name="infile2" type="data" format="tabular" label="Select the dataset containing predicted probabilities." help="No headers. For 2-class, sinle column or the first column contains scores for the positive label. For multi-label, each column corresponds to one label."/>
+                <param name="infile1" type="data" format="tabular" label="Select the dataset containing true labels." help="y_true. Headered. For 2-class, single column contains both class labels (e.g. True and False). For multi-label, each column, hot-encoded, corresponds to one label."/>
+                <param name="infile2" type="data" format="tabular" label="Select the dataset containing predicted probabilities." help="y_preds. Headered. For 2-class, sinle column or the first column contains scores for the positive label. For multi-label, each column corresponds to one label."/>
                 <param name="pos_label" type="text" value="" optional="true" label="pos_label" help="The label of positive class. If not specified, it will be 1 by default."/>
                 <param name="title" type="text" value="" optional="true" label="Plot title" help="Optional. If change is desired."/>
+                <param name="report_minimum_n_positives" type="integer" value="" optional="true" label="Report minimum number of positives" help="For mulitple label binary classifications, whose number of true postives is less than the threhold will be ignored."/>
+                <param name="plot_format" type="select" label="The output format and library">
+                    <option value="plotly_html" selected="true">An interactive html by plotly</option>
+                    <option value="matplotlib_svg">SVG image by matplotlib</option>
+                </param>
             </when>
             <when value="roc_curve">
-                <param name="infile1" type="data" format="tabular" label="Select the dataset containing true labels." help="No headers. For 2-class, single column contains both class labels (e.g. True and False). For multi-label, each column, hot-encoded, corresponds to one label."/>
-                <param name="infile2" type="data" format="tabular" label="Select the dataset containing predicted probabilities." help="No headers. For 2-class, sinle column or the first column contains scores for the positive label. For multi-label, each column corresponds to one label."/>
+                <param name="infile1" type="data" format="tabular" label="Select the dataset containing true labels." help="y_true. Headered. For 2-class, single column contains both class labels (e.g. True and False). For multi-label, each column, hot-encoded, corresponds to one label."/>
+                <param name="infile2" type="data" format="tabular" label="Select the dataset containing predicted probabilities." help="y_preds. Headered. For 2-class, sinle column or the first column contains scores for the positive label. For multi-label, each column corresponds to one label."/>
                 <param name="pos_label" type="text" value="" optional="true" label="pos_label" help="The label of positive class. If not specified, it will be 1 by default."/>
                 <param name="drop_intermediate" type="boolean" truevalue="booltrue" falsevalue="boolfalse" optional="true" checked="true" label="drop_intermediate" help="Whether to drop some suboptimal thresholds which would not appear on a plotted ROC curve."/>
                 <param name="title" type="text" value="" optional="true" label="Plot title" help="Optional. If change is desired."/>
+                <param name="report_minimum_n_positives" type="integer" value="" optional="true" label="Report minimum number of positives" help="For mulitple label binary classifications, whose number of true postives is less than the threhold will be ignored."/>
+                <param name="plot_format" type="select" label="The output format and library">
+                    <option value="plotly_html" selected="true">An interactive html by plotly</option>
+                    <option value="matplotlib_svg">SVG image by matplotlib</option>
+                </param>
             </when>
             <when value="rfecv_gridscores">
                 <param name="infile1" type="data" format="tabular" label="Select the dataset containing grid_scores from a fitted RFECV object." help="Headered. Single column. Could be Output from `estimator_attributes->grid_scores_`."/>
                 <param name="steps" type="text" value="" optional="true" label="Step IDs" help="List, containing hover labels for each grid_score. For example: `list(range(10)) + [15, 20]`."/>
                 <param name="title" type="text" value="" optional="true" label="Plot title" help="Optional. If change is desired."/>
+                <param name="plot_format" type="select" label="The output format and library">
+                    <option value="html" selected="true">An interactive html by plotly</option>
+                    <!--<option value="png">PNG image by matplotlib</option> TODO-->
+                </param>
             </when>
             <when value="feature_importances">
                 <param name="infile_estimator" type="data" format="zip" label="Select the dataset containing fitted estimator/pipeline" />
@@ -72,17 +86,22 @@
                 </conditional>
                 <param name="threshold" type="float" value="" optional="true" min="0." label="Threshold value" help="Features with importance below the threshold value will be ignored."/>
                 <param name="title" type="text" value="" optional="true" label="Custom plot title" help="Optional."/>
+                <param name="plot_format" type="select" label="The output format and library">
+                    <option value="html" selected="true">An interactive html by plotly</option>
+                    <!--<option value="png">PNG image by matplotlib</option> TODO-->
+                </param>
             </when>
             <when value="keras_plot_model">
                 <param name="infile_model_config" type="data" format="json" label="Select the JSON dataset containing configuration for a neural network model"/>
                 <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>
         </conditional>
     </inputs>
     <outputs>
         <data name="output" format="html" from_work_dir="output" label="${plotting_selection.plot_type} plot on ${on_string}">
             <change_format>
-                <when input="plotting_selection.plot_type" value="keras_plot_model" format="png"/>
+                <when input="plotting_selection.plot_format" value="png" format="png"/>
             </change_format>
         </data>
     </outputs>