Mercurial > repos > bgruening > text_processing
annotate multijoin.xml @ 18:d698c222f354 draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 378e99cde623698fb44ee7ac9873f455fb51fdbc"
author | bgruening |
---|---|
date | Sat, 08 Oct 2022 21:01:33 +0000 |
parents | 4c752559b236 |
children | 12615d397df7 |
rev | line source |
---|---|
7
01ca80da2266
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
6
diff
changeset
|
1 <tool id="tp_multijoin_tool" name="Multi-Join" version="@BASE_VERSION@.1"> |
0 | 2 <description>(combine multiple files)</description> |
3 <macros> | |
4 <import>macros.xml</import> | |
5 </macros> | |
5
20344ce0c811
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit b9d202134c3c6d0e5c398c3ae75e410067fcfc52
bgruening
parents:
3
diff
changeset
|
6 <requirements> |
7
01ca80da2266
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
6
diff
changeset
|
7 <requirement type="package" version="5.22.0.1">perl</requirement> |
5
20344ce0c811
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit b9d202134c3c6d0e5c398c3ae75e410067fcfc52
bgruening
parents:
3
diff
changeset
|
8 </requirements> |
20344ce0c811
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit b9d202134c3c6d0e5c398c3ae75e410067fcfc52
bgruening
parents:
3
diff
changeset
|
9 <command> |
0 | 10 <![CDATA[ |
5
20344ce0c811
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit b9d202134c3c6d0e5c398c3ae75e410067fcfc52
bgruening
parents:
3
diff
changeset
|
11 perl '$__tool_directory__/multijoin' |
0 | 12 --key '$key_column' |
13 --values '$value_columns' | |
14 --filler '$filler' | |
15 $ignore_dups | |
16 $output_header | |
17 $input_header | |
18 $first_file | |
19 #for $file in $files: | |
20 '$file' | |
21 #end for | |
22 > '$outfile' | |
23 ]]> | |
24 </command> | |
25 <inputs> | |
26 <param name="first_file" type="data" format="txt" label="File to join"/> | |
27 <param name="files" multiple="True" type="data" format="txt" label="add additional file" /> | |
28 | |
29 <param name="key_column" label="Common key column" type="integer" | |
30 value="1" help="Usually gene-ID or other common value" /> | |
31 | |
32 <param name="value_columns" label="Column with values to preserve" | |
33 type="data_column" data_ref="first_file" accept_default="true" multiple="True" display="checkboxes"/> | |
34 | |
35 <param name="output_header" type="boolean" checked="false" truevalue="--out-header" falsevalue="" label="Add header line to the output file" help="" /> | |
36 <param name="input_header" type="boolean" checked="false" truevalue="--in-header" falsevalue="" label="Input files contain a header line (as first line)" help="" /> | |
37 <param name="ignore_dups" type="boolean" checked="false" truevalue="--ignore-dups" falsevalue="" label="Ignore duplicated keys" help="If not set, duplicated keys in the same file will cause an error." /> | |
3
37e1eb05b1b4
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents:
0
diff
changeset
|
38 <param name="filler" type="text" value="0" label="Value to put in unpaired (empty) fields"> |
0 | 39 <sanitizer> |
40 <valid initial="string.printable"> | |
41 <remove value="'"/> | |
42 </valid> | |
43 </sanitizer> | |
44 </param> | |
45 </inputs> | |
46 <outputs> | |
8
4c752559b236
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 3103ebed1a420c7d3415b67ef532ea579edf9faa
bgruening
parents:
7
diff
changeset
|
47 <data name="outfile" format="tabular" /> |
0 | 48 </outputs> |
49 <tests> | |
50 <test> | |
51 <param name="first_file" value="multijoin1.txt" /> | |
52 <param name="files" value="multijoin2.txt,multijoin3.txt" /> | |
53 <param name="key_column" value="4" /> | |
54 <param name="value_columns" value="c7,c8,c9" /> | |
55 <param name="output_header" value="True" /> | |
5
20344ce0c811
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit b9d202134c3c6d0e5c398c3ae75e410067fcfc52
bgruening
parents:
3
diff
changeset
|
56 <output name="outfile" file="multijoin_result1.txt" lines_diff="2" /> |
0 | 57 </test> |
58 </tests> | |
59 <help> | |
60 <![CDATA[ | |
61 **What it does** | |
62 | |
63 This tool joins multiple tabular files based on a common key column. | |
64 | |
65 ----- | |
66 | |
67 **Example** | |
68 | |
69 To join three files, based on the 4th column, and keeping the 7th,8th,9th columns: | |
70 | |
71 **First file (AAA)**:: | |
72 | |
73 chr4 888449 890171 FBtr0308778 0 + 266 1527 1722 | |
74 chr4 972167 979017 FBtr0310651 0 - 3944 6428 6850 | |
75 chr4 972186 979017 FBtr0089229 0 - 3944 6428 6831 | |
76 chr4 972186 979017 FBtr0089231 0 - 3944 6428 6831 | |
77 chr4 972186 979017 FBtr0089233 0 - 3944 6428 6831 | |
78 chr4 995793 996435 FBtr0111046 0 + 7 166 642 | |
79 chr4 995793 997931 FBtr0111044 0 + 28 683 2138 | |
80 chr4 995793 997931 FBtr0111045 0 + 28 683 2138 | |
81 chr4 1034029 1047719 FBtr0089223 0 - 5293 13394 13690 | |
82 ... | |
83 | |
84 | |
85 **Second File (BBB)**:: | |
86 | |
87 chr4 90286 134453 FBtr0309803 0 + 657 29084 44167 | |
88 chr4 251355 266499 FBtr0089116 0 + 56 1296 15144 | |
89 chr4 252050 266506 FBtr0308086 0 + 56 1296 14456 | |
90 chr4 252050 266506 FBtr0308087 0 + 56 1296 14456 | |
91 chr4 252053 266528 FBtr0300796 0 + 56 1296 14475 | |
92 chr4 252053 266528 FBtr0300800 0 + 56 1296 14475 | |
93 chr4 252055 266528 FBtr0300798 0 + 56 1296 14473 | |
94 chr4 252055 266528 FBtr0300799 0 + 56 1296 14473 | |
95 chr4 252541 266528 FBtr0300797 0 + 56 1296 13987 | |
96 ... | |
97 | |
98 **Third file (CCC)**:: | |
99 | |
100 chr4 972167 979017 FBtr0310651 0 - 9927 6738 6850 | |
101 chr4 972186 979017 FBtr0089229 0 - 9927 6738 6831 | |
102 chr4 972186 979017 FBtr0089231 0 - 9927 6738 6831 | |
103 chr4 972186 979017 FBtr0089233 0 - 9927 6738 6831 | |
104 chr4 995793 996435 FBtr0111046 0 + 5 304 642 | |
105 chr4 995793 997931 FBtr0111044 0 + 17 714 2138 | |
106 chr4 995793 997931 FBtr0111045 0 + 17 714 2138 | |
107 chr4 1034029 1047719 FBtr0089223 0 - 17646 13536 13690 | |
108 ... | |
109 | |
110 | |
111 **Joining** the files, using **key column 4**, **value columns 7,8,9** and a **header line**, will return:: | |
112 | |
113 key AAA__V7 AAA__V8 AAA__V9 BBB__V7 BBB__V8 BBB__V9 CCC__V7 CCC__V8 CCC__V9 | |
114 FBtr0089116 0 0 0 56 1296 15144 0 0 0 | |
115 FBtr0089223 5293 13394 13690 0 0 0 17646 13536 13690 | |
116 FBtr0089229 3944 6428 6831 0 0 0 9927 6738 6831 | |
117 FBtr0089231 3944 6428 6831 0 0 0 9927 6738 6831 | |
118 FBtr0089233 3944 6428 6831 0 0 0 9927 6738 6831 | |
119 FBtr0111044 28 683 2138 0 0 0 17 714 2138 | |
120 FBtr0111045 28 683 2138 0 0 0 17 714 2138 | |
121 FBtr0111046 7 166 642 0 0 0 5 304 642 | |
122 FBtr0300796 0 0 0 56 1296 14475 0 0 0 | |
123 ... | |
124 | |
125 .. class:: infomark | |
126 | |
127 Input files need not be sorted. | |
128 | |
129 @REFERENCES@ | |
130 ]]> | |
131 </help> | |
6
60edf2f8c28f
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit b'e6ee273f75fff61d1e419283fa8088528cf59470\n'
bgruening
parents:
5
diff
changeset
|
132 <expand macro="citations" /> |
0 | 133 </tool> |