comparison nanocomp.xml @ 0:719f83a2b91c draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/nanocomp/ commit 31eda859c4e23cd76d1e30824cc6899e8fc1e16a
author iuc
date Wed, 21 May 2025 21:08:19 +0000
parents
children ce9c8a64ea7c
comparison
equal deleted inserted replaced
-1:000000000000 0:719f83a2b91c
1 <tool id="nanocomp" name="NanoComp" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.2">
2 <description>Compare multiple runs of long read sequencing data and alignments.</description>
3 <macros>
4 <token name="@TOOL_VERSION@">1.25.2</token>
5 <token name="@VERSION_SUFFIX@">0</token>
6 </macros>
7 <xrefs>
8 <xref type="bio.tools">nanocomp</xref>
9 </xrefs>
10 <requirements>
11 <requirement type="package" version="@TOOL_VERSION@">nanocomp</requirement>
12 </requirements>
13 <version_command>NanoComp -v</version_command>
14 <command detect_errors="exit_code"><![CDATA[
15 #import re
16 ##link input file with names
17 #for $file in $inputs.input_type.input_data
18 #if '.' in str($file.name)
19 #set $in_name = re.sub('[\-\:\s]', '_', str($file.name))
20 #else
21 #set $in_name = re.sub('[\-\:\s]', '_', str($file.name)) + "." + $file.ext
22 #end if
23 ln -sf $file $in_name &&
24 #end for
25
26 ##run nanocomp
27 NanoComp
28
29 ##no need for the static images (becomes deprecated)
30 --make_no_static
31
32 ## Compute options
33 --threads \${GALAXY_SLOTS:-4}
34
35 ##add input files
36 #if $inputs.input_type.input_type_selector == "fastq"
37 --fastq
38 #else if $inputs.input_type.input_type_selector == "fastq_r"
39 --fastq_rich
40 #else if $inputs.input_type.input_type_selector == "fasta"
41 --fasta
42 #else if $inputs.input_type.input_type_selector == "bam"
43 --bam
44 #else if $inputs.input_type.input_type_selector == "ubam"
45 --ubam
46 #else if $inputs.input_type.input_type_selector == "cram"
47 --cram
48 #else if $inputs.input_type.input_type_selector == "pickle"
49 --pickle
50 #else if $inputs.input_type.input_type_selector == "arrow"
51 --arrow
52 #end if
53
54 #for $file in $inputs.input_type.input_data
55 #if '.' in str($file.name)
56 #set $in_name = re.sub('[\-\:\s]', '_', str($file.name))
57 #else
58 #set $in_name = re.sub('[\-\:\s]', '_', str($file.name)) + "." + $file.ext
59 #end if
60 $in_name
61 #end for
62
63 ##Filter options
64 #if $filters.maxlength
65 --maxlength $filters.maxlength
66 #end if
67 #if $filters.minlength
68 --minlength $filters.minlength
69 #end if
70
71 ##Plot options
72 #if $plot_options.plot
73 --plot $plot_options.plot
74 #end if
75
76 #if $plot_options.title
77 --title "$plot_options.title"
78 #end if
79
80 #if $plot_options.names
81 --names $plot_options.names
82 #end if
83
84 #if $plot_options.colors
85 --colors $plot_options.colors
86 #end if
87
88 ##Output options
89 #if $output_options.tsv_stats
90 $output_options.tsv_stats
91 #end if
92
93 --verbose
94 >& $out_log
95
96 ]]></command>
97 <inputs>
98 <section name="inputs" title="Input data" expanded="True">
99 <conditional name="input_type">
100 <param name="input_type_selector" type="select" label="Choose Input Format and Files">
101 <option value="fastq" selected="true">FASTQ files</option>
102 <option value="fastq_r">FASTQ-rich files</option>
103 <option value="fasta">FASTA files</option>
104 <option value="bam">BAM files</option>
105 <option value="ubam">uBAM files</option>
106 <option value="cram">CRAM files</option>
107 <option value="pickle">PICKLE files</option>
108 <option value="arrow">ARROW files</option>
109 </param>
110 <when value="fastq">
111 <param name="input_data" type="data" format="fastq,fastq.gz" multiple="true" label="FASTQ input files" help="Data is in (compressed) fastq format" />
112 </when>
113 <when value="fastq_r">
114 <param name="input_data" type="data" format="fastq,fastq.gz" multiple="true" label="FASTQ input files" help="Data is in one or more fastq file(s) generated by MinKNOW or guppy with additional information concerning channel and time" />
115 </when>
116 <when value="fasta">
117 <param name="input_data" type="data" format="fasta,fasta.gz" multiple="true" label="FASTA input files" help="Data is in (compressed) fasta format" />
118 </when>
119 <when value="bam">
120 <param name="input_data" type="data" format="bam" multiple="true" label="BAM input files" help="Data is in sorted bam files." />
121 </when>
122 <when value="ubam">
123 <param name="input_data" type="data" format="bam" multiple="true" label="Unmapped BAM input files" help="Data is in one or more unmapped bam files." />
124 </when>
125 <when value="cram">
126 <param name="input_data" type="data" format="cram" multiple="true" label="CRAM input files" help="Data is in sorted cram files." />
127 </when>
128 <when value="pickle">
129 <param name="input_data" type="data" format="binary" multiple="true" label="PICKLE input files" help="Data is in one or more pickle file(s) from using NanoComp/NanoPlot." />
130 </when>
131 <when value="arrow">
132 <param name="input_data" type="data" format="binary" multiple="true" label="ARROW input files" help="Data is in one or more feather/arrow file(s)." />
133 </when>
134 </conditional>
135 </section>
136
137 <section name="filters" title="Filtering Input Prior To Plotting" expanded="false">
138 <param argument="--maxlength" type="integer" optional="true" label="Max read length filtering" help="Drop reads longer than length specified." />
139 <param argument="--minlength" type="integer" optional="true" label="Min read length filtering" help="Drop reads shorter than length specified." />
140 </section>
141
142 <section name="plot_options" title="Plot Customization Options" expanded="false">
143 <param argument="--plot" type="select" label="Plot Type" help="Specify the type of plot to be used.">
144 <option value="box">Box plot</option>
145 <option value="violin" selected="true">Violin plot</option>
146 <option value="ridge">Ridge (joyplot) plot</option>
147 <option value="not">No plot</option>
148 </param>
149 <param argument="--title" type="text" label="Custom plot titles" help="Add a title to all plots." />
150 <param argument="--names" type="text" label="Custom names" help="Specify the names (space seperated, respective to input) to be used for the datasets." />
151 <param argument="--colors" type="text" label="Custom colors" help="Specify the colors (space seperated, respective to input) to be used for each the datasets. Can be any valid Matplotlib color: Named, HEX-string, RGB, ... " />
152 </section>
153
154 <section name="output_options" title="Output Options" expanded="false">
155 <param argument="--tsv_stats" type="boolean" truevalue="--tsv_stats" falsevalue="" optional="true" checked="false" label="TSV Output Format" help="Output the statistics file as properly formatted TSV."/>
156 </section>
157
158 </inputs>
159
160
161 <outputs>
162 <data name="out_log" format="txt" label="${tool.name} on ${on_string}: Log file"/>
163 <data name="stats_file" format="txt" from_work_dir="NanoStats.txt" label="${tool.name} on ${on_string}: Statistics file"/>
164 <data name="html_report" format="html" from_work_dir="NanoComp-report.html" label="${tool.name} on ${on_string}: Html Report"/>
165 </outputs>
166 <tests>
167 <test expect_num_outputs="3">
168 <section name="inputs">
169 <conditional name="input_type">
170 <param name="input_type_selector" value="fastq" />
171 <param name="input_data" value="in1.fastq.gz,in2.fastq.gz,in3.fastq.gz" />
172 </conditional>
173 </section>
174 <output name="stats_file" >
175 <assert_contents>
176 <has_text text="General summary" />
177 </assert_contents>
178 </output>
179 <output name="html_report">
180 <assert_contents>
181 <has_text text="html"/>
182 <has_text text="Summary statistics"/>
183 </assert_contents>
184 </output>
185 </test>
186 <test expect_num_outputs="3">
187 <section name="inputs">
188 <conditional name="input_type">
189 <param name="input_type_selector" value="bam" />
190 <param name="input_data" value="in4.bam,in5.bam" />
191 </conditional>
192 </section>
193 <section name="filters" >
194 <param name="maxlength" value="15000"/>
195 <param name="minlength" value="500"/>
196 </section>
197 <output name="html_report">
198 <assert_contents>
199 <has_text text="html"/>
200 <has_text text="Summary statistics"/>
201 </assert_contents>
202 </output>
203 </test>
204 <test expect_num_outputs="3">
205 <section name="inputs">
206 <conditional name="input_type">
207 <param name="input_type_selector" value="fastq" />
208 <param name="input_data" value="in1.fastq.gz,in3.fastq.gz" />
209 </conditional>
210 </section>
211 <section name="output_options">
212 <param name="tsv_stats" value="true"/>
213 </section>
214 <output name="stats_file" >
215 <assert_contents>
216 <has_text text="Metrics" />
217 </assert_contents>
218 </output>
219 </test>
220 <test expect_num_outputs="3">
221 <section name="inputs">
222 <conditional name="input_type">
223 <param name="input_type_selector" value="bam" />
224 <param name="input_data" value="in4.bam,in5.bam" />
225 </conditional>
226 </section>
227 <section name="plot_options" >
228 <param name="plot" value="box"/>
229 </section>
230 <output name="html_report">
231 <assert_contents>
232 <has_text text="html"/>
233 <has_text text="Plots"/>
234 </assert_contents>
235 </output>
236 </test>
237 </tests>
238 <help><![CDATA[
239 **NanoComp**
240
241 Compare multiple runs of long read sequencing data and alignments. Creates violin plots or box plots of length, quality and percent identity and creates dynamic, overlaying read length histograms and a cumulative yield plot.
242
243 **Usage Instructions**
244
245 Multiple input files (of the same type) are allowed
246
247 **Output Files**
248
249 HTML file with the stats report and associated plots
250
251 **More Information**
252
253 - **Official Repository**: [GitHub - wdecoster/nanocomp](https://github.com/wdecoster/nanocomp)
254 ]]></help>
255 <citations>
256 <citation type="doi">10.1093/bioinformatics/btad311</citation>
257 </citations>
258 </tool>