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