annotate split_tabular_to_collection.xml @ 0:f6254e4e155e draft default tip

planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
author jjohnson
date Thu, 26 Oct 2017 13:32:38 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
1 <tool id="split_tabular_to_collection" name="Split Tabular into Collection" version="0.1.0">
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
2 <description>by lines</description>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
3 <command><![CDATA[
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
4 #set $width = len(str($input.dataset.metadata.data_lines))
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
5 #if $skip_comment_lines:
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
6 #set $skip = $input.dataset.metadata.comment_lines
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
7 #else
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
8 #set $skip = 0
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
9 #end if
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
10 #set $offset = $skip + 1
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
11 awk 'NR > $skip{ print \$0 > (sprintf("%s_%.${width}d","${input.name}",int((NR-${offset})/${lines})*${lines}) ) }' $input
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
12 ]]></command>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
13 <inputs>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
14 <param name="input" type="data" format="tabular" label="Tabular dataset to split"/>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
15 <param name="lines" type="integer" value="1000" min="1" label="Number of lines per output dataset"/>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
16 <param name="skip_comment_lines" type="boolean" truevalue="yes" falsevalue="no" checked="true"
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
17 label="Skip comment lines"/>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
18 </inputs>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
19 <outputs>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
20 <collection name="output_set" type="list" label="${input.name} Split List">
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
21 <discover_datasets pattern="__name__" ext="tabular" visible="false"/>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
22 </collection>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
23 </outputs>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
24 <tests>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
25 <test>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
26 <param name="input" value="input.tsv" ftype="tabular"/>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
27 <param name="lines" value="20"/>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
28 <output_collection name="output_set" type="list">
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
29 <element name="input.tsv_00">
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
30 <assert_contents>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
31 <has_text_matching expression="20\tt\tT" />
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
32 </assert_contents>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
33 </element>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
34 <element name="input.tsv_00">
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
35 <assert_contents>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
36 <has_text_matching expression="21\tu\tU" />
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
37 </assert_contents>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
38 </element>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
39 </output_collection>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
40 </test>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
41 </tests>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
42 <help><![CDATA[
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
43 Splits a tabular dataset into multiple datsets in a dataset collection.
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
44 This can be used in a workflow to process datasets in the collection in parallel.
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
45
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
46 ]]></help>
f6254e4e155e planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_to_collection commit b2ce04dd96d8b00103c23b58a4c6539a6b30809a-dirty
jjohnson
parents:
diff changeset
47 </tool>