comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:e9212adafd7a
1 <tool id="maplot" name="MA plot" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01" license="MIT">
2 <description>Generate MA plots for visualizing data distributions.</description>
3 <macros>
4 <token name="@TOOL_VERSION@">1.0.0</token>
5 <token name="@VERSION_SUFFIX@">0</token>
6 </macros>
7 <edam_topics>
8 <edam_topic>topic_0092</edam_topic>
9 </edam_topics>
10 <edam_operations>
11 <edam_operation>operation_0337</edam_operation>
12 </edam_operations>
13 <requirements>
14 <requirement type="package" version="6.0.0">plotly</requirement>
15 <requirement type="package" version="1.13.1">scipy</requirement>
16 <requirement type="package" version="2.2.3">pandas</requirement>
17 <requirement type="package" version="0.14.4">statsmodels</requirement>
18 <requirement type="package" version="3.9.4">matplotlib-base</requirement>
19 <requirement type="package" version="0.2.1">python-kaleido</requirement>
20 </requirements>
21 <creator>
22 <person
23 givenName="Helge"
24 familyName="Hecht"
25 url="https://github.com/hechth"
26 identifier="0000-0001-6744-996X" />
27 <organization
28 url="https://www.recetox.muni.cz/"
29 email="GalaxyToolsDevelopmentandDeployment@space.muni.cz"
30 name="RECETOX MUNI" />
31 </creator>
32 <command detect_errors="exit_code"><![CDATA[
33 python3 '$__tool_directory__/maplot.py'
34 --file_path '$file_path'
35 --file_extension '$file_path.ext'
36 --frac $frac
37 --it $it
38 --num_bins $num_bins
39 --window_width $window_width
40 --size $size
41 --scale $scale
42 --y_scale_factor $y_scale_factor
43 --max_num_cols $max_num_cols
44 #if $backend_conditional.backend == "plotly"
45 --interactive
46 #end if
47 --output_format '$output_format'
48 --output_file '$output_file'
49 ]]></command>
50
51 <inputs>
52 <param argument="--file_path" type="data" label="Input File" format="csv,tsv,tabular,parquet" help="The input file containing the data to be visualized." />
53 <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." />
54 <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." />
55 <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." />
56 <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." />
57 <param argument="--size" type="integer" value="500" label="Plot Size" help="The size of the plot in pixels. Larger values produce higher-resolution plots." />
58 <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." />
59 <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." />
60 <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." />
61
62 <conditional name="backend_conditional">
63 <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.">
64 <option value="plotly" selected="true">Plotly</option>
65 <option value="matplotlib">Matplotlib</option>
66 </param>
67 <when value="plotly">
68 <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.">
69 <option value="pdf" selected="true">PDF</option>
70 <option value="png">PNG</option>
71 <option value="html">HTML</option>
72 </param>
73 </when>
74 <when value="matplotlib">
75 <param argument="--output_format" type="select" label="Output Format" help="The output format for the plot when using Matplotlib. Options include PDF and PNG.">
76 <option value="pdf" selected="true">PDF</option>
77 <option value="png">PNG</option>
78 </param>
79 </when>
80 </conditional>
81 </inputs>
82 <outputs>
83 <data name="output_file" format="pdf" label="MA plot with ${backend_conditional.backend} on ${on_string}">
84 <change_format>
85 <when input="output_format" value="png" format="png" />
86 <when input="output_format" value="html" format="html" />
87 </change_format>
88 </data>
89 </outputs>
90 <tests>
91 <test>
92 <param name="file_path" value="ma_plot_testdata_4.csv" />
93 <conditional name="backend_conditional">
94 <param name="backend" value="plotly" />
95 <param name="output_format" value="pdf" />
96 </conditional>
97 <output name="output_file" file="output_plotly.pdf" />
98 </test>
99
100 <!-- Test case for Matplotlib backend with default parameters -->
101 <test>
102 <param name="file_path" value="ma_plot_testdata_4.csv" />
103 <conditional name="backend_conditional">
104 <param name="backend" value="matplotlib" />
105 <param name="output_format" value="pdf" />
106 </conditional>
107 <output name="output_file" file="output_matplotlib.pdf" />
108 </test>
109 </tests>
110 <help><![CDATA[
111 .. class:: infomark
112
113 **What it does**
114
115 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.
116
117 **Input**
118
119 - **Input File**: A CSV, TSV, tabular, or Parquet file containing the data to be visualized.
120
121 **Parameters**
122
123 - **LOESS Smoothing Fraction**: Fraction of data points used for LOESS smoothing.
124 - **Number of Iterations**: Number of iterations for LOESS smoothing.
125 - **Number of Bins**: Number of bins for the histogram.
126 - **Window Width**: Width of the moving average window.
127 - **Plot Size**: Size of the plot in pixels.
128 - **Scale Factor**: Scale factor for the plot resolution.
129 - **Y-Axis Scale Factor**: Factor to scale the Y-axis.
130 - **Maximum Number of Columns**: Maximum number of columns to display in the plot.
131 - **Backend for Plotting**: Choose between Plotly and Matplotlib.
132 - **Output Format**: Format of the output plot (PDF, PNG, or HTML).
133
134 **Output**
135
136 The tool generates a plot in the specified format (PDF, PNG, or HTML).
137 ]]></help>
138 <citations>
139 <citation type="doi">10.2307/2987937</citation>
140 <citation type="doi">10.1016/S0140-6736(86)90837-8</citation>
141 </citations>
142 </tool>