annotate multijoin.xml @ 2:fc862d5bccaf draft

Uploaded
author bgruening
date Thu, 05 Sep 2013 12:42:48 -0400
parents a4ad586d1403
children 7068d1548234
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
1 <tool id="unixtools_multijoin'_tool" name="Multi-Join" version="0.1.1">
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
2 <description>(combine multiple files)</description>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
3 <command interpreter="perl">multijoin
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
4 --key '$key_column'
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
5 --values '$value_columns'
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
6 --filler '$filler'
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
7 $ignore_dups
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
8 $output_header
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
9 $input_header
2
fc862d5bccaf Uploaded
bgruening
parents: 1
diff changeset
10 $first_filename
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
11 #for $file in $files
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
12 '$file.filename'
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
13 #end for
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
14 &gt; '$output'
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
15 </command>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
16
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
17 <inputs>
2
fc862d5bccaf Uploaded
bgruening
parents: 1
diff changeset
18
fc862d5bccaf Uploaded
bgruening
parents: 1
diff changeset
19 <param name="first_filename" label="File to join" type="data" format="txt" />
fc862d5bccaf Uploaded
bgruening
parents: 1
diff changeset
20 <repeat name="files" title="with" min="2">
fc862d5bccaf Uploaded
bgruening
parents: 1
diff changeset
21 <param name="filename" label="add additional file" type="data" format="txt" />
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
22 </repeat>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
23
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
24 <param name="key_column" label="Common key column" type="integer"
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
25 value="1" help="Usually gene-ID or other common value" />
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
26
2
fc862d5bccaf Uploaded
bgruening
parents: 1
diff changeset
27 <param name="value_columns" label="Column with values to preserve"
fc862d5bccaf Uploaded
bgruening
parents: 1
diff changeset
28 type="data_column" data_ref="first_filename" accept_default="true" multiple="True" display="checkboxes"/>
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
29
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
30 <param name="output_header" type="boolean" checked="false" truevalue="--out-header" falsevalue="" label="Add header line to the output file" help="" />
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
31 <param name="input_header" type="boolean" checked="false" truevalue="--in-header" falsevalue="" label="Input files contain a header line (as first line)" help="" />
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
32 <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." />
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
33 <param name="filler" type="text" size="20" value="0" label="Value to put in unpaired (empty) fields">
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
34 <sanitizer>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
35 <valid initial="string.printable">
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
36 <remove value="&apos;"/>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
37 </valid>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
38 </sanitizer>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
39 </param>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
40
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
41 </inputs>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
42 <outputs>
1
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
43 <data name="output" format="input" metadata_source="input" />
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
44 </outputs>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
45
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
46 <help>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
47 **What it does**
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
48
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
49 This tool joins multiple tabular files based on a common key column.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
50
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
51 -----
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
52
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
53 **Example**
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
54
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
55 To join three files, based on the 4th column, and keeping the 7th,8th,9th columns:
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
56
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
57 **First file (AAA)**::
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
58
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
59 chr4 888449 890171 FBtr0308778 0 + 266 1527 1722
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
60 chr4 972167 979017 FBtr0310651 0 - 3944 6428 6850
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
61 chr4 972186 979017 FBtr0089229 0 - 3944 6428 6831
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
62 chr4 972186 979017 FBtr0089231 0 - 3944 6428 6831
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
63 chr4 972186 979017 FBtr0089233 0 - 3944 6428 6831
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
64 chr4 995793 996435 FBtr0111046 0 + 7 166 642
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
65 chr4 995793 997931 FBtr0111044 0 + 28 683 2138
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
66 chr4 995793 997931 FBtr0111045 0 + 28 683 2138
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
67 chr4 1034029 1047719 FBtr0089223 0 - 5293 13394 13690
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
68 ...
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
69
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
70
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
71 **Second File (BBB)**::
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
72
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
73 chr4 90286 134453 FBtr0309803 0 + 657 29084 44167
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
74 chr4 251355 266499 FBtr0089116 0 + 56 1296 15144
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
75 chr4 252050 266506 FBtr0308086 0 + 56 1296 14456
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
76 chr4 252050 266506 FBtr0308087 0 + 56 1296 14456
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
77 chr4 252053 266528 FBtr0300796 0 + 56 1296 14475
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
78 chr4 252053 266528 FBtr0300800 0 + 56 1296 14475
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
79 chr4 252055 266528 FBtr0300798 0 + 56 1296 14473
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
80 chr4 252055 266528 FBtr0300799 0 + 56 1296 14473
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
81 chr4 252541 266528 FBtr0300797 0 + 56 1296 13987
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
82 ...
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
83
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
84 **Third file (CCC)**::
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
85
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
86 chr4 972167 979017 FBtr0310651 0 - 9927 6738 6850
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
87 chr4 972186 979017 FBtr0089229 0 - 9927 6738 6831
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
88 chr4 972186 979017 FBtr0089231 0 - 9927 6738 6831
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
89 chr4 972186 979017 FBtr0089233 0 - 9927 6738 6831
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
90 chr4 995793 996435 FBtr0111046 0 + 5 304 642
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
91 chr4 995793 997931 FBtr0111044 0 + 17 714 2138
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
92 chr4 995793 997931 FBtr0111045 0 + 17 714 2138
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
93 chr4 1034029 1047719 FBtr0089223 0 - 17646 13536 13690
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
94 ...
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
95
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
96
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
97 **Joining** the files, using **key column 4**, **value columns 7,8,9** and a **header line**, will return::
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
98
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
99 key AAA__V7 AAA__V8 AAA__V9 BBB__V7 BBB__V8 BBB__V9 CCC__V7 CCC__V8 CCC__V9
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
100 FBtr0089116 0 0 0 56 1296 15144 0 0 0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
101 FBtr0089223 5293 13394 13690 0 0 0 17646 13536 13690
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
102 FBtr0089229 3944 6428 6831 0 0 0 9927 6738 6831
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
103 FBtr0089231 3944 6428 6831 0 0 0 9927 6738 6831
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
104 FBtr0089233 3944 6428 6831 0 0 0 9927 6738 6831
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
105 FBtr0111044 28 683 2138 0 0 0 17 714 2138
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
106 FBtr0111045 28 683 2138 0 0 0 17 714 2138
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
107 FBtr0111046 7 166 642 0 0 0 5 304 642
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
108 FBtr0300796 0 0 0 56 1296 14475 0 0 0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
109 ...
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
110
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
111
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
112 # Input files need not be sorted.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
113
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
114 -----
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
115
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
116 *multijoin* was written by A. Gordon (gordon at cshl dot edu)
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
117
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
118 </help>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
119 </tool>