Mercurial > repos > bgruening > text_processing
comparison unsorted_uniq.xml @ 30:5907d248dee3 draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
| author | bgruening |
|---|---|
| date | Sat, 17 Jan 2026 00:56:56 +0000 |
| parents | 08cdbfffce67 |
| children |
comparison
equal
deleted
inserted
replaced
| 29:4f7cade041cb | 30:5907d248dee3 |
|---|---|
| 2 <description>occurrences of each record</description> | 2 <description>occurrences of each record</description> |
| 3 <macros> | 3 <macros> |
| 4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
| 5 </macros> | 5 </macros> |
| 6 <expand macro="creator"/> | 6 <expand macro="creator"/> |
| 7 <expand macro="requirements" /> | 7 <expand macro="requirements"> |
| 8 <requirement type="package" version="4.9">sed</requirement> | |
| 9 </expand> | |
| 8 <version_command>sort --version | head -n 1</version_command> | 10 <version_command>sort --version | head -n 1</version_command> |
| 9 <command> | 11 <command> |
| 10 <![CDATA[ | 12 <![CDATA[ |
| 11 sort -u | 13 ( |
| 12 $ignore_case | 14 export LC_ALL=C; |
| 13 $is_numeric | 15 #if int($header) > 0: |
| 14 -t ' ' | 16 sed -u '${header}'q && |
| 15 #if $adv_opts.adv_opts_selector == "advanced": | |
| 16 -k$adv_opts.column_start,$adv_opts.column_end | |
| 17 #end if | 17 #end if |
| 18 -o '$outfile' | 18 sort -u |
| 19 '$infile' | 19 $ignore_case |
| 20 $is_numeric | |
| 21 -t ' ' | |
| 22 #if $adv_opts.adv_opts_selector == "advanced": | |
| 23 -k$adv_opts.column_start,$adv_opts.column_end | |
| 24 #end if | |
| 25 ) < '$infile' > '$outfile' | |
| 20 ]]> | 26 ]]> |
| 21 </command> | 27 </command> |
| 22 <inputs> | 28 <inputs> |
| 23 <param name="infile" type="data" format="tabular" label="File to scan for unique values" /> | 29 <param name="infile" type="data" format="tabular" label="File to scan for unique values" /> |
| 24 <param name="ignore_case" type="boolean" truevalue="-f" falsevalue="" checked="False" | 30 <param name="ignore_case" type="boolean" truevalue="-f" falsevalue="" |
| 25 label="Ignore differences in case when comparing" help="(-f)"/> | 31 label="Ignore differences in case when comparing" help="(-f)"/> |
| 26 <param name="is_numeric" type="boolean" truevalue="-n" falsevalue="" checked="False" | 32 <param name="is_numeric" type="boolean" truevalue="-n" falsevalue="" |
| 27 label="Column only contains numeric values" help="(-n)" /> | 33 label="Compare numeric values at start of records" help="This will try to detect numeric values at the start of each record and base comparisons only on these numbers (or the empty string if no starting number is found) (-n)." /> |
| 34 <param name="header" type="integer" value="0" label="Number of header lines" help="These will be ignored during sort."> | |
| 35 <validator type="in_range" message="Negative values are not allowed." min="0"/> | |
| 36 </param> | |
| 28 <conditional name="adv_opts"> | 37 <conditional name="adv_opts"> |
| 29 <param name="adv_opts_selector" type="select" label="Advanced Options"> | 38 <param name="adv_opts_selector" type="select" label="Advanced Options"> |
| 30 <option value="basic" selected="True">Hide Advanced Options</option> | 39 <option value="basic" selected="true">Hide Advanced Options</option> |
| 31 <option value="advanced">Show Advanced Options</option> | 40 <option value="advanced">Show Advanced Options</option> |
| 32 </param> | 41 </param> |
| 33 <when value="basic" /> | 42 <when value="basic" /> |
| 34 <when value="advanced"> | 43 <when value="advanced"> |
| 35 <param name="column_start" type="data_column" data_ref="infile" label="Column start" help="Unique on specific column range"/> | 44 <param name="column_start" type="data_column" data_ref="infile" label="Column start" help="Unique on specific column range"/> |
| 41 <data name="outfile" format_source="infile" metadata_source="infile"/> | 50 <data name="outfile" format_source="infile" metadata_source="infile"/> |
| 42 </outputs> | 51 </outputs> |
| 43 <tests> | 52 <tests> |
| 44 <test> | 53 <test> |
| 45 <param name="infile" value="1.bed"/> | 54 <param name="infile" value="1.bed"/> |
| 46 <param name="is_numeric" value="True"/> | 55 <param name="is_numeric" value="true"/> |
| 47 <param name="ignore_case" value="True"/> | 56 <param name="ignore_case" value="true"/> |
| 48 <conditional name="adv_opts"> | 57 <conditional name="adv_opts"> |
| 49 <param name="adv_opts_selector" value="advanced"/> | 58 <param name="adv_opts_selector" value="advanced"/> |
| 50 <param name="column_start" value="2"/> | 59 <param name="column_start" value="2"/> |
| 51 <param name="column_end" value="3"/> | 60 <param name="column_end" value="3"/> |
| 52 </conditional> | 61 </conditional> |
| 53 <output name="outfile" file="unique_results1.bed"/> | 62 <output name="outfile" file="unique_results1.bed"/> |
| 63 </test> | |
| 64 <test> | |
| 65 <param name="infile" value="1.bed"/> | |
| 66 <param name="is_numeric" value="true"/> | |
| 67 <param name="ignore_case" value="true"/> | |
| 68 <param name="header" value="1"/> | |
| 69 <conditional name="adv_opts"> | |
| 70 <param name="adv_opts_selector" value="advanced"/> | |
| 71 <param name="column_start" value="2"/> | |
| 72 <param name="column_end" value="3"/> | |
| 73 </conditional> | |
| 74 <output name="outfile" file="unique_results2.bed"/> | |
| 75 </test> | |
| 76 <test> | |
| 77 <param name="infile" value="1_dup.bed"/> | |
| 78 <param name="is_numeric" value="false"/> | |
| 79 <param name="ignore_case" value="true"/> | |
| 80 <output name="outfile" file="unique_results3.bed"/> | |
| 54 </test> | 81 </test> |
| 55 </tests> | 82 </tests> |
| 56 <help> | 83 <help> |
| 57 <