Mercurial > repos > bgruening > text_processing
view tac.xml @ 17:f2918761eaf3 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:11:35 -0500 |
parents | 74aae7d6cb09 |
children | f22a309187a3 |
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>