Mercurial > repos > bgruening > text_processing
diff tac.xml @ 7:d64eace4f9f3 draft
Uploaded
author | bgruening |
---|---|
date | Sat, 17 Jan 2015 08:30:15 -0500 |
parents | 8928e6d1e7ba |
children | c78b1767db2b |
line wrap: on
line diff
--- a/tac.xml Thu Jan 08 09:07:31 2015 -0500 +++ b/tac.xml Sat Jan 17 08:30:15 2015 -0500 @@ -1,90 +1,90 @@ -<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" size="5" 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> -</tool> +<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" size="5" 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> +</tool>