annotate split_file_on_column.xml @ 2:90b52d8d6f2c draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit 36d05738e78c68091b45779624734e6a47829856-dirty
author bgruening
date Wed, 26 Aug 2015 07:32:06 -0400
parents 0ba6d09a71d6
children b60f2452580e
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[
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
8 awk -F'\t' '{print > \$$column ".$infile.ext" }' $infile
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
9 ]]>
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
10 </command>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
11 <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
12 <param format="tabular" name="infile" type="data" label="File to select" />
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
13 <param name="column" label="on column" type="data_column" data_ref="infile" accept_default="true" />
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
14 </inputs>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
15 <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
16 <collection name="split_output" type="list" label="Table split on first column">
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 <discover_datasets pattern="__name_and_ext__" directory="." />
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
18 </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
19 </outputs>
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 <data format="input" name="outfile" metadata_source="infile" label="${tool.name} on ${on_string}"/>
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
22 </outputs-->
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
23 <tests>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
24 <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
25 <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
26 <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
27 <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
28 <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
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 <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
31 </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
32 </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
33 <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
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 <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
36 </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
37 </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
38 </output_collection>
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
39 </test>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
40 </tests>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
41 <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
42 <![CDATA[
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
43
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
44 **What it does**
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
45
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
46 This tool splits a file into different smaller files using a specific column.
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
47 It will work like the group tool, but every group is saved to its own file.
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
48
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
49 -----
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
50
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
51 **Example**
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
52
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
53 Splitting on column 5 from this::
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
54
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
55 chr7 56632 56652 cluster 1
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
56 chr7 56736 56756 cluster 1
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
57 chr7 56761 56781 cluster 2
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
58 chr7 56772 56792 cluster 2
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
59 chr7 56775 56795 cluster 2
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
60
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
61 will produce 2 files with different clusters::
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
62
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
63 chr7 56632 56652 cluster 1
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
64 chr7 56736 56756 cluster 1
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
65
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
66
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
67 chr7 56761 56781 cluster 2
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
68 chr7 56772 56792 cluster 2
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
69 chr7 56775 56795 cluster 2
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
70
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
71
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
72 ]]>
0
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
73 </help>
ad6a989924ac Uploaded
bgruening
parents:
diff changeset
74 </tool>