Skip to content

Commit 69a2f21

Browse files
authored
Merge pull request #7531 from lsterck/update_nanocomp
Update nanocomp wrapper (fastq -fastqsanger)
2 parents f25e203 + 3dbf2eb commit 69a2f21

File tree

1 file changed

+170
-168
lines changed

1 file changed

+170
-168
lines changed

tools/nanocomp/nanocomp.xml

Lines changed: 170 additions & 168 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
<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.6</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[
2+
<description>Compare multiple runs of long read sequencing data and alignments</description>
3+
<macros>
4+
<token name="@TOOL_VERSION@">1.25.6</token>
5+
<token name="@VERSION_SUFFIX@">1</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[
1515
#import re
16-
##link input file with names
16+
17+
##link input files with proper names (Nanocomp checks file-extensions)
18+
#set $linked_files = []
1719
#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 &&
20+
#if '.' in str($file.name)
21+
#set $in_name = re.sub('[\-\:\s]', '_', str($file.name))
22+
#else
23+
#set $in_name = re.sub('[\-\:\s]', '_', str($file.name)) + "." + $file.ext
24+
#end if
25+
ln -sf '$file' '$in_name' &&
26+
#silent $linked_files.append($in_name)
2427
#end for
2528
2629
##run nanocomp
@@ -29,7 +32,7 @@
2932
##no need for the static images (becomes deprecated)
3033
--make_no_static
3134
32-
## Compute options
35+
##Compute options
3336
--threads \${GALAXY_SLOTS:-4}
3437
3538
##add input files
@@ -51,13 +54,9 @@
5154
--arrow
5255
#end if
5356
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
57+
## add the input files
58+
#for $file in $linked_files
59+
'$file'
6160
#end for
6261
6362
##Filter options
@@ -94,148 +93,151 @@
9493
>& $out_log
9594
9695
]]></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>
96+
<inputs>
97+
<section name="inputs" title="Input data" expanded="True">
98+
<conditional name="input_type">
99+
<param name="input_type_selector" type="select" label="Choose Input Format and Files">
100+
<option value="fastq" selected="true">FASTQ files</option>
101+
<option value="fastq_r">FASTQ-rich files</option>
102+
<option value="fasta">FASTA files</option>
103+
<option value="bam">BAM files</option>
104+
<option value="ubam">uBAM files</option>
105+
<option value="cram">CRAM files</option>
106+
<option value="pickle">PICKLE files</option>
107+
<option value="arrow">ARROW files</option>
108+
</param>
109+
<when value="fastq">
110+
<param name="input_data" type="data" format="fastqsanger,fastqsanger.gz" multiple="true" label="FASTQ input files" help="Data is in (compressed) fastq format" />
111+
</when>
112+
<when value="fastq_r">
113+
<param name="input_data" type="data" format="fastqsanger,fastqsanger.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" />
114+
</when>
115+
<when value="fasta">
116+
<param name="input_data" type="data" format="fasta,fasta.gz" multiple="true" label="FASTA input files" help="Data is in (compressed) fasta format" />
117+
</when>
118+
<when value="bam">
119+
<param name="input_data" type="data" format="bam" multiple="true" label="BAM input files" help="Data is in sorted bam files." />
120+
</when>
121+
<when value="ubam">
122+
<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." />
123+
</when>
124+
<when value="cram">
125+
<param name="input_data" type="data" format="cram" multiple="true" label="CRAM input files" help="Data is in sorted cram files." />
126+
</when>
127+
<when value="pickle">
128+
<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." />
129+
</when>
130+
<when value="arrow">
131+
<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)." />
132+
</when>
133+
</conditional>
134+
</section>
141135

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>
136+
<section name="filters" title="Filtering Input Prior To Plotting" expanded="false">
137+
<param argument="--maxlength" type="integer" optional="true" label="Max read length filtering" help="Drop reads longer than length specified." />
138+
<param argument="--minlength" type="integer" optional="true" label="Min read length filtering" help="Drop reads shorter than length specified." />
139+
</section>
153140

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>
141+
<section name="plot_options" title="Plot Customization Options" expanded="false">
142+
<param argument="--plot" type="select" label="Plot Type" help="Specify the type of plot to be used.">
143+
<option value="box">Box plot</option>
144+
<option value="violin" selected="true">Violin plot</option>
145+
<option value="ridge">Ridge (joyplot) plot</option>
146+
<option value="not">No plot</option>
147+
</param>
148+
<param argument="--title" type="text" label="Custom plot titles" help="Add a title to all plots." />
149+
<param argument="--names" type="text" label="Custom names" help="Specify the names (space seperated, respective to input) to be used for the datasets." />
150+
<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, ... " />
151+
</section>
157152

