# HG changeset patch
# User iuc
# Date 1464363679 14400
# Node ID 2f120a5c49b1b752123870c3548148c8ce5d3c60
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/collection_column_join commit 3b918f5a99ea13ec5acc7cc5fdd310fadb773ac0
diff -r 000000000000 -r 2f120a5c49b1 collection_column_join.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/collection_column_join.xml	Fri May 27 11:41:19 2016 -0400
@@ -0,0 +1,130 @@
+
+    
+        on Collections
+    
+    
+        gnu_coreutils
+    
+    
+        
+        
+    
+    
+    
+    
+         1) {printf("${delimiter}")}; printf( "${tabular_item.element_identifier}_%s", arr[i] ); ctr++ } }; printf( "\n" ); }' > input_header.tmp &&
+        tail -n +${tail_offset} "${tabular_item}" | LC_ALL=C sort -t "${delimiter}" -k $identifier_column > input_file.tmp &&
+    #else:
+        awk '{ n = split(\$0,arr,"${delimiter}"); ctr=1; for(i=1;i<=n;i++){ if( i != $identifier_column ){ if( ctr > 1) {printf("${delimiter}")}; printf( "${tabular_item.element_identifier}_%s", i ); ctr++ } }; exit }' "${tabular_item}" > input_header.tmp &&
+        LC_ALL=C sort -t "${delimiter}" -k $identifier_column "${tabular_item}" > input_file.tmp &&
+    #end if
+    #if $i == 0:
+        mv input_file.tmp output${ ( $i + 1 ) % 2 }.tmp &&
+        #if $has_header:
+            awk '{ printf \$${identifier_column}; exit }' "${tabular_item}" > header${ $i % 2 }.tmp &&
+        #else:
+            echo "#KEY" > header${ $i % 2 }.tmp &&
+        #end if
+    #else:
+        LC_ALL=C join -o auto -a 1 -a 2 -1 ${left_identifier_column} -2 ${identifier_column} -t "${delimiter}" -e "${fill_char}" output${ $i % 2 }.tmp input_file.tmp  > output${ ( $i + 1 ) % 2 }.tmp &&
+        #set $left_identifier_column = 1
+    #end if
+    paste -d "${delimiter}" header${ $i % 2 }.tmp input_header.tmp > header${ ( $i + 1 ) % 2 }.tmp &&
+#end for
+cat header${ ( $i + 1 ) % 2 }.tmp output${ ( $i + 1 ) % 2 }.tmp > "${tabular_output}"
+    ]]>
+        
+    
+    
+        
+        
+        
+        
+        
+        
+            
+        
+    
+    
+        
+        
+            include_outputs and "output_shell_script" in include_outputs
+        
+    
+    
+        
+            
+            
+            
+            
+            
+            
+        
+        
+            
+            
+            
+            
+            
+            
+        
+    
+    
+        
+    
+    
+    
+
\ No newline at end of file
diff -r 000000000000 -r 2f120a5c49b1 test-data/in_1.tabular
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/in_1.tabular	Fri May 27 11:41:19 2016 -0400
@@ -0,0 +1,4 @@
+#KEY	c2	c3	c4
+one	1-1	1-2	1-3
+two	1-4	1-5	1-6
+three	1-7	1-8	1-9
diff -r 000000000000 -r 2f120a5c49b1 test-data/in_1_headerless.tabular
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/in_1_headerless.tabular	Fri May 27 11:41:19 2016 -0400
@@ -0,0 +1,3 @@
+one	1-1	1-2	1-3
+two	1-4	1-5	1-6
+three	1-7	1-8	1-9
diff -r 000000000000 -r 2f120a5c49b1 test-data/in_2.tabular
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/in_2.tabular	Fri May 27 11:41:19 2016 -0400
@@ -0,0 +1,4 @@
+#KEY	c2	c3	c4
+one	2-1	2-2	2-3
+two	2-4	2-5	2-6
+three	2-7	2-8	2-9
diff -r 000000000000 -r 2f120a5c49b1 test-data/in_2_headerless.tabular
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/in_2_headerless.tabular	Fri May 27 11:41:19 2016 -0400
@@ -0,0 +1,3 @@
+one	2-1	2-2	2-3
+two	2-4	2-5	2-6
+three	2-7	2-8	2-9
diff -r 000000000000 -r 2f120a5c49b1 test-data/in_3.tabular
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/in_3.tabular	Fri May 27 11:41:19 2016 -0400
@@ -0,0 +1,4 @@
+#KEY	c2	c3	c4
+one	3-3	3-2	3-3
+two	3-4	3-5	3-6
+three	3-7	3-8	3-9
diff -r 000000000000 -r 2f120a5c49b1 test-data/in_3_headerless.tabular
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/in_3_headerless.tabular	Fri May 27 11:41:19 2016 -0400
@@ -0,0 +1,3 @@
+one	3-3	3-2	3-3
+two	3-4	3-5	3-6
+three	3-7	3-8	3-9
diff -r 000000000000 -r 2f120a5c49b1 test-data/out_1.tabular
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/out_1.tabular	Fri May 27 11:41:19 2016 -0400
@@ -0,0 +1,4 @@
+#KEY	in_1.tabular_c2	in_1.tabular_c3	in_1.tabular_c4	in_2.tabular_c2	in_2.tabular_c3	in_2.tabular_c4	in_3.tabular_c2	in_3.tabular_c3	in_3.tabular_c4
+one	1-1	1-2	1-3	2-1	2-2	2-3	3-3	3-2	3-3
+three	1-7	1-8	1-9	2-7	2-8	2-9	3-7	3-8	3-9
+two	1-4	1-5	1-6	2-4	2-5	2-6	3-4	3-5	3-6
diff -r 000000000000 -r 2f120a5c49b1 test-data/out_2.tabular
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/out_2.tabular	Fri May 27 11:41:19 2016 -0400
@@ -0,0 +1,4 @@
+#KEY	in_1_headerless.tabular_2	in_1_headerless.tabular_3	in_1_headerless.tabular_4	in_2_headerless.tabular_2	in_2_headerless.tabular_3	in_2_headerless.tabular_4	in_3_headerless.tabular_2	in_3_headerless.tabular_3	in_3_headerless.tabular_4
+one	1-1	1-2	1-3	2-1	2-2	2-3	3-3	3-2	3-3
+three	1-7	1-8	1-9	2-7	2-8	2-9	3-7	3-8	3-9
+two	1-4	1-5	1-6	2-4	2-5	2-6	3-4	3-5	3-6
diff -r 000000000000 -r 2f120a5c49b1 tool_dependencies.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml	Fri May 27 11:41:19 2016 -0400
@@ -0,0 +1,6 @@
+
+
+    
+        
+    
+