Mercurial > repos > bgruening > text_processing
annotate recurring_lines.xml @ 26:f22a309187a3 draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit c2b1677d1c94433f777c2dc28ac8eec0a99cc6a7
| author | bgruening |
|---|---|
| date | Fri, 16 Aug 2024 10:41:17 +0000 |
| parents | 1e974b82380d |
| children | 08cdbfffce67 |
| rev | line source |
|---|---|
|
26
f22a309187a3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit c2b1677d1c94433f777c2dc28ac8eec0a99cc6a7
bgruening
parents:
18
diff
changeset
|
1 <tool id="tp_text_file_with_recurring_lines" name="Create text file" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> |
| 6 | 2 <description>with recurring lines</description> |
| 3 <macros> | |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
|
26
f22a309187a3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit c2b1677d1c94433f777c2dc28ac8eec0a99cc6a7
bgruening
parents:
18
diff
changeset
|
6 <expand macro="creator"/> |
| 6 | 7 <expand macro="requirements" /> |
| 8 <version_command>yes --version | head -n 1</version_command> | |
| 9 <command> | |
| 10 <![CDATA[ | |
| 11 #for $token in $token_set: | |
| 12 #if str($token.repeat_select.repeat_select_opts) == 'user': | |
| 13 times=#echo $token.repeat_select.times#; | |
| 14 #else: | |
| 15 times=`wc -l $token.repeat_select.infile | awk '{print $1}'`; | |
| 16 #end if | |
|
26
f22a309187a3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit c2b1677d1c94433f777c2dc28ac8eec0a99cc6a7
bgruening
parents:
18
diff
changeset
|
17 yes -- '${token.line}' 2>/dev/null | head -n \$times >> '$outfile'; |
| 6 | 18 #end for |
| 19 ]]> | |
| 20 </command> | |
| 21 <inputs> | |
| 22 <repeat name="token_set" title=" selection" min="1"> | |
|
10
c78b1767db2b
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents:
7
diff
changeset
|
23 <param name="line" type="text" |
| 6 | 24 label="Characters to insert" help="Specify the characters that will be inserted X times in every line"/> |
| 25 <conditional name="repeat_select"> | |
| 26 <param name="repeat_select_opts" type="select" label="Specify the number of iterations by"> | |
| 27 <option value="file">File (for each line in file)</option> | |
| 28 <option value="user" selected="True">User defined number</option> | |
| 29 </param> | |
| 30 <when value="user"> | |
|
10
c78b1767db2b
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents:
7
diff
changeset
|
31 <param name="times" type="integer" value="10" min="1" label="How many times?"/> |
| 6 | 32 </when> |
| 33 <when value="file"> | |
| 7 | 34 <param name="infile" type="data" format="txt" label="Template file" |
| 6 | 35 help="For every line, the specified characters will be written once. That means X is the line-number from the given file."/> |
| 36 </when> | |
| 37 </conditional> | |
| 38 </repeat> | |
| 39 </inputs> | |
| 40 <outputs> | |
|
18
1e974b82380d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 0ba37c1f33eeb1c77b4d9363d681fe522d9f7fe7
bgruening
parents:
14
diff
changeset
|
41 <data format="txt" name="outfile"/> |
| 6 | 42 </outputs> |
| 43 <tests> | |
| 44 <test> | |
| 45 <repeat name="token_set"> | |
| 46 <param name="line" value="freedom" /> | |
| 47 <param name="repeat_select_opts" value="file" /> | |
| 48 <param name="infile" value="multijoin2.txt" /> | |
| 49 </repeat> | |
| 50 <output name="outfile" file="recurring_result1.txt" /> | |
| 51 </test> | |
| 52 <test> | |
| 53 <repeat name="token_set"> | |
| 54 <param name="line" value="freedom" /> | |
| 55 <param name="repeat_select_opts" value="user" /> | |
| 56 <param name="times" value="10" /> | |
| 57 </repeat> | |
| 58 <repeat name="token_set"> | |
| 59 <param name="line" value="war is over" /> | |
| 60 <param name="repeat_select_opts" value="user" /> | |
| 61 <param name="times" value="10" /> | |
| 62 </repeat> | |
| 63 <output name="outfile" file="recurring_result2.txt" /> | |
| 64 </test> | |
| 65 </tests> | |
| 66 <help> | |
| 67 <![CDATA[ | |
| 68 .. class:: infomark | |
| 69 | |
| 7 | 70 **What it does** |
| 6 | 71 |
| 7 | 72 This tool creates a text file with recurring lines. You can specify a bunch of characters or entire sentences. |
| 6 | 73 The entire string will be printed X times separated by a line break. X can be either given by the use as a number or calculated by a given file. |
| 74 In case the user provides a file, the line number will be used as X. | |
| 75 | |
| 76 ]]> | |
| 77 </help> | |
|
14
7725ab6dab67
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit b'e6ee273f75fff61d1e419283fa8088528cf59470\n'
bgruening
parents:
10
diff
changeset
|
78 <expand macro="citations" /> |
| 6 | 79 </tool> |
