Mercurial > repos > bgruening > text_processing
annotate 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 |
| rev | line source |
|---|---|
|
26
f22a309187a3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit c2b1677d1c94433f777c2dc28ac8eec0a99cc6a7
bgruening
parents:
14
diff
changeset
|
1 <tool id="tp_sorted_uniq" name="Unique" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> |
| 0 | 2 <description>occurrences of each record</description> |
| 4 | 3 <macros> |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
|
26
f22a309187a3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit c2b1677d1c94433f777c2dc28ac8eec0a99cc6a7
bgruening
parents:
14
diff
changeset
|
6 <expand macro="creator"/> |
|
30
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
7 <expand macro="requirements"> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
8 <requirement type="package" version="4.9">sed</requirement> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
9 </expand> |
| 4 | 10 <version_command>sort --version | head -n 1</version_command> |
| 11 <command> | |
| 12 <![CDATA[ | |
|
30
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
13 ( |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
14 export LC_ALL=C; |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
15 #if int($header) > 0: |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
16 sed -u '${header}'q && |
| 4 | 17 #end if |
|
30
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
18 sort -u |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
19 $ignore_case |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
20 $is_numeric |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
21 -t ' ' |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
22 #if $adv_opts.adv_opts_selector == "advanced": |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
23 -k$adv_opts.column_start,$adv_opts.column_end |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
24 #end if |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
25 ) < '$infile' > '$outfile' |
| 4 | 26 ]]> |
| 0 | 27 </command> |
| 28 <inputs> | |
| 4 | 29 <param name="infile" type="data" format="tabular" label="File to scan for unique values" /> |
|
30
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
30 <param name="ignore_case" type="boolean" truevalue="-f" falsevalue="" |
| 4 | 31 label="Ignore differences in case when comparing" help="(-f)"/> |
|
30
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
32 <param name="is_numeric" type="boolean" truevalue="-n" falsevalue="" |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
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)." /> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
34 <param name="header" type="integer" value="0" label="Number of header lines" help="These will be ignored during sort."> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
35 <validator type="in_range" message="Negative values are not allowed." min="0"/> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
36 </param> |
| 0 | 37 <conditional name="adv_opts"> |
| 38 <param name="adv_opts_selector" type="select" label="Advanced Options"> | |
|
30
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
39 <option value="basic" selected="true">Hide Advanced Options</option> |
| 4 | 40 <option value="advanced">Show Advanced Options</option> |
| 0 | 41 </param> |
| 42 <when value="basic" /> | |
| 43 <when value="advanced"> | |
| 4 | 44 <param name="column_start" type="data_column" data_ref="infile" label="Column start" help="Unique on specific column range"/> |
| 45 <param name="column_end" type="data_column" data_ref="infile" label="Column end" help="Unique on specific column range"/> | |
| 0 | 46 </when> |
| 47 </conditional> | |
| 48 </inputs> | |
| 49 <outputs> | |
| 6 | 50 <data name="outfile" format_source="infile" metadata_source="infile"/> |
| 0 | 51 </outputs> |
| 52 <tests> | |
| 53 <test> | |
| 4 | 54 <param name="infile" value="1.bed"/> |
|
30
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
55 <param name="is_numeric" value="true"/> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
56 <param name="ignore_case" value="true"/> |
|
27
08cdbfffce67
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 2dc2df988bd2dde9f8d7f629b594186dbd4fdc2b
bgruening
parents:
26
diff
changeset
|
57 <conditional name="adv_opts"> |
|
08cdbfffce67
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 2dc2df988bd2dde9f8d7f629b594186dbd4fdc2b
bgruening
parents:
26
diff
changeset
|
58 <param name="adv_opts_selector" value="advanced"/> |
|
08cdbfffce67
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 2dc2df988bd2dde9f8d7f629b594186dbd4fdc2b
bgruening
parents:
26
diff
changeset
|
59 <param name="column_start" value="2"/> |
|
08cdbfffce67
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 2dc2df988bd2dde9f8d7f629b594186dbd4fdc2b
bgruening
parents:
26
diff
changeset
|
60 <param name="column_end" value="3"/> |
|
08cdbfffce67
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 2dc2df988bd2dde9f8d7f629b594186dbd4fdc2b
bgruening
parents:
26
diff
changeset
|
61 </conditional> |
| 4 | 62 <output name="outfile" file="unique_results1.bed"/> |
| 0 | 63 </test> |
|
30
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
64 <test> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
65 <param name="infile" value="1.bed"/> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
66 <param name="is_numeric" value="true"/> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
67 <param name="ignore_case" value="true"/> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
68 <param name="header" value="1"/> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
69 <conditional name="adv_opts"> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
70 <param name="adv_opts_selector" value="advanced"/> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
71 <param name="column_start" value="2"/> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
72 <param name="column_end" value="3"/> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
73 </conditional> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
74 <output name="outfile" file="unique_results2.bed"/> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
75 </test> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
76 <test> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
77 <param name="infile" value="1_dup.bed"/> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
78 <param name="is_numeric" value="false"/> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
79 <param name="ignore_case" value="true"/> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
80 <output name="outfile" file="unique_results3.bed"/> |
|
5907d248dee3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents:
27
diff
changeset
|
81 </test> |
| 0 | 82 </tests> |
| 83 <help> | |
| 4 | 84 <![CDATA[ |
| 0 | 85 .. class:: infomark |
| 86 | |
| 87 **Syntax** | |
| 88 | |
| 7 | 89 This tool returns all unique lines using the 'sort -u' command. It can be used with unsorted files. |
| 0 | 90 If you need additional options, like grouping or counting your unique results, please use the 'Unique lines from sorted file' tool. |
| 91 | |
| 92 ----- | |
| 93 | |
| 94 .. class:: infomark | |
| 95 | |
| 96 The input file needs to be tab separated. Please convert your file if necessary. | |
| 97 | |
| 98 ----- | |
| 99 | |
| 100 **Example** | |
| 101 | |
| 102 - Input file:: | |
| 7 | 103 |
| 0 | 104 chr1 10 100 gene1 |
| 105 chr1 105 200 gene2 | |
| 106 chr1 10 100 gene1 | |
| 107 chr2 10 100 gene4 | |
| 108 chr2 1000 1900 gene5 | |
| 109 chr3 15 1656 gene6 | |
| 110 chr2 10 100 gene4 | |
| 111 | |
| 112 - Unique lines will result in:: | |
| 113 | |
| 114 chr1 10 100 gene1 | |
| 115 chr1 105 200 gene2 | |
| 116 chr2 10 100 gene4 | |
| 117 chr2 1000 1900 gene5 | |
| 118 chr3 15 1656 gene6 | |
| 119 | |
| 4 | 120 ]]> |
| 0 | 121 </help> |
|
14
7725ab6dab67
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit b'e6ee273f75fff61d1e419283fa8088528cf59470\n'
bgruening
parents:
7
diff
changeset
|
122 <expand macro="citations" /> |
| 0 | 123 </tool> |
