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