comparison cami_amber_convert_to_biobox.xml @ 0:8754ed6f0096 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/amber/ commit eec9d5fede4b4b81bd163e00a1654bd33c589fb3
author iuc
date Tue, 04 Jun 2024 11:41:24 +0000
parents
children fac3911ad3b6
comparison
equal deleted inserted replaced
-1:000000000000 0:8754ed6f0096
1 <tool id="cami_amber_convert" name="CAMI AMBER convert to biobox" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2 <description>Create binning file(s) for CAMI AMBER</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements" />
7 <command detect_errors="exit_code">
8 <![CDATA[
9
10 mkdir -p output
11
12 #for $file in $input.files:
13 &&
14 ln -s '$file' './$file.element_identifier'
15 #end for
16
17 #if $work == "single":
18 #for $file in $input.files:
19 &&
20 #set $out = $file.element_identifier.split('.')[0] + '.tsv'
21 convert_fasta_bins_to_biobox_format.py
22 -o 'output/$out'
23 '$file.element_identifier'
24 #end for
25 #else:
26 &&
27 convert_fasta_bins_to_biobox_format.py
28 -o 'output/binning.tsv'
29 #for $file in $input.files:
30 '$file.element_identifier'
31 #end for
32 #end if
33
34 ]]>
35 </command>
36 <inputs>
37 <param name="work" type="select" label="Merge binning output files?"
38 help="If yes all input files will be merged into one biobox output (required input by amber). If no each input will be converted into a separate biobox output file." >
39 <option value="single">Each file alone</option>
40 <option value="all">All together</option>
41 </param>
42 <conditional name="input">
43 <param name="is_select" type="select" label="Choose how to input the files"
44 help="You can provide each input separately or as a collection">
45 <option value="manually">Manually</option>
46 <option value="data">Data collection</option>
47 </param>
48 <when value="manually">
49 <param name="files" type="data" format="fasta" multiple="true"
50 label="Input fasta files"
51 help="Input all fasta files which this tool should convert into biobox format" />
52 </when>
53 <when value="data">
54 <param name="files" type="data_collection" collection_type="list" format="fasta"
55 label="Input the fasta collection"
56 help="Input the fasta collected which the tool should convert into biobox format" />
57 </when>
58 </conditional>
59 </inputs>
60 <outputs>
61 <data name="binning_file" format="tabular" from_work_dir="output/binning.tsv" label="${tool.name}: BINNING FILE">
62 <filter>work and "all" in work</filter>
63 </data>
64 <collection name="binning_collection" type="list" label="${tool.name}: BINNING COLLECTION" >
65 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.tsv" format="tabular" directory="output/" recurse="true" />
66 <filter>work and "single" in work</filter>
67 </collection>
68 </outputs>
69 <tests>
70 <test expect_num_outputs="1" >
71 <param name="work" value="single" />
72 <conditional name="input" >
73 <param name="is_select" value="manually" />
74 <param name="files" value="test_add1.fasta,test_add2.fasta" ftype="fasta" />
75 </conditional>
76 <output_collection name="binning_collection" type="list">
77 <element name="test_add1" >
78 <assert_contents>
79 <has_n_lines n="1464" />
80 </assert_contents>
81 </element>
82 <element name="test_add2" >
83 <assert_contents>
84 <has_n_lines n="36" />
85 </assert_contents>
86 </element>
87 </output_collection>
88 </test>
89 <test expect_num_outputs="1" >
90 <param name="work" value="single" />
91 <conditional name="input" >
92 <param name="is_select" value="data" />
93 <param name="files" >
94 <collection name="test" type="list" >
95 <element name="test_add1" value="test_add1.fasta" />
96 <element name="test_add2" value="test_add2.fasta" />
97 </collection>
98 </param>
99 </conditional>
100 <output_collection name="binning_collection" type="list">
101 <element name="test_add1" >
102 <assert_contents>
103 <has_n_lines n="1464" />
104 </assert_contents>
105 </element>
106 <element name="test_add2" >
107 <assert_contents>
108 <has_n_lines n="36" />
109 </assert_contents>
110 </element>
111 </output_collection>
112 </test>
113 <test expect_num_outputs="1" >
114 <param name="work" value="all" />
115 <conditional name="input" >
116 <param name="is_select" value="manually" />
117 <param name="files" value="test_add1.fasta,test_add2.fasta" ftype="fasta" />
118 </conditional>
119 <output name="binning_file">
120 <assert_contents>
121 <has_n_lines n="1496" />
122 </assert_contents>
123 </output>
124 </test>
125 <test expect_num_outputs="1" >
126 <param name="work" value="all" />
127 <conditional name="input" >
128 <param name="is_select" value="data" />
129 <param name="files" >
130 <collection name="test" type="list" >
131 <element name="test_add1" value="test_add1.fasta" />
132 <element name="test_add2" value="test_add2.fasta" />
133 </collection>
134 </param>
135 </conditional>
136 <output name="binning_file">
137 <assert_contents>
138 <has_n_lines n="1496" />
139 </assert_contents>
140 </output>
141 </test>
142 </tests>
143 <help>
144 <![CDATA[
145 .. class:: infomark
146
147 **What it does**
148
149 This tool can create a tsv file in biobox format or a collection of multiple files.
150
151 **Input**
152
153 This tool required only fasta files. You can submit n files manually or a collection of fasta files.
154
155 **Output**
156
157 This tool either give out 1 binning file in biobox format or for each inputted file 1 binning file in biobox format.
158
159 ]]>
160 </help>
161 <expand macro="citations" />
162 </tool>