comparison chopper.xml @ 2:3470e4dbb1b3 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/chopper commit f25e203bf4e1d06d021b9a12007431c6e1a33347
author iuc
date Thu, 11 Dec 2025 19:38:38 +0000
parents 885c104a6667
children
comparison
equal deleted inserted replaced
1:885c104a6667 2:3470e4dbb1b3
1 <tool id="chopper" name="Chopper" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.2"> 1 <tool id="chopper" name="Chopper" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.2">
2 <description>Filtering and trimming of long reads.</description> 2 <description>Filtering and trimming of long reads.</description>
3 <macros> 3 <macros>
4 <token name="@TOOL_VERSION@">0.12.0</token> 4 <token name="@TOOL_VERSION@">0.12.0</token>
5 <token name="@VERSION_SUFFIX@">0</token> 5 <token name="@VERSION_SUFFIX@">1</token>
6 </macros> 6 </macros>
7 <requirements> 7 <requirements>
8 <requirement type="package" version="@TOOL_VERSION@">chopper</requirement> 8 <requirement type="package" version="@TOOL_VERSION@">chopper</requirement>
9 </requirements> 9 </requirements>
10 <version_command>chopper --version</version_command> 10 <version_command>chopper --version</version_command>
11 <command detect_errors="exit_code"><![CDATA[ 11 <command detect_errors="exit_code"><![CDATA[
12 chopper 12 chopper
13 13
14 --input $input 14 --input $input
15 15
16 #if $contam 16 #if $contam
17 --contam $contam 17 --contam $contam
18 #end if 18 #end if
19 19
20 #if $option_params.quality 20 #if $option_params.quality
21 --quality $option_params.quality.value 21 --quality $option_params.quality.value
22 #end if 22 #end if
23 23
24 #if $option_params.maxqual 24 #if $option_params.maxqual
25 --maxqual $option_params.maxqual.value 25 --maxqual $option_params.maxqual.value
26 #end if 26 #end if
27 27
28 #if $option_params.minlength 28 #if $option_params.minlength
29 --minlength $option_params.minlength.value 29 --minlength $option_params.minlength.value
30 #end if 30 #end if
31 31
32 #if $option_params.maxlength 32 #if $option_params.maxlength
33 --maxlength $option_params.maxlength.value 33 --maxlength $option_params.maxlength.value
34 #end if 34 #end if
35 35
36 #if $option_params.headcrop 36 #if $option_params.headcrop
37 --headcrop $option_params.headcrop.value 37 --headcrop $option_params.headcrop.value
38 #end if 38 #end if
39 39
40 #if $option_params.tailcrop 40 #if $option_params.tailcrop
41 --tailcrop $option_params.tailcrop.value 41 --tailcrop $option_params.tailcrop.value
42 #end if 42 #end if
43 43
44 #if $option_params.mingc 44 #if $option_params.mingc
45 --mingc $option_params.mingc.value 45 --mingc $option_params.mingc.value
46 #end if 46 #end if
47 47
48 #if $option_params.maxgc 48 #if $option_params.maxgc
49 --maxgc $option_params.maxgc.value 49 --maxgc $option_params.maxgc.value
50 #end if 50 #end if
51 51
52 ##output capture 52 ##output capture
53 #if $output_params.inverse == "yes" 53 #if $output_params.inverse == "yes"
54 $output_params.inverse 54 $output_params.inverse
55 #end if 55 #end if
56 56
57 #if $output_params.gzip == "no" 57
58 > $fq_filt 58 #if str($input.ext).endswith("gz")
59 | gzip > $fq_filt
59 #else 60 #else
60 | gzip > $fq_filt_gz 61 > $fq_filt
61 #end if 62 #end if
62 63
63 ]]></command> 64 ]]></command>
64 <inputs> 65 <inputs>
65 <param argument="--input" type="data" label="FASTQ file to check" format="fastq,fastq.gz,fastqsanger.gz,fastqsanger" /> 66 <param argument="--input" type="data" label="FASTQ file to check" format="fastqsanger.gz,fastqsanger" />
66 <param argument="--contam" type="data" format="fasta" optional="True" label="Reference FASTA" help="FASTA file with reference to check potential contaminants against."/> 67 <param argument="--contam" type="data" format="fasta" optional="True" label="Reference FASTA" help="FASTA file with reference to check potential contaminants against."/>
67 68
68 <section name="option_params" title="Optional Parameters" expanded="True"> 69 <section name="option_params" title="Optional Parameters" expanded="True">
69 <param argument="--quality" type="integer" label="Minimal quality score" value="0" min="0" max="60" help="Sets a minimum Phred average quality score."/> 70 <param argument="--quality" type="integer" label="Minimal quality score" value="0" min="0" max="60" help="Sets a minimum Phred average quality score."/>
70 <param argument="--maxqual" type="integer" label="Maximal quality score" value="60" min="0" max="60" help="Sets a maximum Phred average quality score."/> 71 <param argument="--maxqual" type="integer" label="Maximal quality score" value="60" min="0" max="60" help="Sets a maximum Phred average quality score."/>
71 <param argument="--minlength" type="integer" label="Sets a minimum read length" value="1" min="1" help="Minimal length of read to keep." optional="True"/> 72 <param argument="--minlength" type="integer" label="Sets a minimum read length" value="1" min="1" help="Minimal length of read to keep." optional="True"/>
72 <param argument="--maxlength" type="integer" label="Sets a maximum read length" help="Maximal length of read to keep" optional="True"/> 73 <param argument="--maxlength" type="integer" label="Sets a maximum read length" help="Maximal length of read to keep" optional="True"/>
73 <param argument="--headcrop" type="integer" optional="True" label="Headcrop" value="0" min="0" help="Trim N nucleotides from the start of a read."/> 74 <param argument="--headcrop" type="integer" optional="True" label="Headcrop" value="0" min="0" help="Trim N nucleotides from the start of a read."/>
74 <param argument="--tailcrop" type="integer" optional="True" label="Tailcrop" value="0" min="0" help="Trim N nucleotides from the end of a read."/> 75 <param argument="--tailcrop" type="integer" optional="True" label="Tailcrop" value="0" min="0" help="Trim N nucleotides from the end of a read."/>
75 <param argument="--mingc" type="float" optional="True" label="Minimum GC content" value="0.0" min="0.0" max="1.0" help="Sets a minimum GC content for reads to keep."/> 76 <param argument="--mingc" type="float" optional="True" label="Minimum GC content" value="0.0" min="0.0" max="1.0" help="Sets a minimum GC content for reads to keep."/>
76 <param argument="--maxgc" type="float" optional="True" label="Maximum GC content" value="1.0" min="0.0" max="1.0" help="Sets a maximum GC content for reads to keep."/> 77 <param argument="--maxgc" type="float" optional="True" label="Maximum GC content" value="1.0" min="0.0" max="1.0" help="Sets a maximum GC content for reads to keep."/>
77 <param argument="--trim" type="integer" label="Q-score cutoff to trim read ends" value="0" min="0" max="60" help="Takes a quality score and will trim the ends of the reads if they are below the specified cut-off (window-size = 1)."/> 78 <param argument="--trim" type="integer" label="Q-score cutoff to trim read ends" value="0" min="0" max="60" help="Takes a quality score and will trim the ends of the reads if they are below the specified cut-off (window-size = 1)."/>
78 </section> 79 </section>
79 80 <section name="output_params" title="Output Parameters" expanded="False">
80 <section name="output_params" title="Output Parameters" expanded="False"> 81 <param argument="--inverse" type="boolean" checked="false" truevalue="--inverse" falsevalue="" label="Output the opposite of the normal results" help="Reverse the output results (aka, the 'failed reads')"/>
81 <param argument="--inverse" type="boolean" checked="false" truevalue="--inverse" falsevalue="" label="Output the opposite of the normal results" help="Reverse the output results (aka, the 'failed reads')"/> 82 </section>
82 <param name="gzip" type="boolean" checked="true" truevalue="yes" falsevalue="no" label="Gzip output data" help="Set to 'no' to NOT gzip the output file [default gzip output]."/> 83 </inputs>
83 </section> 84 <outputs>
84 </inputs> 85 <data name="fq_filt" format_source="input" label="${tool.name} on ${on_string}" />
85 86 </outputs>
86 <outputs> 87 <tests>
87 <data name="fq_filt_gz" format="fastq.gz" label="${tool.name} on ${input.name} ($on_string), gzipped" > 88 <!-- 1) -->
88 <filter> output_params['gzip'] is True </filter> 89 <test expect_num_outputs="1">
89 </data> 90 <param name="input" ftype="fastqsanger" value="other-test.fastq"/>
90 <data name="fq_filt" format="fastq" label="${tool.name} on ${input.name} ($on_string)" > 91 <output name="fq_filt" ftype="fastqsanger">
91 <filter> output_params['gzip'] is False </filter> 92 <assert_contents>
92 </data> 93 <has_text text="@35febf09-dcbc-424c-987e-9f3f80fe73a5"/>
93 </outputs> 94 <has_text text="@3fda06e9-62ef-4448-9993-b90124a793d5"/>
94 95 <has_text text="@19d9337f-4fb6-46e5-b484-14d05f562506"/>
95 <tests> 96 </assert_contents>
96 <test expect_num_outputs="1"> 97 </output>
97 <param name="input" value="other-test.fastq"/> 98 </test>
98 <section name="output_params"> 99 <!-- 2) -->
99 <param name="gzip" value="false"/> 100 <test expect_num_outputs="1">
100 </section> 101 <param name="input" ftype="fastqsanger" value="other-test.fastq"/>
101 <output name="fq_filt"> 102 <param name="contam" value="random_contam.fa"/>
102 <assert_contents> 103 <output name="fq_filt" ftype="fastqsanger">
103 <has_text text="@35febf09-dcbc-424c-987e-9f3f80fe73a5"/> 104 <assert_contents>
104 <has_text text="@3fda06e9-62ef-4448-9993-b90124a793d5"/> 105 <has_text text="@35febf09-dcbc-424c-987e-9f3f80fe73a5"/>
105 <has_text text="@19d9337f-4fb6-46e5-b484-14d05f562506"/> 106 <has_text text="@3fda06e9-62ef-4448-9993-b90124a793d5"/>
106 </assert_contents> 107 <has_text text="@19d9337f-4fb6-46e5-b484-14d05f562506"/>
107 </output> 108 </assert_contents>
108 </test> 109 </output>
109 <test expect_num_outputs="1"> 110 </test>
110 <param name="input" value="other-test.fastq"/> 111 <!-- 3) -->
111 <param name="contam" value="random_contam.fa"/> 112 <test expect_num_outputs="1">
112 <output name="fq_filt" ftype="fastq.gz" decompress="true"> <!-- file="out2.fq.gz"/> --> 113 <param name="input" ftype="fastqsanger" value="testGC.fastq"/>
113 <assert_contents> 114 <section name="option_params">
114 <has_text text="@35febf09-dcbc-424c-987e-9f3f80fe73a5"/> 115 <param name="mingc" value="0.3"/>
115 <has_text text="@3fda06e9-62ef-4448-9993-b90124a793d5"/> 116 <param name="maxgc" value="0.8"/>
116 <has_text text="@19d9337f-4fb6-46e5-b484-14d05f562506"/> 117 </section>
117 </assert_contents> 118 <output name="fq_filt" ftype="fastqsanger">
118 </output> 119 <assert_contents>
119 </test> 120 <not_has_text text='@GC20'/>
120 <test expect_num_outputs="1"> 121 <not_has_text text='@GC0'/>
121 <param name="input" value="testGC.fastq"/> 122 <not_has_text text='@GC100'/>
122 <section name="option_params"> 123 <has_text text='@GC50'/>
123 <param name="mingc" value="0.3"/> 124 <has_text text='@GC80'/>
124 <param name="maxgc" value="0.8"/> 125 </assert_contents>
125 </section> 126 </output>
126 <section name="output_params"> 127 </test>
127 <param name="gzip" value="false"/> 128 <!-- 4) fastqsanger -->
128 </section> 129 <test expect_num_outputs="1">
129 <output name="fq_filt" > 130 <param name="input" ftype="fastqsanger" value="wrapping_as_sanger.fastqsanger"/>
130 <assert_contents> 131 <section name="option_params">
131 <not_has_text text='@GC20'/> 132 <param name="maxlength" value="136"/>
132 <not_has_text text='@GC0'/> 133 </section>
133 <not_has_text text='@GC100'/> 134 <output name="fq_filt" ftype="fastqsanger">
134 <has_text text='@GC50'/> 135 <assert_contents>
135 <has_text text='@GC80'/> 136 <not_has_text text='@SRR014849.203935'/>
136 </assert_contents> 137 <has_text text='@SRR014849.50939'/>
137 </output> 138 <has_text text='@SRR014849.110027'/>
138 </test> 139 </assert_contents>
139 </tests> 140 </output>
140 <help><![CDATA[ 141 </test>
142 <!-- 5) fastqsanger.gz -->
143 <test expect_num_outputs="1">
144 <param name="input" ftype="fastqsanger.gz" value="wrapping_as_sanger.fastqsanger.gz"/>
145 <section name="option_params">
146 <param name="maxlength" value="136"/>
147 </section>
148 <output name="fq_filt" ftype="fastqsanger.gz" decompress="true">
149 <assert_contents>
150 <not_has_text text='@SRR014849.203935'/>
151 <has_text text='@SRR014849.50939'/>
152 <has_text text='@SRR014849.110027'/>
153 </assert_contents>
154 </output>
155 <assert_stderr>
156 <has_text text="Kept 2 reads out of 3 reads"/>
157 </assert_stderr>
158 </test>
159 </tests>
160 <help><![CDATA[
141 **Chopper** 161 **Chopper**
142 162
143 Rust implementation of NanoFilt+NanoLyse, both originally written in Python. This tool, intended for long read sequencing such as PacBio or ONT, filters and trims a fastq file. 163 Rust implementation of NanoFilt+NanoLyse, both originally written in Python. This tool, intended for long read sequencing such as PacBio or ONT, filters and trims a fastq file.
144 Filtering is done on average read quality and minimal or maximal read length, and applying a headcrop (start of read) and tailcrop (end of read) while printing the reads passing the filter. 164 Filtering is done on average read quality and minimal or maximal read length, and applying a headcrop (start of read) and tailcrop (end of read) while printing the reads passing the filter.
145 165
149 169
150 - **Official Repository**: `Chopper on GitHub`_ 170 - **Official Repository**: `Chopper on GitHub`_
151 171
152 .. _Chopper on GitHub: https://github.com/wdecoster/chopper 172 .. _Chopper on GitHub: https://github.com/wdecoster/chopper
153 173
154 ]]></help> 174 ]]></help>
155 <citations> 175 <citations>
156 <citation type="doi">10.1093/bioinformatics/btad311</citation> 176 <citation type="doi">10.1093/bioinformatics/btad311</citation>
157 </citations> 177 </citations>
158 </tool> 178 </tool>