Mercurial > repos > bgruening > text_processing
changeset 29:4f7cade041cb draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 4dd118c84ed4d6157303e71438c24446ec4b4f31
| author | bgruening |
|---|---|
| date | Wed, 04 Jun 2025 15:11:51 +0000 |
| parents | e8b38ade9b3e |
| children | |
| files | awk.xml macros.xml recurring_lines.xml sort.xml |
| diffstat | 4 files changed, 33 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/awk.xml Tue Mar 25 14:33:35 2025 +0000 +++ b/awk.xml Wed Jun 04 15:11:51 2025 +0000 @@ -15,6 +15,9 @@ --sandbox -v FS=' ' -v OFS=' ' + #for $i, $r in enumerate($variables, start=1) + -v VAR$i='$r.value' + #end for --re-interval -f '$awk_script' '$infile' @@ -33,17 +36,38 @@ </valid> </sanitizer> </param> + <repeat name="variables" min="0" default="0" title="Variables"> + <param name="value" type="text" label="Value"> + <validator type="regex">[a-zA-Z0-9 .]+</validator> + </param> + </repeat> </inputs> <outputs> <data name="outfile" format_source="infile" metadata_source="infile"/> </outputs> <tests> <test> - <param name="infile" value="awk1.txt" /> + <param name="infile" value="awk1.txt"/> <!-- commas are not allowed in a value field. Values with comma will be splitted --> <param name="code" value='$2>0.5 { print $2*9"\t"$1 }' /> <output name="outfile" file="awk_results1.txt" /> </test> + <test> + <param name="infile" value="awk1.txt"/> + <!-- commas are not allowed in a value field. Values with comma will be splitted --> + <param name="code" value='$2>VAR2 { print VAR1"\t"$2*9"\t"$1 }' /> + <repeat name="variables"> + <param name="value" value="xyz"/> + </repeat> + <repeat name="variables"> + <param name="value" value="0.1"/> + </repeat> + <output name="outfile"> + <assert_contents> + <has_line_matching expression="^xyz.*" n="6"/> + </assert_contents> + </output> + </test> </tests> <help> <