comparison rna_quast.xml @ 0:33c060ec0ac9 draft

"planemo upload for repository https://git.ufz.de/lehmanju/rnaquast commit 89fd73a81e54e9f5722b0a83ee00dc47ab0cb1e3"
author iuc
date Mon, 19 Oct 2020 08:04:52 +0000
parents
children e989670c7fc7
comparison
equal deleted inserted replaced
-1:000000000000 0:33c060ec0ac9
1 <tool id="rna_quast" name="rnaQUAST" version="@TOOL_VERSION@">
2 <description>A Quality Assessment Tool for De Novo Transcriptome Assemblies</description>
3 <macros>
4 <token name="@TOOL_VERSION@">2.1.0</token>
5 <xml name="element_matching_line" token_name="" token_expression="">
6 <element name="@NAME@">
7 <assert_contents><has_line_matching expression="@EXPRESSION@"/></assert_contents>
8 </element>
9 </xml>
10 <xml name="element_has_text" token_name="" token_text="">
11 <element name="@NAME@">
12 <assert_contents><has_text text="@TEXT@"/></assert_contents>
13 </element>
14 </xml>
15
16 <xml name="details_output_test" token_assembler="">
17 <element name="@ASSEMBLER@">
18 <element name="5000%-assembled.list"><assert_contents><has_n_lines n="0"/></assert_contents></element>
19 <element name="9500%-assembled.list"><assert_contents><has_n_lines n="0"/></assert_contents></element>
20 <expand macro="element_matching_line" name="alignment_metrics" expression="\s*== ALIGNMENT METRICS \(calculated with reference genome but without gene database\) ==\s*"/>
21 <expand macro="element_matching_line" name="alignment_multiplicity" expression="unaligned=\d+ aligned=\d+ alignments=\d+\s*"/>
22 <expand macro="element_matching_line" name="alignments_per_isoform" expression="avg=[\d.]+\s*"/>
23 <expand macro="element_matching_line" name="basic_metrics" expression="\s*== BASIC TRANSCRIPTS METRICS \(calculated without reference genome and gene database\) ==\s*"/>
24 <expand macro="element_matching_line" name="block_length" expression="avg=[\d.]+\s*"/>
25 <expand macro="element_matching_line" name="blocks_per_alignment" expression="avg=[\d.]+\s+tot=\d+\s*"/>
26 <expand macro="element_matching_line" name="database_metrics" expression="\s*== GENE DATABASE METRICS ==\s*"/>
27 <expand macro="element_matching_line" name="misassemblies" expression="\s*== ALIGNMENT METRICS FOR MISASSEMBLED \(CHIMERIC\) TRANSCRIPTS \(calculated with reference genome or with gene database\) ==\s*"/>
28 <expand macro="element_matching_line" name="mismatch_rate" expression="avg=[\d.]+\s+tot=\d+\s*"/>
29 <expand macro="element_matching_line" name="sensitivity" expression="\s*== ASSEMBLY COMPLETENESS \(SENSITIVITY\) ==\s*"/>
30 <expand macro="element_matching_line" name="specificity" expression="\s*== ASSEMBLY SPECIFICITY ==\s*"/>
31 <expand macro="element_matching_line" name="transcript_length" expression="avg=[\d.]+\s*"/>
32 <expand macro="element_matching_line" name="x-aligned" expression="avg=[\d.]+\s*"/>
33 <expand macro="element_matching_line" name="x-assembled" expression="avg=[\d.]+\s*"/>
34 <expand macro="element_matching_line" name="x-assembled_exons" expression="avg=[\d.]+\s*"/>
35 <expand macro="element_matching_line" name="x-covered" expression="avg=[\d.]+\s*"/>
36 <expand macro="element_matching_line" name="x-covered_exons" expression="avg=[\d.]+\s*"/>
37 <expand macro="element_matching_line" name="x-matched" expression="avg=[\d.]+\s*"/>
38 <expand macro="element_matching_line" name="x-matched_blocks" expression="avg=[\d.]+\s*"/>
39 </element>
40 </xml>
41
42 <xml name="txt_output_test" token_assembler="">
43 <output name="short_report_txt">
44 <assert_contents>
45 <has_text text="SHORT SUMMARY REPORT"/>
46 </assert_contents>
47 </output>
48 </xml>
49 <xml name="tex_output_test" token_assembler="">
50 <output name="short_report_tex">
51 <assert_contents>
52 <has_text text="Short summary report"/>
53 <has_text text="end{document}"/>
54 </assert_contents>
55 </output>
56 </xml>
57 <xml name="tsv_output_test" token_assembler="">
58 <output name="short_report_tsv">
59 <assert_contents>
60 <has_line_matching expression="^METRICS/TRANSCRIPTS\t.+$"/>
61 </assert_contents>
62 </output>
63 </xml>
64 <xml name="pdf_output_test" token_assembler="">
65 <output name="short_report_pdf">
66 <assert_contents>
67 <has_text text="rnaQUAST short report"/>
68 </assert_contents>
69 </output>
70 </xml>
71 </macros>
72 <requirements>
73 <requirement type="package" version="@TOOL_VERSION@">rnaquast</requirement>
74 </requirements>
75 <stdio>
76 <regex match="Traceback " source="both" level="fatal" description="rnaQuast failed" />
77 </stdio>
78 <command detect_errors="exit_code"><![CDATA[
79 #import re
80 #for $i in $in_fasta
81 ln -s '$i' '${re.sub('[^\w\-.]', '_', i.element_identifier)}' &&
82 #end for
83 #if $r
84 #for $rf in $r
85 ln -s '$rf' '${re.sub('[^\w\-.]', '_', rf.element_identifier)}' &&
86 #end for
87 #end if
88 #if $gene_coordinates.use_gtf == "true"
89 #for $g in $gene_coordinates.gtf
90 ln -s '$g' '${re.sub('[^\w\-.]', '_', g.element_identifier)}' &&
91 #end for
92 #end if
93 mkdir outputdir &&
94 rnaQUAST.py
95 --threads \${GALAXY_SLOTS:-1}
96 --transcripts
97 #for $i in $in_fasta
98 '${re.sub('[^\w\-.]', '_', i.element_identifier)}'
99 #end for
100 $strand_specific
101 #if $r
102 -r
103 #for $rf in $r
104 '${re.sub('[^\w\-.]', '_', rf.element_identifier)}'
105 #end for
106 #end if
107 #if $gene_coordinates.use_gtf == "true"
108 --gtf
109 #for $g in $gene_coordinates.gtf
110 '${re.sub('[^\w\-.]', '_', g.element_identifier)}'
111 #end for
112 $gene_coordinates.disable_infer_genes
113 $gene_coordinates.disable_infer_transcripts
114 #end if
115 $prokaryote
116 --min_alignment '$min_alignment'
117 #if "pdf" not in $out_sr and "plots" not in $out_add
118 --no_plots
119 #end if
120 $blat
121 $busco_lineage
122 ##GeneMarkS-T is not available in conda $gene_mark
123 $meta
124 --lower_threshold $lower_threshold
125 --upper_threshold $upper_threshold
126 -o outputdir
127
128 && mkdir details
129
130 ## move per outputs that are generated for each input (outputdir/ASSEMBLER_output)
131 ## to a joint dir (details) to make them discoverable
132 ## also remove "ASSEMBLER." prefixes from files (otherwise the test macros don't work)
133 #for $i in $in_fasta
134 #set basename = os.path.splitext(re.sub('[^\w\-.]', '_', $i.element_identifier))[0]
135 &&
136 (for f in \$(find 'outputdir/'$basename'_output' -type f);
137 do
138 d=\$(dirname \$f | cut -d"/" -f2 | cut -d'_' -f1) &&
139 mv \$f details/"\$d"_____"\$(basename \$f | sed 's/$basename\.//')";
140 done)
141 #end for
142
143 ## rename .list files to .txt files to make them detectable (format detection by extension)
144 ## the final `true` seems needed since otherwise the `;` at the end is swallowed
145 && find details/ -name "*.list" -exec mv {} {}.txt \;
146 && true
147 ]]></command>
148 <inputs>
149 <param name="in_fasta" type="data" format="fasta" multiple="true" label="Chromosomes/scaffolds file"/>
150 <param name="strand_specific" argument="-ss" type="boolean" truevalue="-ss" falsevalue="" checked="false" label="Strand-specific"/>
151 <param name="r" optional="true" argument="-r" type="data" format="fasta" multiple="true" label="Reference genome" />
152 <conditional name="gene_coordinates">
153 <param name="use_gtf" type="select" label="Use file with gene coordinates in GTF/GFF format?" help="We recommend to use files downloaded from GENCODE or Ensembl.">
154 <option value="true" selected="true">Yes</option>
155 <option value="false">No</option>
156 </param>
157 <when value="true">
158 <param name="gtf" argument="--gtf" type="data" format="gtf,gff,gff3" multiple="true" label="GTF/GFF file"/>
159 <param argument="--disable_infer_genes" type="boolean" truevalue="--disable_infer_genes" falsevalue="" checked="false" label=" GTF file contains genes records?"/>
160 <param argument="--disable_infer_transcripts" type="boolean" truevalue="--disable_infer_transcripts" falsevalue="" checked="false" label="GTF file contains transcripts records?"/>
161 </when>
162 <when value="false">
163 </when>
164 </conditional>
165 <param argument="--prokaryote" type="boolean" truevalue="--prokaryote" falsevalue="" checked="false" label="Is genome prokararyotic?"/>
166 <param argument="--min_alignment" type="integer" value="50" label="Minimal alignment length to be used"/>
167 <param argument="--blat" type="boolean" truevalue="--blat" falsevalue="" checked="false" label="Run with BLAT alignment tool instead of GMAP?" />
168 <param argument="--busco_lineage" type="boolean" truevalue="--busco_lineage" falsevalue="" checked="false" label="Run BUSCO tool?" help="The BUSCO tool detects core genes in the assembly. Use this option to provide path to the BUSCO lineage data (Eukaryota, Metazoa, Arthropoda, Vertebrata or Fungi)."/>
169 <!-- GeneMarkS-T is not available in conda <param argument="\-\-gene_mark" type="boolean" truevalue="\-\-gene_mark" falsevalue="" checked="false" label="Run with GeneMarkS-T gene prediction tool?"/>-->
170 <param argument="--meta" type="boolean" truevalue="--meta" falsevalue="" checked="false" label="Meta Transcriptome" help="Run quality asessment for Meta Transcriptome"/>
171 <param argument="--lower_threshold" type="integer" value="50" label="Lower threshold for x_assembled/covered/matched metrics."/>
172 <param argument="--upper_threshold" type="integer" value="95" label="Upper threshold for x_assembled/covered/matched metrics."/>
173 <param name="out_sr" type="select" multiple="true" label="Short report formats">
174 <option value="tsv" selected="true">tabular</option>
175 <option value="txt">txt</option>
176 <option value="tex">tex</option>
177 <option value="pdf" selected="true">pdf</option>
178 </param>
179 <param name="out_add" type="select" multiple="true" label="Additional outputs">
180 <option value="logs">Logs</option>
181 <option value="plots" selected="true">Plots (only for n>1)</option>
182 <option value="comparison" selected="true">Comparison for Chromosomes/scaffolds files (only for n>1)</option>
183 <option value="details" selected="true">Details per Chromosomes/scaffolds file</option>
184 <option value="details_plots" selected="true">Details per Chromosomes/scaffolds file as plot</option>
185 </param>
186 </inputs>
187
188 <outputs>
189 <data name="short_report_pdf" format="pdf" label="${tool.name} on ${on_string}: pdf report" from_work_dir="outputdir/short_report.pdf">
190 <filter>"pdf" in out_sr</filter>
191 </data>
192 <data name="short_report_txt" format="txt" label="${tool.name} on ${on_string}: txt report" from_work_dir="outputdir/short_report.txt">
193 <filter>"txt" in out_sr</filter>
194 </data>
195 <data name="short_report_tex" format="txt" label="${tool.name} on ${on_string}: tex report" from_work_dir="outputdir/short_report.tex">
196 <filter>"tex" in out_sr</filter>
197 </data>
198 <data name="short_report_tsv" format="tabular" label="${tool.name} on ${on_string}: tsv report" from_work_dir="outputdir/short_report.tsv">
199 <filter>"tsv" in out_sr</filter>
200 </data>
201 <collection name="list_logs" type="list" label="${tool.name} on ${on_string}: logs" >
202 <discover_datasets ext="txt" pattern="(?P&lt;name&gt;.+)\.log" directory="outputdir/logs/" visible="false" />
203 <filter>"logs" in out_add</filter>
204 </collection>
205 <!-- note the output filter of the next two outputs checks if there is
206 more than 1 input for in_fasta (for 1 its a HDA, for more list or HDAs) -->
207 <collection name="comparison_png" type="list" label="${tool.name} on ${on_string}: comparison plots" >
208 <discover_datasets ext="png" pattern="(?P&lt;name&gt;.+)\.png" directory="outputdir/comparison_output/" visible="false" recurse="true"/>
209 <filter> isinstance(in_fasta, list) and "plots" in out_add</filter>
210 </collection>
211 <collection name="comparison" type="list" label="${tool.name} on ${on_string}: comparison" >
212 <discover_datasets ext="txt" pattern="(?P&lt;name&gt;.+)\.txt" directory="outputdir/comparison_output/" visible="false" recurse="true" />
213 <filter> isinstance(in_fasta, list) and "comparison" in out_add</filter>
214 </collection>
215 <collection name="details" type="list:list" label="${tool.name} on ${on_string}: detailed output">
216 <discover_datasets pattern="(?P&lt;identifier_0&gt;.+)_____(?P&lt;identifier_1&gt;.+)\.(?P&lt;ext&gt;txt)" directory="details/" visible="false"/>
217 <filter>"details" in out_add</filter>
218 </collection>
219 <collection name="details_png" type="list:list" label="${tool.name} on ${on_string}: detailed output plots">
220 <discover_datasets pattern="(?P&lt;identifier_0&gt;.+)_____(?P&lt;identifier_1&gt;.+)\.(?P&lt;ext&gt;png)" directory="details/" visible="false"/>
221 <filter>"details_plots" in out_add</filter>
222 </collection>
223 </outputs>
224 <tests>
225 <test expect_num_outputs="7">
226 <param name="in_fasta" value="idba.fasta,Trinity.fasta" ftype="fasta" />
227 <param name="r" value="Saccharomyces_cerevisiae.R64-1-1.75.dna.toplevel.fa" ftype="fasta" />
228 <conditional name="gene_coordinates">
229 <param name="use_gtf" value="true" />
230 <param name="gtf" value="Saccharomyces_cerevisiae.R64-1-1.75.gtf" ftype="gtf" />
231 <param name="disable_infer_genes" value="true"/>
232 <param name="disable_infer_transcripts" value="true"/>
233 </conditional>
234 <param name="out_sr" value="txt,tex,tsv" />
235 <param name="out_add" value="logs,comparison,plots,details" />
236 <expand macro="txt_output_test"/>
237 <expand macro="tex_output_test"/>
238 <expand macro="tsv_output_test"/>
239 <output_collection name="comparison_png" type="list" count="15"/>
240 <output_collection name="comparison" type="list" count="19"/>
241 <output_collection name="list_logs" type="list" count="8"/>
242 <output_collection name="details" type="list:list" count="2">
243 <expand macro="details_output_test" assembler="Trinity"/>
244 <expand macro="details_output_test" assembler="idba"/>
245 </output_collection>
246 </test>
247 <test expect_num_outputs="6">
248 <param name="in_fasta" value="Trinity.fasta" ftype="fasta" />
249 <conditional name="gene_coordinates">
250 <param name="use_gtf" value="false" />
251 </conditional>
252 <param name="min_alignment" value="30" />
253 <param name="lower_threshold" value="45" />
254 <param name="upper_threshold" value="95"/>
255 <param name="out_sr" value="txt,tex,tsv,pdf" />
256 <param name="out_add" value="logs,details_plots" />
257
258 <expand macro="pdf_output_test"/>
259 <expand macro="tex_output_test"/>
260 <expand macro="tsv_output_test"/>
261 <expand macro="txt_output_test"/>
262 <output_collection name="list_logs" type="list">
263 <expand macro="element_has_text" name="Trinity.GeneMarkS_T.err" text=""/>
264 <expand macro="element_matching_line" name="rnaQUAST" expression="Thank you for using rnaQUAST!"/>
265 </output_collection>
266 <output_collection name="details_png" type="list:list" count="1">
267 <element name="Trinity">
268 <expand macro="element_has_text" name="Nx" text="PNG"/>
269 <expand macro="element_has_text" name="transcript_length" text="PNG"/>
270 </element>
271 </output_collection>
272 </test>
273 </tests>
274 <help><![CDATA[
275 **What is rnaQUAST**
276 - a quality assessment tool for de novo transcriptome assemblies
277 - evaluating RNA-Seq assembly quality and benchmarking transcriptome assemblers using reference genome and gene database
278 - calculates various metrics that demonstrate completeness and correctness levels of the assembled transcripts
279
280 **Using rnaQuast without reference** you wont get:
281
282 - x-assembled (Exons)
283 - Alignments per Isoform
284 - x-covered (Exons)
285 - x-matched (Blocks)
286 - gmap build logs
287
288 **Using rnaQuast with reference** you will get:
289 - Reports
290 - Logs
291 - Alignement/Basic Metrics
292 - Misassemblies/ Specificity/ Sensitivity
293 - Alignment multiplicity
294 - Block/ Transcript Lentgh
295 - Blocks per alignment
296 - Mismatch rate
297 - x-aligned
298 - Nx
299 - Blocks per alignment
300 - gmap build logs
301
302 **Using rnaQuast without gene coordinates** you wont get:
303 - x-assembled (Exons)
304 - Alignments per Isoform
305 - x-covered (Exons)
306 - x-matched (Blocks)
307 - gmap build logs
308 - Database Metrics
309 - Alignment multiplicity
310 - Mismatch rate
311 - NAx
312 - x-aligned
313 **Using rnaQuast with gene coordinates** you will get:
314 - Reports
315 - Logs
316 - Alignement/Basic Metrics
317 - Misassemblies/Specificity/Sensitivity
318 - Alignment multiplicity
319 - Block/Transcript length
320 - Blocks per alignment
321 - Mismatch rate
322 - x-aligned
323 - Nx/NAx
324 - gmap build logs
325 - Database Metrics
326 - Alignment multiplicity
327 More informations, see citations.
328 ]]></help>
329 <citations>
330 <citation type="doi">10.1093/bioinformatics/btw218 </citation>
331 </citations>
332 </tool>