upstream-extended/community/tools/text_processing/text_processing/cat.xml
1<tool id="tp_cat" name="Concatenate datasets" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2 <description>tail-to-head (cat)</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="creator"/>
7 <expand macro="requirements" />
8 <version_command>
9 <![CDATA[
10 cat --version | head -n 1
11 ]]>
12 </version_command>
13 <command>
14 <![CDATA[
15 #for $file in $inputs:
16 cat '$file' >> '$out_file1' &&
17 #end for
18 #for $q in $queries:
19 #for $file in $q.inputs2:
20 cat '$file' >> '$out_file1' &&
21 #end for
22 #end for
23 exit 0
24 ]]></command>
25 <inputs>
26 <param name="inputs" multiple="true" type="data" format="txt,fastq.gz,fasta.gz,genbank.gz,tabular.gz" label="Datasets to concatenate"/>
27 <repeat name="queries" title="Dataset">
28 <param name="inputs2" type="data" format="txt,fastq.gz,fasta.gz,genbank.gz,tabular.gz" multiple="True" label="Select" />
29 </repeat>
30 </inputs>
31 <outputs>
32 <data name="out_file1" format_source="inputs" metadata_source="inputs"/>
33 </outputs>
34 <tests>
35 <test>
36 <param name="inputs" value="sort_result1.bed,sort_result2.bed,sort_result3.bed"/>
37 <output name="out_file1" file="cat_result1.txt"/>
38 </test>
39 <test>
40 <param name="inputs" value="sort_result1.bed,sort_result3.bed"/>
41 <repeat name="queries">
42 <param name="inputs2" value="sort_result3.bed,sort_result3.bed"/>
43 </repeat>
44 <repeat name="queries">
45 <param name="inputs2" value="sort_result3.bed"/>
46 </repeat>
47 <output name="out_file1" file="cat_result2.txt"/>
48 </test>
49 </tests>
50 <help>
51<![CDATA[
52
53.. class:: warningmark
54
55**WARNING:** Be careful not to concatenate datasets of different kinds (e.g., sequences with intervals). This tool does not check if the datasets being concatenated are in the same format.
56
57-----
58
59**What it does**
60
61Concatenates datasets
62
63-----
64
65**Example**
66
67Concatenating Dataset::
68
69 chrX 151087187 151087355 A 0 -
70 chrX 151572400 151572481 B 0 +
71
72with Dataset1::
73
74 chr1 151242630 151242955 X 0 +
75 chr1 151271715 151271999 Y 0 +
76 chr1 151278832 151279227 Z 0 -
77
78and with Dataset2::
79
80 chr2 100000030 200000955 P 0 +
81 chr2 100000015 200000999 Q 0 +
82
83will result in the following::
84
85 chrX 151087187 151087355 A 0 -
86 chrX 151572400 151572481 B 0 +
87 chr1 151242630 151242955 X 0 +
88 chr1 151271715 151271999 Y 0 +
89 chr1 151278832 151279227 Z 0 -
90 chr2 100000030 200000955 P 0 +
91 chr2 100000015 200000999 Q 0 +
92
93]]>
94 </help>
95 <expand macro="citations" />
96</tool>