Mercurial > repos > bgruening > wordcloud
comparison wordcloud.xml @ 0:54c2d8ebf0cf draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/wordcloud commit 6d08a14015698273ace1032aeefd2eb7bd404862
author | bgruening |
---|---|
date | Fri, 13 Dec 2024 21:43:12 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:54c2d8ebf0cf |
---|---|
1 <tool id="wordcloud" name="Generate a word cloud" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@" license="MIT"> | |
2 <description>with highly customizable appearance</description> | |
3 <macros> | |
4 <token name="@TOOL_VERSION@">1.9.4</token> | |
5 <token name="@VERSION_SUFFIX@">0</token> | |
6 <token name="@PROFILE@">23.0</token> | |
7 </macros> | |
8 <requirements> | |
9 <requirement type="package" version="1.9.4">wordcloud</requirement> | |
10 </requirements> | |
11 <version_command>wordcloud_cli --version</version_command> | |
12 <command detect_errors="exit_code"><![CDATA[ | |
13 wordcloud_cli | |
14 --imagefile 'output.png' | |
15 --text $text | |
16 #if $stopwords | |
17 --stopwords $stopwords | |
18 #end if | |
19 #if $fontfile | |
20 --fontfile $fontfile | |
21 #end if | |
22 #if $min_font_size | |
23 --min_font_size $min_font_size | |
24 #end if | |
25 #if $max_font_size | |
26 --max_font_size $max_font_size | |
27 #end if | |
28 #if $font_step | |
29 --font_step $font_step | |
30 #end if | |
31 #if $min_word_length | |
32 --min_word_length $min_word_length | |
33 #end if | |
34 #if str($max_words): | |
35 --max_words $max_words | |
36 #end if | |
37 #if str($width): | |
38 --width $width | |
39 #end if | |
40 #if str($height): | |
41 --height $height | |
42 #end if | |
43 #if str($margin): | |
44 --margin $margin | |
45 #end if | |
46 #if $background | |
47 --background '$background' | |
48 #end if | |
49 #if $mask | |
50 --mask $mask | |
51 #end if | |
52 #if $color_choice == "color": | |
53 --color '$color' | |
54 #else if $color_choice == "colormask": | |
55 --colormask $colormask | |
56 #end if | |
57 #if $colormap | |
58 --colormap $colormap | |
59 #end if | |
60 #if $mode | |
61 --mode $mode | |
62 #end if | |
63 #if $contour_width | |
64 --contour_width $contour_width | |
65 #end if | |
66 #if $contour_color | |
67 --contour_color '$contour_color' | |
68 #end if | |
69 #if str($prefer_horizontal): | |
70 --prefer_horizontal $prefer_horizontal | |
71 #end if | |
72 #if str($scale): | |
73 --scale $scale | |
74 #end if | |
75 #if str($relative_scaling): | |
76 --relative_scaling $relative_scaling | |
77 #end if | |
78 $no_collocations | |
79 $include_numbers | |
80 $no_normalize_plurals | |
81 $repeat | |
82 #if $random_state | |
83 --random_state $random_state | |
84 #end if | |
85 ]]> | |
86 </command> | |
87 <inputs> | |
88 <param argument="--text" type="data" format="txt" label="Input file" help="Input file to process"/> | |
89 <param argument="--stopwords" type="data" format="txt" optional="true" label="Stopwords file" help="Specify file of stopwords (containing one word per line) to remove from the given text after parsing"/> | |
90 <param argument="--fontfile" type="data" format="binary" optional="true" label="Font file you wish to use " help="The font file you want to use"/> | |
91 <param argument="--min_font_size" type="integer" min="1" value="4" optional="true" label=" Smallest font size to use" /> | |
92 <param argument="--max_font_size" type="integer" min="1" optional="true" label="Maximum font size for the largest word" /> | |
93 <param argument="--font_step" type="integer" value="1" label="Step size for the font" help="Font_step > 1 might speed up computation but give a worse fit"/> | |
94 <param argument="--min_word_length" type="integer" value="0" optional ="True" label="Minimum number of letters a word must have to be included"/> | |
95 <param argument="--max_words" type="integer" min="1" value="200" optional="true" label="Maximum number of words"/> | |
96 <param argument="--width" type="integer" min="1" value="400" optional="true" label="Define output image width"/> | |
97 <param argument="--height" type="integer" min="1" value="200" optional="true" label="Define output image height"/> | |
98 <param argument="--margin" type="integer" value="2" label="Spacing to leave around words"/> | |
99 <param argument="--background" type="color" value="#000000" optional="true" label="Use given color as background color for the image"> | |
100 <validator type="regex" message="Please select a valid RGB color">[#][0-9A-Fa-f]{6}</validator> | |
101 </param> | |
102 <param argument="--mask" type="data" format="png" optional="true" label="Mask to use for the image form"/> | |
103 <conditional name="color_choice" label="Choose color option"> | |
104 <param name="color_option" type="select" label="Color option"> | |
105 <option value="color">Color</option> | |
106 <option value="colormask">Color Mask</option> | |
107 </param> | |
108 <when value="color"> | |
109 <param argument="--color" type="color" value="#00FF00" optional="true" label="Use given color as coloring for the image"> | |
110 <validator type="regex" message="Please select a valid RGB color">[#][0-9A-Fa-f]{6}</validator> | |
111 </param> | |
112 </when> | |
113 <when value="colormask"> | |
114 <param argument="--colormask" type="data" format="png" optional="true" label="Color Mask" help="Upload a color mask image"/> | |
115 </when> | |
116 </conditional> | |
117 <param argument="--colormap" type="select" value="viridis" optional="true" label="Matplotlib colormap name"> | |
118 <option value="viridis">viridis</option> | |
119 <option value="plasma">plasma</option> | |
120 <option value="inferno">inferno</option> | |
121 <option value="magma">magma</option> | |
122 <option value="cividis">cividis</option> | |
123 <option value="Greys">Greys</option> | |
124 <option value="Purples">Purples</option> | |
125 <option value="Blues">Blues</option> | |
126 <option value="Greens">Greens</option> | |
127 <option value="Oranges">Oranges</option> | |
128 <option value="Reds">Reds</option> | |
129 <option value="YlOrBr">YlOrBr</option> | |
130 <option value="YlOrRd">YlOrRd</option> | |
131 <option value="OrRd">OrRd</option> | |
132 <option value="PuRd">PuRd</option> | |
133 <option value="RdPu">RdPu</option> | |
134 <option value="BuPu">BuPu</option> | |
135 <option value="GnBu">GnBu</option> | |
136 <option value="PuBu">PuBu</option> | |
137 <option value="YlGnBu">YlGnBu</option> | |
138 <option value="PuBuGn">PuBuGn</option> | |
139 <option value="BuGn">BuGn</option> | |
140 <option value="YlGn">YlGn</option> | |
141 </param> | |
142 <param argument="--mode" type="select" value="RGB" optional="True" label="Use RGB or RGBA for transparent background"> | |
143 <option value="RGB">RGB</option> | |
144 <option value="RGBA">RGBA</option> | |
145 </param> | |
146 <param argument="--contour_width" type="float" min="0" value="0" optional="true" label="Contour width" help="Use given color as mask contour color"/> | |
147 <param argument="--contour_color" type="color" value="#000000" optional="true" label="Contour color"> | |
148 <validator type="regex" message="Please select a valid RGB color">[#][0-9A-Fa-f]{6}</validator> | |
149 </param> | |
150 <param argument="--prefer_horizontal" type="float" min="0" max="1" value="0.9" optional="true" label="Ratio of times to try horizontal fitting as opposed to vertical"/> | |
151 <param argument="--scale" type="float" value="1.0" optional="True" label="Scaling between computation and drawing"/> | |
152 <param argument="--relative_scaling" type="float" min="0.0" max="1.0" value="0.0" optional="true" label="Scaling of words by frequency (0 - 1)"/> | |
153 <param argument="--no_collocations" type="boolean" truevalue="--no_collocations" falsevalue="" value="True" label="Do not add collocations (bigrams) to word cloud"/> | |
154 <param argument="--include_numbers" type="boolean" truevalue="--include_numbers" falsevalue="" value="False" label="Whether to include numbers as phrases or not"/> | |
155 <param argument="--no_normalize_plurals" type="boolean" truevalue="--no_normalize_plurals" falsevalue="" label="Whether to remove trailing s from words"/> | |
156 <param argument="--repeat" type="boolean" truevalue="--repeat" falsevalue="" label="Whether to repeat words and phrases until max_words or min_font_size is reached"/> | |
157 <param argument="--random_state" type="integer" value="10" label="Random seed" /> | |
158 </inputs> | |
159 <outputs> | |
160 <data name="output" format="png" label="Word cloud image" from_work_dir="output.png"/> | |
161 </outputs> | |
162 <tests> | |
163 <test expect_num_outputs="1"> | |
164 <param name="text" value="test.txt" ftype="txt"/> | |
165 <param name="random_state" value="10"/> | |
166 <output name="output" file="output_1.png" compare="image_diff" /> | |
167 </test> | |
168 <test expect_num_outputs="1"> | |
169 <param name="text" value="test.txt" ftype="txt"/> | |
170 <param name="stopwords" value="stopwords.txt"/> | |
171 <param name="fontfile" value="font.ttf"/> | |
172 <param name="min_font_size" value="4"/> | |
173 <param name="max_font_size" value="100"/> | |
174 <param name="font_step" value="1"/> | |
175 <param name="min_word_length" value="0"/> | |
176 <param name="max_words" value="200"/> | |
177 <param name="width" value="800"/> | |
178 <param name="height" value="600"/> | |
179 <param name="margin" value="0"/> | |
180 <param name="background" value="#FFFFFF"/> | |
181 <param name="mask" value="mask.png"/> | |
182 <param name="color" value="#1F4068"/> | |
183 <param name="colormap" value="viridis"/> | |
184 <param name="mode" value="RGB"/> | |
185 <param name="contour_width" value="8"/> | |
186 <param name="contour_color" value="#1F4068"/> | |
187 <param name="prefer_horizontal" value="0.9"/> | |
188 <param name="scale" value="1.0"/> | |
189 <param name="relative_scaling" value="0.0"/> | |
190 <param name="no_collocations" value="True"/> | |
191 <param name="include_numbers" value="False"/> | |
192 <param name="no_normalize_plurals" value="True"/> | |
193 <param name="repeat" value="True"/> | |
194 <param name="random_state" value="10"/> | |
195 <output name="output" file="output_2.png" compare="image_diff" /> | |
196 </test> | |
197 </tests> | |
198 <help><![CDATA[ | |
199 A word cloud is a visual representation (image) of word data. In other words, it is a collection, or cluster, of words depicted in different sizes. | |
200 The bigger and bolder the word appears, the more often it's mentioned within a given text and the more important it is. | |
201 ]]></help> | |
202 <citations> | |
203 <citation type="bibtex"> | |
204 @misc{amueller2018wordcloud, | |
205 title={Word Clouds with Python}, | |
206 author={Amueller, Sebastian}, | |
207 year={2018}, | |
208 url={https://amueller.github.io/word_cloud/} | |
209 } | |
210 </citation> | |
211 </citations> | |
212 </tool> |