Mercurial > repos > bgruening > text_processing
view tac.xml @ 14:7725ab6dab67 draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit b'e6ee273f75fff61d1e419283fa8088528cf59470\n'
author | bgruening |
---|---|
date | Sat, 06 May 2017 13:09:30 -0400 |
parents | c78b1767db2b |
children | 74aae7d6cb09 |
line wrap: on
line source
<tool id="tp_tac" name="tac" version="@BASE_VERSION@.0"> <description>reverse a file (reverse cat)</description> <macros> <import>macros.xml</import> </macros> <expand macro="requirements" /> <version_command>tac --version | head -n 1</version_command> <command> <![CDATA[ tac #if str($separator.separator_select) == "yes": $separator.before $separator.regex #if $separator.separator_string: "$separator.separator_string" #end if #end if "$infile" > "$outfile" ]]> </command> <inputs> <param name="infile" type="data" format="txt" label="Input file"/> <conditional name="separator"> <param name="separator_select" type="select" label="Do you want to use a separator other than newline?"> <option value="no">No</option> <option value="yes">Yes</option> </param> <when value="no" /> <when value="yes"> <param name="before" type="boolean" truevalue="-b" falsevalue="" checked="True" label="Attach the separator before instead of after" help="(--before)"/> <param name="regex" type="boolean" truevalue="-r" falsevalue="" checked="True" label="Interpret the separator as a regular expression" help="(--regex)"/> <param name="separator_string" type="text" value="" label="Separator to use" help="(--separator)" /> </when> </conditional> </inputs> <outputs> <data name="outfile" format_source="infile" metadata_source="infile"/> </outputs> <tests> <test> <param name="infile" value="1.bed"/> <output name="outfile" file="tac_result1.txt"/> </test> <test> <param name="infile" value="1.bed"/> <param name="separator_select" value="yes"/> <param name="before" value="True"/> <output name="outfile" file="tac_result2.txt"/> </test> </tests> <help> <![CDATA[ **What it does** tac is a Linux command that allows you to see a file line-by-line backwards. It is named by analogy with cat. Mandatory arguments to long options are mandatory for short options too: -b, --before attach the separator before instead of after -r, --regex interpret the separator as a regular expression -s, --separator=STRING use STRING as the separator instead of newline ----- **Example** Input file: 0 1 2 3 4 5 # 6 7 8 9 default settings: 9 8 7 6 # 5 4 3 2 1 0 with option -s 5: # 6 7 8 9 0 1 2 3 4 5 with option -b and -s 5: 5 # 6 7 8 9 0 1 2 3 4 @REFERENCES@ ]]> </help> <expand macro="citations" /> </tool>