Mercurial > repos > bgruening > text_processing
diff unsorted_uniq.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/unsorted_uniq.xml Sun Oct 06 08:22:36 2013 -0400 +++ b/unsorted_uniq.xml Wed Jan 07 11:10:52 2015 -0500 @@ -1,44 +1,57 @@ -<tool id="tp_sorted_uniq" name="Unique" version="0.3"> +<tool id="tp_sorted_uniq" name="Unique" version="@BASE_VERSION@.0"> <description>occurrences of each record</description> - <requirements> - <requirement type="package" version="8.21">gnu_coreutils</requirement> - </requirements> - <command interpreter='python'> - unsorted_uniq.py - $ignore_case - $is_numeric - #if $adv_opts.adv_opts_selector=="advanced": - $adv_opts.column_start - $adv_opts.column_end - #end if - $outfile - $infile + <macros> + <import>macros.xml</import> + </macros> + <expand macro="requirements" /> + <version_command>sort --version | head -n 1</version_command> + <command> +<![CDATA[ + sort -u + $ignore_case + $is_numeric + -t ' ' + #if $adv_opts.adv_opts_selector == "advanced": + -k$adv_opts.column_start,$adv_opts.column_end + #end if + -o "$outfile" + "$infile" +]]> </command> <inputs> - <param name="infile" type="data" format="tabular,txt" label="File to scan for unique values" /> - <param name="ignore_case" type="boolean" label="ignore differences in case when comparing (-f)" truevalue="-f" falsevalue="false" checked="false"/> - <param name="is_numeric" type="boolean" label="column only contains numeric values (-n)" truevalue="-n" falsevalue="false" checked="false" /> + <param name="infile" type="data" format="tabular" label="File to scan for unique values" /> + <param name="ignore_case" type="boolean" truevalue="-f" falsevalue="" checked="False" + label="Ignore differences in case when comparing" help="(-f)"/> + <param name="is_numeric" type="boolean" truevalue="-n" falsevalue="" checked="False" + label="Column only contains numeric values" help="(-n)" /> <conditional name="adv_opts"> <param name="adv_opts_selector" type="select" label="Advanced Options"> - <option value="basic" selected="True">Hide Advanced Options</option> - <option value="advanced">Show Advanced Options</option> + <option value="basic" selected="True">Hide Advanced Options</option> + <option value="advanced">Show Advanced Options</option> </param> <when value="basic" /> <when value="advanced"> - <param name="column_start" label="Column start" type="data_column" data_ref="infile" help="Unique on specific column range"/> - <param name="column_end" label="Column end" type="data_column" data_ref="infile" help="Unique on specific column range"/> + <param name="column_start" type="data_column" data_ref="infile" label="Column start" help="Unique on specific column range"/> + <param name="column_end" type="data_column" data_ref="infile" label="Column end" help="Unique on specific column range"/> </when> </conditional> </inputs> <outputs> - <data format="infile" name="outfile" metadata_source="infile"/> + <data format="input" name="outfile" metadata_source="infile"/> </outputs> <tests> <test> + <param name="infile" value="1.bed"/> + <param name="is_numeric" value="True"/> + <param name="ignore_case" value="True"/> + <param name="adv_opts_selector" value="advanced"/> + <param name="column_start" value="2"/> + <param name="column_end" value="3"/> + <output name="outfile" file="unique_results1.bed"/> </test> </tests> <help> - +<![CDATA[ .. class:: infomark **Syntax** @@ -74,6 +87,7 @@ chr2 1000 1900 gene5 chr3 15 1656 gene6 - +@REFERENCES@ +]]> </help> </tool>