annotate split_file_on_column.xml @ 6:ff2a81aa3f08 draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
author bgruening
date Tue, 19 Jul 2022 13:25:20 +0000
parents d4b5b70e82cb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
1 <tool id="tp_split_on_column" name="Split by group" version="0.6">
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
2 <requirements>
6
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
3 <requirement type="package" version="5.1.0">gawk</requirement>
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
4 </requirements>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
5 <command>
2
90b52d8d6f2c planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
bgruening
parents: 1
diff changeset
6 <![CDATA[
4
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
7 mkdir tmp_out &&
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
8 #if $include_header
6
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
9 awk -F '\t' 'NR==1{hdr=$0;next}f!="tmp_out/"\$$column".$infile.ext"{if(f) close(f); f="tmp_out/"\$$column".$infile.ext"}; {if (!seen[f]++) print hdr>f; print >> f}' $infile
4
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
10 #else
6
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
11 awk -F'\t' '{print >> "tmp_out/"\$$column".$infile.ext" }' '$infile'
4
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
12 #end if
2
90b52d8d6f2c planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
bgruening
parents: 1
diff changeset
13 ]]>
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
14 </command>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
15 <inputs>
5
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
16 <param format="tabular" name="infile" type="data" label="File to split" />
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
17 <param name="column" label="on column" type="data_column" data_ref="infile" accept_default="true" />
4
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
18
5
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
19 <param name="include_header" type="boolean" label="Include header in splits?"
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
20 help="Include the first line (the assumed header line) to all split files." />
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
21 </inputs>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
22 <outputs>
5
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
23 <collection name="split_output" type="list" label="Split by group collection">
3
b60f2452580e planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit af7f8fd0977384f9b4225d414623bf5d6ce23a7e
bgruening
parents: 2
diff changeset
24 <discover_datasets pattern="__name_and_ext__" directory="tmp_out" />
2
90b52d8d6f2c planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
bgruening
parents: 1
diff changeset
25 </collection>
90b52d8d6f2c planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
bgruening
parents: 1
diff changeset
26 </outputs>
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
27 <tests>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
28 <test>
2
90b52d8d6f2c planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
bgruening
parents: 1
diff changeset
29 <param name="infile" value="5cols.tabular" ftype="tabular"/>
90b52d8d6f2c planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
bgruening
parents: 1
diff changeset
30 <param name="column" value="5" />
4
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
31 <param name="include_header" value="false"/>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
32 <output_collection name="split_output" type="list">
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
33 <element name="1">
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
34 <assert_contents>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
35 <has_text_matching expression="chr7\t56632\t56652\tcluster\t1" />
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
36 </assert_contents>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
37 </element>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
38 <element name="2">
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
39 <assert_contents>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
40 <has_text_matching expression="chr7\t56761\t56781\tcluster\t2" />
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
41 </assert_contents>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
42 </element>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
43 </output_collection>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
44 </test>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
45 <test>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
46 <param name="infile" value="5cols-with-header.tabular" ftype="tabular" />
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
47 <param name="column" value="5" />
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
48 <param name="include_header" value="true"/>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
49 <output_collection name="split_output" type="list">
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
50 <element name="1">
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
51 <assert_contents>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
52 <has_line_matching expression="Column1\tColumn2\tColumn3\tColumn4\tColumn5" />
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
53 <has_n_lines n="3" />
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
54 <has_text_matching expression="chr7\t56632\t56652\tcluster\t1" />
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
55 </assert_contents>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
56 </element>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
57 <element name="2">
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
58 <assert_contents>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
59 <has_line_matching expression="Column1\tColumn2\tColumn3\tColumn4\tColumn5" />
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
60 <has_n_lines n="4" />
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
61 <has_text_matching expression="chr7\t56761\t56781\tcluster\t2" />
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
62 </assert_contents>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
63 </element>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
64 </output_collection>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
65 </test>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
66 <test>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
67 <param name="infile" value="5cols-with-header.tabular" ftype="tabular" />
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
68 <param name="column" value="5" />
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
69 <param name="include_header" value="false"/>
2
90b52d8d6f2c planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
bgruening
parents: 1
diff changeset
70 <output_collection name="split_output" type="list">
90b52d8d6f2c planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
bgruening
parents: 1
diff changeset
71 <element name="1">
90b52d8d6f2c planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
bgruening
parents: 1
diff changeset
72 <assert_contents>
90b52d8d6f2c planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
bgruening
parents: 1
diff changeset
73 <has_text_matching expression="chr7\t56632\t56652\tcluster\t1" />
90b52d8d6f2c planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
bgruening
parents: 1
diff changeset
74 </assert_contents>
90b52d8d6f2c planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
bgruening
parents: 1
diff changeset
75 </element>
90b52d8d6f2c planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
bgruening
parents: 1
diff changeset
76 <element name="2">
90b52d8d6f2c planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
bgruening
parents: 1
diff changeset
77 <assert_contents>
90b52d8d6f2c planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
bgruening
parents: 1
diff changeset
78 <has_text_matching expression="chr7\t56761\t56781\tcluster\t2" />
90b52d8d6f2c planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
bgruening
parents: 1
diff changeset
79 </assert_contents>
90b52d8d6f2c planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
bgruening
parents: 1
diff changeset
80 </element>
90b52d8d6f2c planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
bgruening
parents: 1
diff changeset
81 </output_collection>
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
82 </test>
6
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
83 <test><!-- test with unsorted column, no header -->
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
84 <param name="infile" value="5cols-unsorted.tabular" ftype="tabular" />
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
85 <param name="column" value="5" />
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
86 <param name="include_header" value="false"/>
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
87 <output_collection name="split_output" type="list">
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
88 <element name="1">
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
89 <assert_contents>
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
90 <has_n_lines n="3" />
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
91 </assert_contents>
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
92 </element>
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
93 <element name="2">
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
94 <assert_contents>
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
95 <has_n_lines n="2" />
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
96 </assert_contents>
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
97 </element>
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
98 </output_collection>
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
99 </test>
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
100 <test><!-- test with unsorted column, with header -->
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
101 <param name="infile" value="5cols-unsorted-with-header.tabular" ftype="tabular" />
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
102 <param name="column" value="5" />
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
103 <param name="include_header" value="true"/>
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
104 <output_collection name="split_output" type="list">
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
105 <element name="1">
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
106 <assert_contents>
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
107 <has_n_lines n="4" />
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
108 <has_line_matching expression="Column1\tColumn2\tColumn3\tColumn4\tColumn5" />
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
109
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
110 </assert_contents>
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
111 </element>
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
112 <element name="2">
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
113 <assert_contents>
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
114 <has_n_lines n="3" />
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
115 <has_line_matching expression="Column1\tColumn2\tColumn3\tColumn4\tColumn5" />
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
116 </assert_contents>
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
117 </element>
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
118 </output_collection>
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
119 </test>
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
120 </tests>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
121 <help>
2
90b52d8d6f2c planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
bgruening
parents: 1
diff changeset
122 <![CDATA[
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
123
5
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
124 ========
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
125 Synopsis
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
126 ========
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
127
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
128 Given a single input dataset this tool splits the file on unique values from a specified column.
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
129
5
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
130 ===========
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
131 Description
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
132 ===========
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
133
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
134 This tool splits a file into a collection based on unique values of a speific column.
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
135 It performs a grouping operation with every group saved as a separate collection element.
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
136 You have the option to include the header (first line) to all splits.
4
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
137 If you have a header and don't want keep it, please remove it before you use this tool.
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
138 For example with the "Remove beginning of a file" tool.
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
139
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
140 -----
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
141
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
142 **Example**
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
143
5
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
144 Splitting this file on column 1::
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
145
5
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
146 chr1 10 20
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
147 chr1 30 40
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
148 chr2 40 70
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
149 chr4 60 80
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
150
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
151
6
ff2a81aa3f08 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 6a2deb2f38472a2845123bd54e73b6bd115b3a0b
bgruening
parents: 5
diff changeset
152 will produce a collection with 3 elements::
5
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
153
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
154 chr1 10 20
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
155 chr1 30 40
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
156
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
157 chr2 40 70
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
158
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
159 chr4 60 80
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
160
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
161 ------
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
162
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
163 .. image:: $PATH_TO_IMAGES/split_by_group.svg
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
164 :width: 800
d4b5b70e82cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f
bgruening
parents: 4
diff changeset
165 :alt: Split by group
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
166
2
90b52d8d6f2c planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
bgruening
parents: 1
diff changeset
167 ]]>
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
168 </help>
4
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
169 <citations>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
170 <citation type="bibtex">
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
171 @misc{githubsplit_file_on_column,
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
172 author = {Gruening, Bjoern},
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
173 year = {2015},
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
174 title = {split_file_on_column},
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
175 publisher = {GitHub},
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
176 journal = {GitHub repository},
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
177 url = {https://github.com/bgruening/galaxytools},
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
178 }
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
179 </citation>
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
180 </citations>
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
181 </tool>
4
37a53100b67e "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
bgruening
parents: 3
diff changeset
182