Mercurial > repos > jjohnson > contig_annotation_tool
comparison macros.xml @ 0:ad7507073c3f draft
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cat commit f80f020c77d04c2e13b89aaea3d784314b940931-dirty
author | jjohnson |
---|---|
date | Sun, 24 Nov 2019 21:56:00 -0500 |
parents | |
children | 9a01840eac52 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:ad7507073c3f |
---|---|
1 <macros> | |
2 <token name="@VERSION@">5.0.3</token> | |
3 <xml name="requirements"> | |
4 <requirements> | |
5 <requirement type="package" version="@VERSION@">cat</requirement> | |
6 <yield/> | |
7 </requirements> | |
8 </xml> | |
9 <xml name="version_command"> | |
10 <version_command>CAT --version</version_command> | |
11 </xml> | |
12 <token name="@DATABASE_FOLDER@">CAT_database</token> | |
13 <token name="@TAXONOMY_FOLDER@">taxonomy</token> | |
14 <xml name="cat_db"> | |
15 <conditional name="db"> | |
16 <param name="db_src" type="select" label="CAT database from"> | |
17 <option value="cached">local cached database</option> | |
18 <option value="history">history</option> | |
19 </param> | |
20 <when value="cached"> | |
21 <param name="cat_builtin" type="select" label="Use a built-in CAT database" help="If the CAT database of interest is not listed, contact your Galaxy administrator"> | |
22 <options from_data_table="cat_databases"> | |
23 <filter type="sort_by" column="2" /> | |
24 <validator type="no_options" message="No CAT database is available." /> | |
25 </options> | |
26 </param> | |
27 </when> | |
28 <when value="history"> | |
29 <param name="cat_db" type="data" format="txt" label="A history dataset from CAT prepare tool"/> | |
30 </when> | |
31 </conditional> | |
32 </xml> | |
33 <token name="@CAT_DB@"><![CDATA[ | |
34 #if $db.db_src == 'cached': | |
35 --database_folder $db.cat_builtin.fields.database_folder | |
36 --taxonomy_folder $db.cat_builtin.fields.taxonomy_folder | |
37 #else | |
38 #import os.path | |
39 #set $catdb = $db.cat_db.extra_files_path | |
40 --database_folder '$os.path.join($catdb,"@DATABASE_FOLDER@")' | |
41 --taxonomy_folder '$os.path.join($catdb,"@TAXONOMY_FOLDER@")' | |
42 #end if | |
43 ]]></token> | |
44 <token name="@CAT_TAXONOMY@"><![CDATA[ | |
45 #if $db.db_src == 'cached': | |
46 --taxonomy_folder $db.cat_builtin.fields.taxonomy_folder | |
47 #else | |
48 #import os.path | |
49 #set $catdb = $db.cat_db.extra_files_path | |
50 --taxonomy_folder '$os.path.join($catdb,"@TAXONOMY_FOLDER@")' | |
51 #end if | |
52 ]]></token> | |
53 <xml name="test_catdb"> | |
54 <conditional name="db"> | |
55 <param name="db_src" value="cached"/> | |
56 <param name="cat_builtin" value="CAT_prepare_test"/> | |
57 </conditional> | |
58 </xml> | |
59 | |
60 <xml name="use_intermediates"> | |
61 <conditional name="previous"> | |
62 <param name="use_previous" type="select" label="Use previous gene prediction and diamond alignment"> | |
63 <option value="no">No</option> | |
64 <option value="yes">Yes</option> | |
65 </param> | |
66 <when value="no"/> | |
67 <when value="yes"> | |
68 <param argument="--proteins_fasta" type="data" format="fasta" label="predicted proteins fasta"/> | |
69 <param argument="--diamond_alignment" type="data" format="fasta" label="alignments file"/> | |
70 </when> | |
71 </conditional> | |
72 </xml> | |
73 <token name="@USE_INTERMEDIATES@"><![CDATA[ | |
74 #if $previous.use_previous == 'yes' | |
75 --proteins_fasta '$previous.proteins_fasta' | |
76 --diamond_alignment '$previous.diamond_alignment' | |
77 #end if | |
78 --out_prefix 'cat_output' | |
79 ]]></token> | |
80 | |
81 <xml name="custom_settings"> | |
82 <param argument="--range" type="integer" value="10" min="0" max="49" label="range"/> | |
83 <param argument="--fraction" type="float" value="0.5" min="0" max="0.99" label="fraction"/> | |
84 </xml> | |
85 <token name="@CUSTOM_SETTINGS@"><![CDATA[ | |
86 --range $range | |
87 --fraction $fraction | |
88 ]]></token> | |
89 <xml name="add_names_options"> | |
90 <param argument="--only_official" type="boolean" truevalue="--only_official" falsevalue="" checked="true" | |
91 label="Only output official level names."/> | |
92 <param argument="--exclude_scores" type="boolean" truevalue="--exclude_scores" falsevalue="" checked="false" | |
93 label="Exclude bit-score support scores in the lineage."/> | |
94 </xml> | |
95 <token name="@ADD_NAMES_OPTIONS@"><![CDATA[ | |
96 $only_official $exclude_scores | |
97 ]]></token> | |
98 <xml name="add_names"> | |
99 <conditional name="names"> | |
100 <param name="add_names" type="select" label="add_names"> | |
101 <option value="no">No</option> | |
102 <option value="orf2lca">ORF2LCA.txt</option> | |
103 <option value="classification">classification.txt</option> | |
104 <option value="both">ORF2LCA.txt and classification.txt</option> | |
105 </param> | |
106 <when value="no"/> | |
107 <when value="orf2lca"> | |
108 <expand macro="add_names_options"/> | |
109 </when> | |
110 <when value="classification"> | |
111 <expand macro="add_names_options"/> | |
112 </when> | |
113 <when value="both"> | |
114 <expand macro="add_names_options"/> | |
115 </when> | |
116 </conditional> | |
117 </xml> | |
118 <token name="@ADD_NAMES@"><![CDATA[ | |
119 #if $names.add_names in ['classification','both']: | |
120 && CAT add_names $names.only_official $names.exclude_scores | |
121 @CAT_TAXONOMY@ | |
122 #if $bcat == 'CAT' | |
123 -i cat_output.contigs2classification.tsv | |
124 #else | |
125 -i cat_output.bin2classification.tsv | |
126 #end if | |
127 -o classification_names.txt | |
128 && @TXT2TSV@ -i classification_names -o $classification_names | |
129 #end if | |
130 #if $names.add_names in ['orf2lca','both']: | |
131 && CAT add_names $names.only_official $names.exclude_scores | |
132 @CAT_TAXONOMY@ | |
133 -i cat_output.ORF2LCA.tsv | |
134 -o orf2lca_names.txt | |
135 && @TXT2TSV@ -i orf2lca_names.txt -o $orf2lca_names | |
136 #end if | |
137 ]]></token> | |
138 <xml name="summarise"> | |
139 <param name="summarise" type="select" label="summarise"> | |
140 <option value="no">No</option> | |
141 <option value="classification">classification.txt</option> | |
142 </param> | |
143 </xml> | |
144 <token name="@SUMMARISE@"><![CDATA[ | |
145 #if $summarise in ['classification']: | |
146 #if $names.add_names in ['classification','both'] and $names.only_official: | |
147 #set $summary_input = $classification_names | |
148 #else | |
149 #set $summary_input = classification_offical_names | |
150 && CAT add_names --only_official | |
151 @CAT_TAXONOMY@ | |
152 #if $bcat == 'CAT' | |
153 -i cat_output.contigs2classification.tsv | |
154 #else | |
155 -i cat_output.bin2classification.tsv | |
156 #end if | |
157 -o $summary_input | |
158 #end if | |
159 && CAT summarise | |
160 #if $bcat == 'CAT' | |
161 -c $contigs_fasta | |
162 #end if | |
163 -i $summary_input | |
164 -o classification_summary.txt | |
165 && @TXT2TSV@ -i classification_summary.txt -o $classification_summary | |
166 #end if | |
167 ]]></token> | |
168 | |
169 <xml name="select_outputs"> | |
170 <param name="select_outputs" type="select" multiple="true" optional="false" label="Select outputs"> | |
171 <option value="log" selected="true">CAT.log</option> | |
172 <option value="predicted_proteins_faa" selected="true">predicted_proteins.faa</option> | |
173 <option value="predicted_proteins_gff">predicted_proteins.gff</option> | |
174 <option value="alignment_diamond">alignment.diamond</option> | |
175 <option value="orf2lca" selected="true">ORF2LCA.txt</option> | |
176 <yield/> | |
177 </param> | |
178 </xml> | |
179 <xml name="select_cat_outputs"> | |
180 <param name="bcat" type="hidden" value="CAT"/> | |
181 <param name="seqtype" type="hidden" value="contig"/> | |
182 <expand macro="select_outputs"> | |
183 <option value="contig2classification" selected="true">contig2classification.txt</option> | |
184 </expand> | |
185 </xml> | |
186 <xml name="select_bat_outputs"> | |
187 <param name="bcat" type="hidden" value="BAT"/> | |
188 <param name="seqtype" type="hidden" value="bin"/> | |
189 <expand macro="select_outputs"> | |
190 <option value="bin2classification" selected="true">bin2classification.txt</option> | |
191 </expand> | |
192 </xml> | |
193 | |
194 <token name="@TXT2TSV@"><![CDATA[ | |
195 $__tool_directory__/tabpad.py | |
196 ]]></token> | |
197 <xml name="outputs"> | |
198 <data name="log" format="txt" label="${bcat}.log" from_work_dir="cat_output.log"> | |
199 <filter>'log' in select_outputs or not select_outputs</filter> | |
200 </data> | |
201 <data name="predicted_proteins_faa" format="fasta" label="${bcat}.predicted_proteins.faa" from_work_dir="cat_output.predicted_proteins.faa"> | |
202 <filter>'predicted_proteins_faa' in select_outputs</filter> | |
203 </data> | |
204 <data name="predicted_proteins_gff" format="gff" label="${bcat}.predicted_proteins.gff" from_work_dir="cat_output.predicted_proteins.gff"> | |
205 <filter>'predicted_proteins_gff' in select_outputs</filter> | |
206 </data> | |
207 <data name="alignment_diamond" format="tabular" label="${bcat}.alignment.diamond" from_work_dir="cat_output.alignment.diamond"> | |
208 <filter>'alignment_diamond' in select_outputs</filter> | |
209 <actions> | |
210 <action name="comment_lines" type="metadata" default="1" /> | |
211 <action name="column_names" type="metadata" default="qseqid,sseqid,pident,length,mismatch,gapopen,qstart,qend,sstart,send,evalue,bitscore" /> | |
212 </actions> | |
213 </data> | |
214 <data name="orf2lca" format="tabular" label="${bcat}.ORF2LCA.txt" from_work_dir="cat_output.ORF2LCA.tsv"> | |
215 <filter>'orf2lca' in select_outputs</filter> | |
216 <actions> | |
217 <action name="comment_lines" type="metadata" default="1" /> | |
218 <action name="column_names" type="metadata" default="ORF,lineage,bit-score" /> | |
219 </actions> | |
220 </data> | |
221 <data name="contig2classification" format="tabular" label="${bcat}.contig2classification.txt" from_work_dir="cat_output.contig2classification.tsv"> | |
222 <filter>'contig2classification' in select_outputs</filter> | |
223 <actions> | |
224 <action name="comment_lines" type="metadata" default="1" /> | |
225 <action name="column_names" type="metadata" default="contig,classification,reason,lineage,lineage scores" /> | |
226 </actions> | |
227 </data> | |
228 <data name="bin2classification" format="tabular" label="${bcat}.bin2classification.txt" from_work_dir="cat_output.bin2classification.tsv"> | |
229 <filter>'bin2classification' in select_outputs</filter> | |
230 <actions> | |
231 <action name="comment_lines" type="metadata" default="1" /> | |
232 <action name="column_names" type="metadata" default="bin,classification,reason,lineage,lineage scores" /> | |
233 </actions> | |
234 </data> | |
235 <data name="orf2lca_names" format="tabular" label="${bcat}.ORF2LCA.names.txt"> | |
236 <filter>'orf2lca' in names.add_names</filter> | |
237 <actions> | |
238 <action name="comment_lines" type="metadata" default="1" /> | |
239 <action name="column_names" type="metadata" default="ORF,lineage,bit-score,superkingdom,phylum,class,order,family,genus,species" /> | |
240 </actions> | |
241 </data> | |
242 <data name="classification_names" format="tabular" label="${bcat}.${seqtype}2classification.names.txt"> | |
243 <filter>'classification' in names.add_names</filter> | |
244 <actions> | |
245 <action name="comment_lines" type="metadata" default="1" /> | |
246 <action name="column_names" type="metadata" default="${seqtype},classification,reason,lineage,lineage scores,superkingdom,phylum,class,order,family,genus,species" /> | |
247 </actions> | |
248 </data> | |
249 <data name="classification_summary" format="tabular" label="${bcat}.${seqtype}2classification.summary.txt"> | |
250 <filter>'classification' in summarise</filter> | |
251 <actions> | |
252 <action name="comment_lines" type="metadata" default="1" /> | |
253 <action name="column_names" type="metadata" default="rank,clade,number of contigs,number of ORFs,number of positions" /> | |
254 </actions> | |
255 </data> | |
256 </xml> | |
257 <token name="@COMMON_HELP@"><![CDATA[ | |
258 The CAT/BAT workflow is described at: https://github.com/dutilh/CAT | |
259 ]]></token> | |
260 <xml name="citations"> | |
261 <citations> | |
262 <citation type="doi">https://doi.org/10.1101/072868</citation> | |
263 <citation type="doi">https://doi.org/10.1186/s13059-019-1817-x</citation> | |
264 <yield /> | |
265 </citations> | |
266 </xml> | |
267 </macros> |