annotate column_join.xml @ 0:6bb6c0a30c67 draft default tip

Uploaded
author jjohnson
date Tue, 01 Apr 2014 09:30:45 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
1 <tool id="column_join" name="Column Join" version="1.1.0">
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
2 <description></description>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
3 <command interpreter="python">
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
4 column_join.py
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
5 --output=$output
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
6 --input1=$input1
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
7 --input2=$input2
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
8 --hinge=$hinge
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
9 --columns=$columns
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
10 #if $fill_empty_columns.fill_empty_columns_switch == "fill_empty":
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
11 --fill_options_file=$fill_options_file
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
12 #end if
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
13 #for $f in $file_chooser:
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
14 ${f.input}
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
15 #end for
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
16 </command>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
17 <inputs>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
18 <param name="input1" type="data" format="tabular" label="Choose the first file for the join" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
19 <param name="hinge" type="data_column" data_ref="input1" multiple="false" numerical="false" label="Use this column and columns to left the 'hinge' (matching data for each join)" help="All columns to left of selected column (plus selected column) will be used. Select 2 for pileup" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
20 <param name="columns" type="data_column" data_ref="input1" multiple="true" numerical="false" label="Include these column" help="Multi-select list - hold the appropriate key while clicking to select multiple columns" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
21 <conditional name="fill_empty_columns">
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
22 <param name="fill_empty_columns_switch" type="select" label="Fill empty columns">
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
23 <option value="no_fill" selected="True">No</option>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
24 <option value="fill_empty">Yes</option>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
25 </param>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
26 <when value="no_fill" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
27 <when value="fill_empty">
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
28 <conditional name="do_fill_empty_columns">
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
29 <param name="column_fill_type" type="select" label="Fill Columns by">
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
30 <option value="single_fill_value" selected="True">Single fill value</option>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
31 <option value="fill_value_by_column">Values by column</option>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
32 </param>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
33 <when value="single_fill_value">
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
34 <param type="text" name="fill_value" label="Fill value" value="." />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
35 </when>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
36 <when value="fill_value_by_column">
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
37 <repeat name="column_fill" title="Fill Column">
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
38 <param name="column_number" label="Column" type="data_column" data_ref="input1" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
39 <param type="text" name="fill_value" value="." />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
40 </repeat>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
41 </when>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
42 </conditional>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
43 </when>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
44 </conditional>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
45 <param name="input2" type="data" format="tabular" label="Choose the second file for the join" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
46 <repeat name="file_chooser" title="Additional Input">
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
47 <param name="input" label="Additional input file" type="data" format="tabular" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
48 </repeat>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
49 </inputs>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
50 <configfiles>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
51 <configfile name="fill_options_file">&lt;%
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
52 import json
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
53 %&gt;
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
54 #set $__fill_options = {}
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
55 #if $fill_empty_columns['fill_empty_columns_switch'] == 'fill_empty':
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
56 #if $fill_empty_columns['do_fill_empty_columns']['column_fill_type'] == 'single_fill_value':
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
57 #set $__start_fill = $fill_empty_columns['do_fill_empty_columns']['fill_value'].value
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
58 #else:
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
59 #set $__start_fill = ""
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
60 #end if
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
61 #set $__fill_options['file1_columns'] = [ __start_fill for i in range( int( $input1.metadata.columns ) ) ]
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
62 #if $fill_empty_columns['do_fill_empty_columns']['column_fill_type'] == 'fill_value_by_column':
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
63 #for column_fill in $fill_empty_columns['do_fill_empty_columns']['column_fill']:
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
64 #set $__fill_options['file1_columns'][ int( column_fill['column_number'].value ) - 1 ] = column_fill['fill_value'].value
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
65 #end for
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
66 #end if
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
67 #end if
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
68 ${json.dumps( __fill_options )}
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
69 </configfile>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
70 </configfiles>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
71 <outputs>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
72 <data name="output" format="tabular" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
73 </outputs>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
74 <tests>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
75 <test>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
76 <param name="input1" value="column_join_in1.pileup" ftype="pileup" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
77 <param name="hinge" value="2" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
78 <param name="columns" value="1,2,3,4,5,7" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
79 <param name="fill_empty_columns_switch" value="fill_empty" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
80 <param name="column_fill_type" value="single_fill_value" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
81 <param name="fill_value" value="?" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
82 <param name="input2" value="column_join_in2.pileup" ftype="pileup" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
83 <param name="input" value="column_join_in3.pileup" ftype="pileup" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
84 <output name="output" file="column_join_out1.pileup" ftype="tabular" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
85 </test>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
86 <test>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
87 <param name="input1" value="column_join_in4.pileup" ftype="pileup" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
88 <param name="hinge" value="2" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
89 <param name="columns" value="1,2,3,4" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
90 <param name="fill_empty_columns_switch" value="no_fill" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
91 <param name="input2" value="column_join_in5.pileup" ftype="pileup" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
92 <param name="input" value="column_join_in6.pileup" ftype="pileup" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
93 <output name="output" file="column_join_out2.pileup" ftype="tabular" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
94 </test>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
95 <!-- This test is failing for an unclear reason (the column values do not get
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
96 passed into the script), but passes in the browser
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
97 <test>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
98 <param name="input1" value="column_join_in7.pileup" ftype="tabular" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
99 <param name="hinge" value="2" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
100 <param name="columns" value="3,4,5" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
101 <param name="fill_empty_columns_switch" value="fill_empty" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
102 <param name="column_fill_type" value="fill_value_by_column" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
103 <param name="column_number" value="5" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
104 <param name="fill_value" value="X" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
105 <param name="input2" value="column_join_in8.pileup" ftype="tabular" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
106 <param name="input" value="column_join_in9.pileup" ftype="tabular" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
107 <output name="output" file="column_join_out3.pileup" ftype="tabular" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
108 </test>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
109 -->
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
110 <test>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
111 <param name="input1" value="column_join_in10.pileup" ftype="pileup" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
112 <param name="hinge" value="1" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
113 <param name="columns" value="2,7" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
114 <param name="fill_empty_columns_switch" value="no_fill" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
115 <param name="input2" value="column_join_in11.pileup" ftype="pileup" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
116 <param name="input" value="column_join_in12.pileup" ftype="pileup" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
117 <output name="output" file="column_join_out4.pileup" ftype="tabular" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
118 </test>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
119 <test>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
120 <!-- Test for handling missing column -->
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
121 <param name="input1" value="column_join_in13.tabular" ftype="tabular" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
122 <param name="hinge" value="1" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
123 <param name="columns" value="5" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
124 <param name="fill_empty_columns_switch" value="fill_empty" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
125 <param name="column_fill_type" value="single_fill_value" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
126 <param name="fill_value" value="0" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
127 <param name="input2" value="column_join_in14.tabular" ftype="tabular" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
128 <param name="input" value="column_join_in15.tabular" ftype="tabular" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
129 <output name="output" file="column_join_out5.tabular" ftype="tabular" />
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
130 </test>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
131 </tests>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
132 <help>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
133 **What it does**
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
134
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
135 This tool allows you to join several files with the same column structure into one file, removing certain columns if necessary. The user needs to select a 'hinge', which is the number of left-most columns to match on. They also need to select the columns to include in the join, which should include the hinge columns, too.
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
136
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
137 Note that the files are expected to have the same number of columns. If for some reason the join column is missing (this only applies to the last column(s)), the tool attempts to handle this situation by inserting an empty item (or the appropriate filler) for that column on that row. This could lead to the situation where a row has a hinge but entirely empty or filled columns, if the hinge exists in at least one file but every file that has it is missing the join column. Also, note that the tool does not distinguish between a file missing the hinge altogether and a file having the hinge but missing the column (in both cases the column would be empty or filled). There is an example of this below.
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
138
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
139 -----
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
140
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
141 **General Example**
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
142
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
143 Given the following files::
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
144
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
145 FILE 1
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
146 chr2 1 T 6 .C..., I$$III
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
147 chr2 2 G 6 ..N.., III@II
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
148 chr2 3 C 7 ..C..., I$IIIII
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
149 chr2 4 G 7 .G...., I#IIIII
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
150 chr2 5 G 7 ...N.., IIII#BI
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
151 chr2 6 A 7 ..T..., I$IDIII
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
152 chr1 1 C 1 ^:. I
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
153 chr1 2 G 2 .^:. $I
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
154 chr1 3 A 2 .. I%
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
155 chr1 4 C 2 .. I$
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
156 chr1 5 T 3 ..^:. I#I
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
157 chr1 6 G 3 ..^:, I#I
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
158
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
159 FILE 2
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
160 chr1 3 T 1 ^:. I
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
161 chr1 4 G 2 .^:. $I
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
162 chr1 5 T 2 .. I%
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
163 chr1 6 C 3 ..^:. III
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
164 chr1 7 G 3 ..^:. I#I
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
165 chr1 8 T 4 ...^:, I#II
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
166 chr2 77 C 6 .G..., I$$III
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
167 chr2 78 G 6 ..N.., III@II
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
168 chr2 79 T 7 ..N..., I$IIIII
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
169 chr2 80 C 7 .G...., I#IIIII
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
170 chr2 81 G 7 ...A.., IIII#BI
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
171 chr2 82 A 8 ...G..., I$IDIIII
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
172 chr2 83 T 8 .A.....N IIIIIIII
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
173 chr2 84 A 9 ......T. I$IIIIIII
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
174
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
175 FILE 3
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
176 chr1 1 A 1 . I
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
177 chr1 2 T 2 G. I$
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
178 chr1 3 C 2 ., I@
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
179 chr1 4 C 3 ..N III
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
180 chr1 42 C 5 ...N^:. III@I
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
181 chr1 43 C 5 .N..^:. IIIII
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
182 chr1 44 T 5 .A.., IA@II
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
183 chr1 45 A 6 .N...^:. IIIII$
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
184 chr1 46 G 6 .GN..^:. I@IIII
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
185 chr1 47 A 7 ....^:.., IIIII$I
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
186 chr2 73 T 5 .N.., II$II
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
187 chr2 74 A 5 ...., IIIII
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
188 chr2 75 T 5 ...., IIIII
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
189 chr2 76 T 5 ...., IIIII
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
190 chr2 77 C 5 ...., IIIBI
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
191 chr2 78 T 5 ...., IDIII
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
192
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
193 To join on columns 3 and 4 combining on columns 1 and 2, columns 1-4 should be selected for the 'Include these columns' option, and column 2 selected for the 'hinge'. With these settings, the following would be output::
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
194
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
195 chr1 1 C 1 A 1
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
196 chr1 2 G 2 T 2
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
197 chr1 3 A 2 T 1 C 2
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
198 chr1 4 C 2 G 2 C 3
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
199 chr1 5 T 3 T 2
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
200 chr1 6 G 3 C 3
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
201 chr1 7 G 3
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
202 chr1 8 T 4
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
203 chr1 42 C 5
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
204 chr1 43 C 5
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
205 chr1 44 T 5
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
206 chr1 45 A 6
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
207 chr1 46 G 6
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
208 chr1 47 A 7
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
209 chr2 1 T 6
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
210 chr2 2 G 6
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
211 chr2 3 C 7
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
212 chr2 4 G 7
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
213 chr2 5 G 7
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
214 chr2 6 A 7
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
215 chr2 73 T 5
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
216 chr2 74 A 5
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
217 chr2 75 T 5
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
218 chr2 76 T 5
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
219 chr2 77 C 6 C 5
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
220 chr2 78 G 6 T 5
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
221 chr2 79 T 7
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
222 chr2 80 C 7
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
223 chr2 81 G 7
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
224 chr2 82 A 8
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
225 chr2 83 T 8
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
226 chr2 84 A 9
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
227
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
228 **Example with missing columns**
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
229
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
230 Given the following input files::
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
231
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
232 FILE 1
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
233 1 A
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
234 2 B b
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
235 4 C c
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
236 5 D
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
237 6 E e
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
238
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
239 FILE 2
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
240 1 M m
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
241 2 N
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
242 3 O o
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
243 4 P p
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
244 5 Q
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
245 7 R r
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
246
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
247 if we join only column 3 using column 1 as the hinge and with a fill value of '0', this is what will be output::
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
248
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
249 1 0 m
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
250 2 b 0
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
251 3 0 o
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
252 4 c p
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
253 5 0 0
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
254 6 e 0
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
255 7 0 r
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
256
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
257 Row 5 appears in both files with the missing column, so it's got nothing but fill values in the output file.
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
258
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
259 </help>
6bb6c0a30c67 Uploaded
jjohnson
parents:
diff changeset
260 </tool>