Mercurial > repos > bgruening > text_processing
annotate tac.xml @ 26:f22a309187a3 draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit c2b1677d1c94433f777c2dc28ac8eec0a99cc6a7
| author | bgruening |
|---|---|
| date | Fri, 16 Aug 2024 10:41:17 +0000 |
| parents | 74aae7d6cb09 |
| children | 08cdbfffce67 |
| 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"/> | |
| 51 <param name="separator_select" value="yes"/> | |
| 52 <param name="before" value="True"/> | |
| 53 <output name="outfile" file="tac_result2.txt"/> | |
| 54 </test> | |
| 55 </tests> | |
| 56 <help> | |
| 57 <![CDATA[ | |
| 58 **What it does** | |
| 59 | |
| 60 tac is a Linux command that allows you to see a file line-by-line backwards. It is named by analogy with cat. | |
| 61 | |
| 62 Mandatory arguments to long options are mandatory for short options too: | |
| 63 | |
| 64 -b, --before attach the separator before instead of after | |
| 65 -r, --regex interpret the separator as a regular expression | |
| 66 -s, --separator=STRING use STRING as the separator instead of newline | |
| 67 | |
| 68 ----- | |
| 69 | |
| 70 **Example** | |
| 71 | |
| 72 Input file: | |
| 73 | |
|
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
|
74 0 1 2 3 4 5 # 6 7 8 9 |
| 7 | 75 |
| 76 | |
| 77 default settings: | |
| 78 | |
|
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
|
79 9 8 7 6 # 5 4 3 2 1 0 |
| 7 | 80 |
| 81 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
|
82 |
|
74aae7d6cb09
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 3103ebed1a420c7d3415b67ef532ea579edf9faa
bgruening
parents:
14
diff
changeset
|
83 # 6 7 8 9 0 1 2 3 4 5 |
| 7 | 84 |
| 85 with option -b and -s 5: | |
| 86 | |
|
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
|
87 5 # 6 7 8 9 0 1 2 3 4 |
| 7 | 88 |
| 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> |
