annotate split_file_on_column.xml @ 3:b60f2452580e draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit af7f8fd0977384f9b4225d414623bf5d6ce23a7e
author bgruening
date Wed, 23 Dec 2015 03:50:48 -0500
parents 90b52d8d6f2c
children 37a53100b67e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
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
1 <tool id="tp_split_on_column" name="Split file" version="0.2">
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
2 <description>according to the values of a column</description>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
3 <requirements>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
4 <requirement type="package" version="4.1.0">gnu_awk</requirement>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
5 </requirements>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
6 <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
7 <![CDATA[
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
8 mkdir tmp_out &&
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
9 awk -F'\t' '{print > "tmp_out/"\$$column".$infile.ext" }' $infile
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
10 ]]>
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
11 </command>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
12 <inputs>
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 <param format="tabular" name="infile" type="data" label="File to select" />
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
14 <param name="column" label="on column" type="data_column" data_ref="infile" accept_default="true" />
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
15 </inputs>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
16 <outputs>
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
17 <collection name="split_output" type="list" label="Table split on first column">
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
18 <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
19 </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
20 </outputs>
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
21 <tests>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
22 <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
23 <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
24 <param name="column" value="5" />
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 <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
26 <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
27 <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
28 <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
29 </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
30 </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
31 <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
32 <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
33 <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
34 </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
35 </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
36 </output_collection>
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
37 </test>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
38 </tests>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
39 <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
40 <![CDATA[
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
41
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
42 **What it does**
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
43
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
44 This tool splits a file into different smaller files using a specific column.
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
45 It will work like the group tool, but every group is saved to its own file.
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
46
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
47 -----
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
48
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
49 **Example**
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
50
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
51 Splitting on column 5 from this::
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
52
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
53 chr7 56632 56652 cluster 1
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
54 chr7 56736 56756 cluster 1
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
55 chr7 56761 56781 cluster 2
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
56 chr7 56772 56792 cluster 2
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
57 chr7 56775 56795 cluster 2
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
58
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
59 will produce 2 files with different clusters::
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
60
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
61 chr7 56632 56652 cluster 1
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
62 chr7 56736 56756 cluster 1
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
63
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
64
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
65 chr7 56761 56781 cluster 2
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
66 chr7 56772 56792 cluster 2
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
67 chr7 56775 56795 cluster 2
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
68
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
69
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 ]]>
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
71 </help>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
72 </tool>