Mercurial > repos > bgruening > text_processing
annotate tac.xml @ 24:5fef6d08de83 draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 5f5d5802a961a77ceb092cbdef90d93e29717029-dirty"
author | bgruening |
---|---|
date | Tue, 22 Jun 2021 16:03:26 +0000 |
parents | 74aae7d6cb09 |
children | f22a309187a3 |
rev | line source |
---|---|
7 | 1 <tool id="tp_tac" name="tac" version="@BASE_VERSION@.0"> |
2 <description>reverse a file (reverse cat)</description> | |
3 <macros> | |
4 <import>macros.xml</import> | |
5 </macros> | |
6 <expand macro="requirements" /> | |
7 <version_command>tac --version | head -n 1</version_command> | |
8 <command> | |
9 <![CDATA[ | |
10 tac | |
11 #if str($separator.separator_select) == "yes": | |
12 $separator.before | |
13 $separator.regex | |
14 #if $separator.separator_string: | |
15 "$separator.separator_string" | |
16 #end if | |
17 #end if | |
18 "$infile" | |
19 > "$outfile" | |
20 ]]> | |
21 </command> | |
22 <inputs> | |
23 <param name="infile" type="data" format="txt" label="Input file"/> | |
24 <conditional name="separator"> | |
25 <param name="separator_select" type="select" label="Do you want to use a separator other than newline?"> | |
26 <option value="no">No</option> | |
27 <option value="yes">Yes</option> | |
28 </param> | |
29 <when value="no" /> | |
30 <when value="yes"> | |
31 <param name="before" type="boolean" truevalue="-b" falsevalue="" checked="True" | |
32 label="Attach the separator before instead of after" help="(--before)"/> | |
33 <param name="regex" type="boolean" truevalue="-r" falsevalue="" checked="True" | |
34 label="Interpret the separator as a regular expression" help="(--regex)"/> | |
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
|
35 <param name="separator_string" type="text" value="" |
7 | 36 label="Separator to use" help="(--separator)" /> |
37 </when> | |
38 </conditional> | |
39 </inputs> | |
40 <outputs> | |
41 <data name="outfile" format_source="infile" metadata_source="infile"/> | |
42 </outputs> | |
43 <tests> | |
44 <test> | |
45 <param name="infile" value="1.bed"/> | |
46 <output name="outfile" file="tac_result1.txt"/> | |
47 </test> | |
48 <test> | |
49 <param name="infile" value="1.bed"/> | |
50 <param name="separator_select" value="yes"/> | |
51 <param name="before" value="True"/> | |
52 <output name="outfile" file="tac_result2.txt"/> | |
53 </test> | |
54 </tests> | |
55 <help> | |
56 <![CDATA[ | |
57 **What it does** | |
58 | |
59 tac is a Linux command that allows you to see a file line-by-line backwards. It is named by analogy with cat. | |
60 | |
61 Mandatory arguments to long options are mandatory for short options too: | |
62 | |
63 -b, --before attach the separator before instead of after | |
64 -r, --regex interpret the separator as a regular expression | |
65 -s, --separator=STRING use STRING as the separator instead of newline | |
66 | |
67 ----- | |
68 | |
69 **Example** | |
70 | |
71 Input file: | |
72 | |
15
74aae7d6cb09
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 3103ebed1a420c7d3415b67ef532ea579edf9faa
bgruening
parents:
14
diff
changeset
|
73 0 1 2 3 4 5 # 6 7 8 9 |
7 | 74 |
75 | |
76 default settings: | |
77 | |
15
74aae7d6cb09
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 3103ebed1a420c7d3415b67ef532ea579edf9faa
bgruening
parents:
14
diff
changeset
|
78 9 8 7 6 # 5 4 3 2 1 0 |
7 | 79 |
80 with option -s 5: | |
15
74aae7d6cb09
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 3103ebed1a420c7d3415b67ef532ea579edf9faa
bgruening
parents:
14
diff
changeset
|
81 |
74aae7d6cb09
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 3103ebed1a420c7d3415b67ef532ea579edf9faa
bgruening
parents:
14
diff
changeset
|
82 # 6 7 8 9 0 1 2 3 4 5 |
7 | 83 |
84 with option -b and -s 5: | |
85 | |
15
74aae7d6cb09
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 3103ebed1a420c7d3415b67ef532ea579edf9faa
bgruening
parents:
14
diff
changeset
|
86 5 # 6 7 8 9 0 1 2 3 4 |
7 | 87 |
88 @REFERENCES@ | |
89 ]]> | |
90 </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
|
91 <expand macro="citations" /> |
7 | 92 </tool> |