Mercurial > repos > bgruening > text_processing
annotate recurring_lines.xml @ 28:e8b38ade9b3e draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
author | bgruening |
---|---|
date | Tue, 25 Mar 2025 14:33:35 +0000 |
parents | 08cdbfffce67 |
children |
rev | line source |
---|---|
28
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
1 <tool id="tp_text_file_with_recurring_lines" name="Create text file" version="@TOOL_VERSION@+galaxy1" 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" |
28
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
24 label="Characters to insert" help="Specify the characters that will be inserted X times in every line"> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
25 <sanitizer> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
26 <valid initial="default"> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
27 <add value="	" /> <!-- 	 is the HTML entity for a tab --> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
28 </valid> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
29 </sanitizer> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
30 </param> |
6 | 31 <conditional name="repeat_select"> |
32 <param name="repeat_select_opts" type="select" label="Specify the number of iterations by"> | |
33 <option value="file">File (for each line in file)</option> | |
34 <option value="user" selected="True">User defined number</option> | |
35 </param> | |
36 <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
|
37 <param name="times" type="integer" value="10" min="1" label="How many times?"/> |
6 | 38 </when> |
39 <when value="file"> | |
7 | 40 <param name="infile" type="data" format="txt" label="Template file" |
6 | 41 help="For every line, the specified characters will be written once. That means X is the line-number from the given file."/> |
42 </when> | |
43 </conditional> | |
44 </repeat> | |
45 </inputs> | |
46 <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
|
47 <data format="txt" name="outfile"/> |
6 | 48 </outputs> |
49 <tests> | |
50 <test> | |
51 <repeat name="token_set"> | |
52 <param name="line" value="freedom" /> | |
27
08cdbfffce67
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 2dc2df988bd2dde9f8d7f629b594186dbd4fdc2b
bgruening
parents:
26
diff
changeset
|
53 <conditional name="repeat_select"> |
08cdbfffce67
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 2dc2df988bd2dde9f8d7f629b594186dbd4fdc2b
bgruening
parents:
26
diff
changeset
|
54 <param name="repeat_select_opts" value="file" /> |
08cdbfffce67
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 2dc2df988bd2dde9f8d7f629b594186dbd4fdc2b
bgruening
parents:
26
diff
changeset
|
55 <param name="infile" value="multijoin2.txt" /> |
08cdbfffce67
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 2dc2df988bd2dde9f8d7f629b594186dbd4fdc2b
bgruening
parents:
26
diff
changeset
|
56 </conditional> |
6 | 57 </repeat> |
58 <output name="outfile" file="recurring_result1.txt" /> | |
59 </test> | |
60 <test> | |
61 <repeat name="token_set"> | |
62 <param name="line" value="freedom" /> | |
27
08cdbfffce67
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 2dc2df988bd2dde9f8d7f629b594186dbd4fdc2b
bgruening
parents:
26
diff
changeset
|
63 <conditional name="repeat_select"> |
08cdbfffce67
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 2dc2df988bd2dde9f8d7f629b594186dbd4fdc2b
bgruening
parents:
26
diff
changeset
|
64 <param name="repeat_select_opts" value="user" /> |
08cdbfffce67
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 2dc2df988bd2dde9f8d7f629b594186dbd4fdc2b
bgruening
parents:
26
diff
changeset
|
65 <param name="times" value="10" /> |
08cdbfffce67
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 2dc2df988bd2dde9f8d7f629b594186dbd4fdc2b
bgruening
parents:
26
diff
changeset
|
66 </conditional> |
6 | 67 </repeat> |
68 <repeat name="token_set"> | |
69 <param name="line" value="war is over" /> | |
27
08cdbfffce67
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 2dc2df988bd2dde9f8d7f629b594186dbd4fdc2b
bgruening
parents:
26
diff
changeset
|
70 <conditional name="repeat_select"> |
08cdbfffce67
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 2dc2df988bd2dde9f8d7f629b594186dbd4fdc2b
bgruening
parents:
26
diff
changeset
|
71 <param name="repeat_select_opts" value="user" /> |
08cdbfffce67
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 2dc2df988bd2dde9f8d7f629b594186dbd4fdc2b
bgruening
parents:
26
diff
changeset
|
72 <param name="times" value="10" /> |
08cdbfffce67
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 2dc2df988bd2dde9f8d7f629b594186dbd4fdc2b
bgruening
parents:
26
diff
changeset
|
73 </conditional> |
6 | 74 </repeat> |
75 <output name="outfile" file="recurring_result2.txt" /> | |
76 </test> | |
28
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
77 <test> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
78 <repeat name="token_set"> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
79 <param name="line" value="a	b	c	d	e	f" /> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
80 <conditional name="repeat_select"> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
81 <param name="repeat_select_opts" value="user" /> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
82 <param name="times" value="2" /> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
83 </conditional> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
84 </repeat> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
85 <repeat name="token_set"> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
86 <param name="line" value="2	3	4	5	6	7" /> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
87 <conditional name="repeat_select"> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
88 <param name="repeat_select_opts" value="user" /> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
89 <param name="times" value="1" /> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
90 </conditional> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
91 </repeat> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
92 <repeat name="token_set"> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
93 <param name="line" value="1	2	3	4	5	6" /> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
94 <conditional name="repeat_select"> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
95 <param name="repeat_select_opts" value="user" /> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
96 <param name="times" value="1" /> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
97 </conditional> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
98 </repeat> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
99 <output name="outfile" file="sort_rows_results1.bed" /> |
e8b38ade9b3e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 7cdafed6c6a1387395e5a869186518f129aa3132
bgruening
parents:
27
diff
changeset
|
100 </test> |
6 | 101 </tests> |
102 <help> | |
103 <![CDATA[ | |
104 .. class:: infomark | |
105 | |
7 | 106 **What it does** |
6 | 107 |
7 | 108 This tool creates a text file with recurring lines. You can specify a bunch of characters or entire sentences. |
6 | 109 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. |
110 In case the user provides a file, the line number will be used as X. | |
111 | |
112 ]]> | |
113 </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
|
114 <expand macro="citations" /> |
6 | 115 </tool> |