158-
</inputs>
153+
<section name="output_options" title="Output Options" expanded="false">
154+
<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."/>
155+
</section>
159156

157+
</inputs>
160158

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[
159+
<outputs>
160+
<data name="out_log" format="txt" label="${tool.name} on ${on_string}: Log file"/>
161+
<data name="stats_file" format="txt" from_work_dir="NanoStats.txt" label="${tool.name} on ${on_string}: Statistics file"/>
162+
<data name="html_report" format="html" from_work_dir="NanoComp-report.html" label="${tool.name} on ${on_string}: Html Report"/>
163+
</outputs>
164+
<tests>
165+
<!-- 1) fastq.gz input -->
166+
<test expect_num_outputs="3">
167+
<section name="inputs">
168+
<conditional name="input_type">
169+
<param name="input_type_selector" value="fastq" />
170+
<param name="input_data" ftype="fastqsanger.gz" value="in1.fastq.gz,in2.fastq.gz,in3.fastq.gz" />
171+
</conditional>
172+
</section>
173+
<output name="stats_file" ftype="txt">
174+
<assert_contents>
175+
<has_text text="General summary" />
176+
</assert_contents>
177+
</output>
178+
<output name="html_report" ftype="html">
179+
<assert_contents>
180+
<has_text text="html"/>
181+
<has_text text="Summary statistics"/>
182+
</assert_contents>
183+
</output>
184+
</test>
185+
<!-- 2) bam input -->
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" ftype="bam" 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" ftype="html">
198+
<assert_contents>
199+
<has_text text="html"/>
200+
<has_text text="Summary statistics"/>
201+
</assert_contents>
202+
</output>
203+
</test>
204+
<!-- 3) fastq.gz input, tsv output -->
205+
<test expect_num_outputs="3">
206+
<section name="inputs">
207+
<conditional name="input_type">
208+
<param name="input_type_selector" value="fastq" />
209+
<param name="input_data" ftype="fastqsanger.gz" value="in1.fastq.gz,in3.fastq.gz" />
210+
</conditional>
211+
</section>
212+
<section name="output_options">
213+
<param name="tsv_stats" value="true"/>
214+
</section>
215+
<output name="stats_file" ftype="txt">
216+
<assert_contents>
217+
<has_text text="Metrics" />
218+
</assert_contents>
219+
</output>
220+
</test>
221+
<!-- 4) bam input, box plot output -->
222+
<test expect_num_outputs="3">
223+
<section name="inputs">
224+
<conditional name="input_type">
225+
<param name="input_type_selector" value="bam" />
226+
<param name="input_data" ftype="bam" value="in4.bam,in5.bam" />
227+
</conditional>
228+
</section>
229+
<section name="plot_options" >
230+
<param name="plot" value="box"/>
231+
</section>
232+
<output name="html_report" ftype="html">
233+
<assert_contents>
234+
<has_text text="html"/>
235+
<has_text text="Plots"/>
236+
</assert_contents>
237+
</output>
238+
</test>
239+
</tests>
240+
<help><![CDATA[
239241
**NanoComp**
240242
241243
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.
@@ -252,7 +254,7 @@ HTML file with the stats report and associated plots
252254
253255
- **Official Repository**: [GitHub - wdecoster/nanocomp](https://github.com/wdecoster/nanocomp)
254256
]]></help>
255-
<citations>
256-
<citation type="doi">10.1093/bioinformatics/btad311</citation>
257-
</citations>
257+
<citations>
258+
<citation type="doi">10.1093/bioinformatics/btad311</citation>
259+
</citations>
258260
</tool>

0 commit comments

Comments
 (0)