Mercurial > repos > bgruening > text_processing
diff tail.xml @ 4:56e80527c482 draft
Uploaded
author | bgruening |
---|---|
date | Wed, 07 Jan 2015 11:10:52 -0500 |
parents | 7068d1548234 |
children | 8928e6d1e7ba |
line wrap: on
line diff
--- a/tail.xml Sun Oct 06 08:22:36 2013 -0400 +++ b/tail.xml Wed Jan 07 11:10:52 2015 -0500 @@ -1,29 +1,45 @@ -<tool id="tp_tail_tool" name="Select last" version="0.1.1"> +<tool id="tp_tail_tool" name="Select last" version="@BASE_VERSION@.0"> <description>lines from a dataset (tail)</description> - <requirements> - <requirement type="package" version="8.21">gnu_coreutils</requirement> - </requirements> + <macros> + <import>macros.xml</import> + </macros> + <expand macro="requirements" /> + <version_command>tail --version | head -n 1</version_command> <command> - tail --lines $count '$input' > '$output' +<![CDATA[ + tail + --lines $complement$num_lines + '$infile' + > '$outfile' +]]> </command> - <inputs> - <param format="txt" name="input" type="data" label="file to cut" /> - <param name="count" type="integer" size="5" value="10" label="Output last X lines" help="" /> + <param name="infile" format="txt" type="data" label="Text file" /> + <param name="complement" type="select" label="Operation"> + <option value="">Keep last lines</option> + <option value="+">Keep everything from this line on</option> + </param> + <param name="num_lines" type="integer" size="5" value="10" + label="Number of lines" help="These will be kept (depending on 'operation'). (--lines)" /> </inputs> - <outputs> - <data format="input" name="output" metadata_source="input"/> + <data name="outfile" format="input" metadata_source="infile"/> </outputs> <tests> <test> - <param name="count" value="10"/> <param name="infile" value="1.bed"/> - <output name="out_file1" file="eq-showtail.dat"/> + <param name="num_lines" value="10"/> + <output name="outfile" file="tail_results1.bed"/> + </test> + <test> + <param name="infile" value="1.bed"/> + <param name="num_lines" value="10"/> + <param name="complement" value="+"/> + <output name="outfile" file="tail_results2.bed"/> </test> </tests> <help> - +<![CDATA[ **What it does** This tool outputs specified number of lines from the **end** of a dataset @@ -45,5 +61,7 @@ chr7 57341 57361 D17003_CTCF_R7 375 + chr7 57457 57477 D17003_CTCF_R3 188 + +@REFERENCES@ +]]> </help> </tool>