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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
2 <description>occurrences of each record</description>
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
3 <macros>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
4 <import>macros.xml</import>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
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
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
10 <version_command>sort --version | head -n 1</version_command>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
11 <command>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
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
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
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
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
26 ]]>
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
27 </command>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
28 <inputs>
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
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
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
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
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
37 <conditional name="adv_opts">
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
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
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
40 <option value="advanced">Show Advanced Options</option>
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
41 </param>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
42 <when value="basic" />
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
43 <when value="advanced">
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
44 <param name="column_start" type="data_column" data_ref="infile" label="Column start" help="Unique on specific column range"/>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
45 <param name="column_end" type="data_column" data_ref="infile" label="Column end" help="Unique on specific column range"/>
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
46 </when>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
47 </conditional>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
48 </inputs>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
49 <outputs>
6
8928e6d1e7ba Uploaded
bgruening
parents: 4
diff changeset
50 <data name="outfile" format_source="infile" metadata_source="infile"/>
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
51 </outputs>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
52 <tests>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
53 <test>
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
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
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
62 <output name="outfile" file="unique_results1.bed"/>
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
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
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
82 </tests>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
83 <help>
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
84 <![CDATA[
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
85 .. class:: infomark
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
86
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
87 **Syntax**
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
88
7
d64eace4f9f3 Uploaded
bgruening
parents: 6
diff changeset
89 This tool returns all unique lines using the 'sort -u' command. It can be used with unsorted files.
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
90 If you need additional options, like grouping or counting your unique results, please use the 'Unique lines from sorted file' tool.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
91
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
92 -----
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
93
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
94 .. class:: infomark
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
95
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
96 The input file needs to be tab separated. Please convert your file if necessary.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
97
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
98 -----
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
99
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
100 **Example**
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
101
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
102 - Input file::
7
d64eace4f9f3 Uploaded
bgruening
parents: 6
diff changeset
103
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
104 chr1 10 100 gene1
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
105 chr1 105 200 gene2
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
106 chr1 10 100 gene1
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
107 chr2 10 100 gene4
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
108 chr2 1000 1900 gene5
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
109 chr3 15 1656 gene6
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
110 chr2 10 100 gene4
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
111
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
112 - Unique lines will result in::
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
113
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
114 chr1 10 100 gene1
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
115 chr1 105 200 gene2
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
116 chr2 10 100 gene4
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
117 chr2 1000 1900 gene5
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
118 chr3 15 1656 gene6
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
119
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
120 ]]>
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
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
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
123 </tool>