Mercurial > repos > iuc > maplot
diff maplot.xml @ 0:e9212adafd7a draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc commit d5065f0bdf2d38c2344d96d68537223c1096daab
author | iuc |
---|---|
date | Thu, 15 May 2025 12:55:13 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/maplot.xml Thu May 15 12:55:13 2025 +0000 @@ -0,0 +1,142 @@ +<tool id="maplot" name="MA plot" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01" license="MIT"> + <description>Generate MA plots for visualizing data distributions.</description> + <macros> + <token name="@TOOL_VERSION@">1.0.0</token> + <token name="@VERSION_SUFFIX@">0</token> + </macros> + <edam_topics> + <edam_topic>topic_0092</edam_topic> + </edam_topics> + <edam_operations> + <edam_operation>operation_0337</edam_operation> + </edam_operations> + <requirements> + <requirement type="package" version="6.0.0">plotly</requirement> + <requirement type="package" version="1.13.1">scipy</requirement> + <requirement type="package" version="2.2.3">pandas</requirement> + <requirement type="package" version="0.14.4">statsmodels</requirement> + <requirement type="package" version="3.9.4">matplotlib-base</requirement> + <requirement type="package" version="0.2.1">python-kaleido</requirement> + </requirements> + <creator> + <person + givenName="Helge" + familyName="Hecht" + url="https://github.com/hechth" + identifier="0000-0001-6744-996X" /> + <organization + url="https://www.recetox.muni.cz/" + email="GalaxyToolsDevelopmentandDeployment@space.muni.cz" + name="RECETOX MUNI" /> + </creator> + <command detect_errors="exit_code"><![CDATA[ + python3 '$__tool_directory__/maplot.py' + --file_path '$file_path' + --file_extension '$file_path.ext' + --frac $frac + --it $it + --num_bins $num_bins + --window_width $window_width + --size $size + --scale $scale + --y_scale_factor $y_scale_factor + --max_num_cols $max_num_cols + #if $backend_conditional.backend == "plotly" + --interactive + #end if + --output_format '$output_format' + --output_file '$output_file' + ]]></command> + + <inputs> + <param argument="--file_path" type="data" label="Input File" format="csv,tsv,tabular,parquet" help="The input file containing the data to be visualized." /> + <param argument="--frac" type="float" value="0.8" label="LOESS Smoothing Fraction" help="The fraction of data points used for LOESS smoothing. This controls the degree of smoothing applied to the data." /> + <param argument="--it" type="integer" value="5" label="Number of Iterations" help="The number of iterations for LOESS smoothing. Increasing this value may improve accuracy but will also increase computation time." /> + <param argument="--num_bins" type="integer" value="100" label="Number of Bins" help="The number of bins to use for the histogram. This determines the granularity of the histogram visualization." /> + <param argument="--window_width" type="integer" value="5" label="Window Width" help="The width of the moving average window. This affects how the data is smoothed over a range of values." /> + <param argument="--size" type="integer" value="500" label="Plot Size" help="The size of the plot in pixels. Larger values produce higher-resolution plots." /> + <param argument="--scale" type="integer" value="3" label="Scale Factor" help="The scale factor for the plot. This controls the resolution of the output plot." /> + <param argument="--y_scale_factor" type="float" value="1.1" label="Y-Axis Scale Factor" help="A factor to scale the Y-axis. This can be used to adjust the vertical range of the plot." /> + <param argument="--max_num_cols" type="integer" value="100" label="Maximum Number of Columns" help="The maximum number of columns to display in the plot. This limits the number of subplots in the visualization." /> + + <conditional name="backend_conditional"> + <param name="backend" type="select" label="Backend for Plotting" help="Choose the backend for generating the plot. Plotly supports interactive plots, while Matplotlib generates static plots."> + <option value="plotly" selected="true">Plotly</option> + <option value="matplotlib">Matplotlib</option> + </param> + <when value="plotly"> + <param argument="--output_format" type="select" label="Output Format" help="The output format for the plot when using Plotly. Options include PDF, PNG, and HTML."> + <option value="pdf" selected="true">PDF</option> + <option value="png">PNG</option> + <option value="html">HTML</option> + </param> + </when> + <when value="matplotlib"> + <param argument="--output_format" type="select" label="Output Format" help="The output format for the plot when using Matplotlib. Options include PDF and PNG."> + <option value="pdf" selected="true">PDF</option> + <option value="png">PNG</option> + </param> + </when> + </conditional> + </inputs> + <outputs> + <data name="output_file" format="pdf" label="MA plot with ${backend_conditional.backend} on ${on_string}"> + <change_format> + <when input="output_format" value="png" format="png" /> + <when input="output_format" value="html" format="html" /> + </change_format> + </data> + </outputs> + <tests> + <test> + <param name="file_path" value="ma_plot_testdata_4.csv" /> + <conditional name="backend_conditional"> + <param name="backend" value="plotly" /> + <param name="output_format" value="pdf" /> + </conditional> + <output name="output_file" file="output_plotly.pdf" /> + </test> + + <!-- Test case for Matplotlib backend with default parameters --> + <test> + <param name="file_path" value="ma_plot_testdata_4.csv" /> + <conditional name="backend_conditional"> + <param name="backend" value="matplotlib" /> + <param name="output_format" value="pdf" /> + </conditional> + <output name="output_file" file="output_matplotlib.pdf" /> + </test> + </tests> + <help><![CDATA[ +.. class:: infomark + +**What it does** + +This tool generates MA plots for visualizing data distributions. It supports two backends for plotting: Plotly and Matplotlib. Users can customize various parameters such as smoothing, binning, and scaling to tailor the visualization to their needs. + +**Input** + +- **Input File**: A CSV, TSV, tabular, or Parquet file containing the data to be visualized. + +**Parameters** + +- **LOESS Smoothing Fraction**: Fraction of data points used for LOESS smoothing. +- **Number of Iterations**: Number of iterations for LOESS smoothing. +- **Number of Bins**: Number of bins for the histogram. +- **Window Width**: Width of the moving average window. +- **Plot Size**: Size of the plot in pixels. +- **Scale Factor**: Scale factor for the plot resolution. +- **Y-Axis Scale Factor**: Factor to scale the Y-axis. +- **Maximum Number of Columns**: Maximum number of columns to display in the plot. +- **Backend for Plotting**: Choose between Plotly and Matplotlib. +- **Output Format**: Format of the output plot (PDF, PNG, or HTML). + +**Output** + +The tool generates a plot in the specified format (PDF, PNG, or HTML). + ]]></help> + <citations> + <citation type="doi">10.2307/2987937</citation> + <citation type="doi">10.1016/S0140-6736(86)90837-8</citation> + </citations> +</tool> \ No newline at end of file