Mercurial > repos > bgruening > text_processing
annotate easyjoin.xml @ 27:08cdbfffce67 draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 2dc2df988bd2dde9f8d7f629b594186dbd4fdc2b
author | bgruening |
---|---|
date | Fri, 07 Mar 2025 20:43:41 +0000 |
parents | f22a309187a3 |
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:
21
diff
changeset
|
1 <tool id="tp_easyjoin_tool" name="Join" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> |
0 | 2 <description>two files</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:
21
diff
changeset
|
6 <expand macro="creator"/> |
13
3c685c4106b3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit b9d202134c3c6d0e5c398c3ae75e410067fcfc52
bgruening
parents:
10
diff
changeset
|
7 <expand macro="requirements"> |
26
f22a309187a3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit c2b1677d1c94433f777c2dc28ac8eec0a99cc6a7
bgruening
parents:
21
diff
changeset
|
8 <requirement type="package" version="5.32">perl</requirement> |
13
3c685c4106b3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit b9d202134c3c6d0e5c398c3ae75e410067fcfc52
bgruening
parents:
10
diff
changeset
|
9 </expand> |
4 | 10 <version_command>join --version | head -n 1</version_command> |
11 <command> | |
12 <![CDATA[ | |
26
f22a309187a3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit c2b1677d1c94433f777c2dc28ac8eec0a99cc6a7
bgruening
parents:
21
diff
changeset
|
13 cp '$__tool_directory__/sort-header' ./ && |
4 | 14 chmod +x sort-header && |
26
f22a309187a3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit c2b1677d1c94433f777c2dc28ac8eec0a99cc6a7
bgruening
parents:
21
diff
changeset
|
15 perl '$__tool_directory__/easyjoin' |
4 | 16 $jointype |
21
0e3b611245f7
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 9c4d4fe09cbbd818532d793d01d1cb16edbd496b-dirty"
bgruening
parents:
15
diff
changeset
|
17 -t $'\t' |
4 | 18 $header |
19 -e '$empty_string_filler' | |
20 -o auto | |
21 $ignore_case | |
22 -1 '$column1' | |
23 -2 '$column2' | |
26
f22a309187a3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit c2b1677d1c94433f777c2dc28ac8eec0a99cc6a7
bgruening
parents:
21
diff
changeset
|
24 '$infile1' |
f22a309187a3
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit c2b1677d1c94433f777c2dc28ac8eec0a99cc6a7
bgruening
parents:
21
diff
changeset
|
25 '$infile2' |
4 | 26 > '$output' |
27 ]]> | |
0 | 28 </command> |
4 | 29 <inputs> |
30 <param name="infile1" format="tabular" type="data" label="1st file" /> | |
31 <param name="column1" label="Column to use from 1st file" type="data_column" data_ref="infile1" accept_default="true" /> | |
0 | 32 |
21
0e3b611245f7
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 9c4d4fe09cbbd818532d793d01d1cb16edbd496b-dirty"
bgruening
parents:
15
diff
changeset
|
33 <param name="infile2" format="tabular" type="data" label="2nd File" /> |
4 | 34 <param name="column2" label="Column to use from 2nd file" type="data_column" data_ref="infile2" accept_default="true" /> |
0 | 35 |
36 <param name="jointype" type="select" label="Output lines appearing in"> | |
4 | 37 <option value=" " selected="True">Both 1st & 2nd file.</option> |
38 <option value="-v 1">1st but not in 2nd file. (-v 1)</option> | |
39 <option value="-v 2">2nd but not in 1st file. (-v 2)</option> | |
40 <option value="-a 1">Both 1st & 2nd file, plus unpairable lines from 1st file. (-a 1)</option> | |
41 <option value="-a 2">Both 1st & 2nd file, plus unpairable lines from 2st file. (-a 2)</option> | |
42 <option value="-a 1 -a 2">All lines [-a 1 -a 2]</option> | |
0 | 43 <option value="-v 1 -v 2">All unpairable lines [-v 1 -v 2]</option> |
44 </param> | |
45 | |
4 | 46 <param name="header" type="boolean" checked="false" truevalue="--header" falsevalue="" |
47 label="First line is a header line" help="Use if first line contains column headers. It will not be sorted." /> | |
48 <param name="ignore_case" type="boolean" checked="false" truevalue="-i" falsevalue="" | |
49 label="Ignore case" help="Sort and Join key column values regardless of upper/lower case letters." /> | |
10
c78b1767db2b
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents:
8
diff
changeset
|
50 <param name="empty_string_filler" type="text" value="0" label="Value to put in unpaired (empty) fields"> |
0 | 51 <sanitizer> |
52 <valid initial="string.printable"> | |
53 <remove value="'"/> | |
54 </valid> | |
55 </sanitizer> | |
56 </param> | |
4 | 57 </inputs> |
58 <outputs> | |
6 | 59 <data name="output" format_source="infile1" metadata_source="infile1"/> |
4 | 60 </outputs> |
61 <tests> | |
62 <test> | |
63 <param name="infile1" value="easyjoin1.tabular" /> | |
64 <param name="column1" value="1" /> | |
65 <param name="infile2" value="easyjoin2.tabular" /> | |
66 <param name="column2" value="1" /> | |
67 <param name="header" value="True" /> | |
68 <param name="jointype" value="-a 1 -a 2" /> | |
69 <output name="output" file="easyjoin_result1.tabular" /> | |
70 </test> | |
71 </tests> | |
72 <help> | |
73 <![CDATA[ | |
0 | 74 **What it does** |
75 | |
76 This tool joins two tabular files based on a common key column. | |
77 | |
78 ----- | |
79 | |
80 **Example** | |
81 | |
82 **First file**:: | |
83 | |
84 Fruit Color | |
85 Apple red | |
86 Banana yellow | |
87 Orange orange | |
88 Melon green | |
89 | |
90 **Second File**:: | |
91 | |
92 Fruit Price | |
93 Orange 7 | |
94 Avocado 8 | |
95 Apple 4 | |
96 Banana 3 | |
97 | |
98 **Joining** both files, using **key column 1** and a **header line**, will return:: | |
99 | |
100 Fruit Color Price | |
101 Apple red 4 | |
102 Avocado . 8 | |
103 Banana yellow 3 | |
104 Melon green . | |
105 Orange orange 7 | |
106 | |
4 | 107 .. class:: infomark |
0 | 108 |
4 | 109 * Input files need not be sorted. |
110 * The header line (**Fruit Color Price**) was joined and kept as first line. | |
111 * Missing values ( Avocado's color, missing from the first file ) are replaced with a period character. | |
0 | 112 |
4 | 113 ]]> |
114 </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:
13
diff
changeset
|
115 <expand macro="citations" /> |
0 | 116 </tool> |