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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
1 <tool id="tp_text_file_with_recurring_lines" name="Create text file" version="@BASE_VERSION@.0">
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
2 <description>with recurring lines</description>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
3 <macros>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
4 <import>macros.xml</import>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
5 </macros>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
6 <expand macro="requirements" />
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
7 <version_command>yes --version | head -n 1</version_command>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
8 <command>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
9 <![CDATA[
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
10 #for $token in $token_set:
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
11 #if str($token.repeat_select.repeat_select_opts) == 'user':
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
12 times=#echo $token.repeat_select.times#;
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
13 #else:
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
14 times=`wc -l $token.repeat_select.infile | awk '{print $1}'`;
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
15 #end if
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
16 yes -- "${token.line}" 2>/dev/null | head -n \$times >> $outfile;
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
17 #end for
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
18 ]]>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
19 </command>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
20 <inputs>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
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
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
23 label="Characters to insert" help="Specify the characters that will be inserted X times in every line"/>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
24 <conditional name="repeat_select">
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
25 <param name="repeat_select_opts" type="select" label="Specify the number of iterations by">
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
26 <option value="file">File (for each line in file)</option>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
27 <option value="user" selected="True">User defined number</option>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
28 </param>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
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
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
31 </when>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
32 <when value="file">
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
33 <param name="infile" type="data" format="txt" label="Template file"
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
34 help="For every line, the specified characters will be written once. That means X is the line-number from the given file."/>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
35 </when>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
36 </conditional>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
37 </repeat>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
38 </inputs>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
39 <outputs>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
40 <data format="text" name="outfile"/>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
41 </outputs>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
42 <tests>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
43 <test>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
44 <repeat name="token_set">
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
45 <param name="line" value="freedom" />
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
46 <param name="repeat_select_opts" value="file" />
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
47 <param name="infile" value="multijoin2.txt" />
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
48 </repeat>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
49 <output name="outfile" file="recurring_result1.txt" />
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
50 </test>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
51 <test>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
52 <repeat name="token_set">
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
53 <param name="line" value="freedom" />
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
54 <param name="repeat_select_opts" value="user" />
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
55 <param name="times" value="10" />
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
56 </repeat>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
57 <repeat name="token_set">
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
58 <param name="line" value="war is over" />
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
59 <param name="repeat_select_opts" value="user" />
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
60 <param name="times" value="10" />
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
61 </repeat>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
62 <output name="outfile" file="recurring_result2.txt" />
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
63 </test>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
64 </tests>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
65 <help>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
66 <![CDATA[
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
67 .. class:: infomark
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
68
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
69 **What it does**
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
70
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
71 This tool creates a text file with recurring lines. You can specify a bunch of characters or entire sentences.
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
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.
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
73 In case the user provides a file, the line number will be used as X.
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
74
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
75 @REFERENCES@
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
76 ]]>
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
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
5314e5d6f040 Imported from capsule None
bgruening
parents:
diff changeset
79 </tool>