11
|
1 <tool id="cutadapt" name="Cutadapt" version="1.6">
|
|
2 <description>Remove adapter sequences from Fastq/Fasta</description>
|
|
3 <requirements>
|
|
4 <requirement type="package" version="1.6">cutadapt</requirement>
|
|
5 </requirements>
|
|
6 <version_command>cutadapt --version</version_command>
|
|
7
|
|
8 <command>cutadapt
|
|
9 #if $input.extension.startswith( "fastq"):
|
|
10 --format=fastq
|
|
11 #if $input.extension == "fastqillumina":
|
|
12 --quality-base=64
|
|
13 #end if
|
|
14 #if $input.extension == "fastqsolexa":
|
|
15 --quality-base=64
|
|
16 #end if
|
|
17 #else
|
|
18 --format=$input.extension
|
|
19 #end if
|
|
20 #for $a in $adapters
|
|
21 #if $a.adapter_source.adapter_source_list == 'prebuilt':
|
|
22 --adapter="${a.adapter_source.adapter.fields.name}"='${a.adapter_source.adapter}'
|
|
23 #else if str($a.adapter_source.adapter_name) != "":
|
|
24 --adapter='${a.adapter_source.adapter_name}'='${a.adapter_source.adapter}'
|
|
25 #else
|
|
26 --adapter='${a.adapter_source.adapter}'
|
|
27 #end if
|
|
28 #end for
|
|
29
|
|
30 $anywhere_adapters_textbox
|
|
31
|
|
32 #for $aa in $anywhere_adapters
|
|
33 #if $aa.anywhere_adapter_source.anywhere_adapter_source_list == 'prebuilt':
|
|
34 --anywhere="${aa.anywhere_adapter_source.anywhere_adapter.fields.name}"='${aa.anywhere_adapter_source.anywhere_adapter}'
|
|
35 #else if str($aa.anywhere_adapter_source.anywhere_adapter_name) != "":
|
|
36 --anywhere='${aa.anywhere_adapter_source.anywhere_adapter_name}'='${aa.anywhere_adapter_source.anywhere_adapter}'
|
|
37 #else
|
|
38 --anywhere='${aa.anywhere_adapter_source.anywhere_adapter}'
|
|
39 #end if
|
|
40 #end for
|
|
41 #for $fa in $front_adapters
|
|
42 #if $fa.front_adapter_source.front_adapter_source_list == 'prebuilt':
|
|
43 --front="${fa.front_adapter_source.front_adapter.fields.name}"='${fa.front_adapter_source.front_adapter}'
|
|
44 #else if str($fa.front_adapter_source.front_adapter_name) != "":
|
|
45 --front='${fa.front_adapter_source.front_adapter_name}'='${fa.front_adapter_source.front_adapter}'
|
|
46 #else
|
|
47 --front='${fa.front_adapter_source.front_adapter}'
|
|
48 #end if
|
|
49 #end for
|
|
50 --error-rate=$error_rate
|
|
51 --times=$count
|
|
52 --overlap=$overlap
|
|
53 $no_indels
|
|
54 $match_read_wildcards
|
|
55
|
|
56 #if str( $output_filtering_options.output_filtering) == "filter":
|
|
57 $output_filtering_options.discard
|
|
58 $output_filtering_options.discard_untrimmed
|
|
59 $output_filtering_options.no_trim
|
|
60 $output_filtering_options.mask_adapter
|
|
61 #if str($output_filtering_options.min) != '0':
|
|
62 --minimum-length=$output_filtering_options.min
|
|
63 #end if
|
|
64 #if str($output_filtering_options.max) != '0':
|
|
65 --maximum-length=$output_filtering_options.max
|
|
66 #end if
|
|
67 #end if
|
|
68
|
|
69 --output='$output'
|
|
70
|
|
71 #if $paired_end.paired_end_boolean:
|
|
72 --paired-output='$paired_output'
|
|
73 #end if
|
|
74
|
|
75 #if str( $output_params.output_type ) == "additional":
|
|
76 #if $output_params.rest_file:
|
|
77 --rest-file=$rest_output
|
|
78 #end if
|
|
79 #if $output_params.wildcard_file:
|
|
80 --wildcard-file=$wild_output
|
|
81 #end if
|
|
82 #if $output_params.too_short_file:
|
|
83 --too-short-output=$too_short_output
|
|
84 #end if
|
|
85 #if $output_params.too_long_file:
|
|
86 --too-long-output=$too_long_output
|
|
87 #end if
|
|
88 #if $output_params.untrimmed_file:
|
|
89 --untrimmed-output=$untrimmed_output
|
|
90 #if $paired_end.paired_end_boolean:
|
|
91 --untrimmed-paired-output=$untrimmed_paired_output
|
|
92 #end if
|
|
93 #end if
|
|
94 #if $output_params.info_file:
|
|
95 --info-file=$info_file
|
|
96 #end if
|
|
97
|
|
98 #end if
|
|
99
|
|
100 #if str( $read_modification_params.read_modification) == "modify":
|
|
101 #if str($read_modification_params.quality_cutoff) != '0':
|
|
102 --quality-cutoff=$read_modification_params.quality_cutoff
|
|
103 #end if
|
|
104 #if str($read_modification_params.cut) != '0':
|
|
105 --cut=$read_modification_params.cut
|
|
106 #end if
|
|
107 #if $read_modification_params.prefix != '':
|
|
108 --prefix="$read_modification_params.prefix"
|
|
109 #end if
|
|
110 #if $read_modification_params.suffix != '':
|
|
111 --suffix="$read_modification_params.suffix"
|
|
112 #end if
|
|
113 #if $read_modification_params.length_tag != '':
|
|
114 --length-tag="$read_modification_params.length_tag"
|
|
115 #end if
|
|
116 $read_modification_params.zero_cap
|
|
117 #end if
|
|
118
|
|
119 '$input'
|
|
120
|
|
121 #if $paired_end.paired_end_boolean:
|
|
122 '$input2'
|
|
123 #end if
|
|
124
|
|
125 > $report
|
|
126 </command>
|
|
127 <inputs>
|
|
128 <param format="fastq, fastqsanger, fastqillumina, fastqsolexa, fasta" name="input" type="data" optional="false" label="Fastq file to trim" length="100"/>
|
|
129 <conditional name="paired_end">
|
|
130 <param name="paired_end_boolean" type="boolean" value="false" label="Track Paired Reads" help="This option will keep a second file synchronized if you use one of the filtering options that discards reads. It will NOT trim adapters off of the second read. You must run Cutadapt a second time on the output of the first run to trim adapters from both reads (see Cutadapt documentation for details)." />
|
|
131 <when value="true">
|
|
132 <param format="fastq, fastqsanger, fastqillumina, fastqsolexa, fasta" name="input2" type="data" optional="false" label="Paired fastq file (NOT trimmed)" length="100"/>
|
|
133 </when>
|
|
134 </conditional>
|
|
135 <param name="anywhere_adapters_textbox" area="True" size="20x40" type="text" value="-b GATCGGAAGAGCACACGTCTGAACTCCAGTCACACAGTGATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACACTGATATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACACTTGAATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACAGTCAAATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACAGTTCCATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACATCACGATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACATGAGCATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACATGTCAATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACATTCCTATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACCAAAAGATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACCAACTAATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACCACCGGATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACCACGATATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACCACTCAATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACCAGATCATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACCAGGCGATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACCATGGCATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACCATTTTATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACCCAACAATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACCCGTCCATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACCGATGTATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACCGGAATATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACCGTACGATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACCTAGCTATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACCTATACATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACCTCAGAATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACCTTGTAATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACGACGACATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACGAGTGGATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACGATCAGATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACGCCAATATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACGGCTACATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACGGTAGCATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACGTAGAGATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACGTCCGCATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACGTGAAAATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACGTGGCCATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACGTTTCGATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACTAATCGATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACTACAGCATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACTAGCTTATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACTATAATATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACTCATTCATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACTCCCGAATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACTCGAAGATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACTCGGCAATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACTGACCAATCTCGTATGCCGTCTTCTGCTTG -b GATCGGAAGAGCACACGTCTGAACTCCAGTCACTTAGGCATCTCGTATGCCGTCTTCTGCTTG -b " label="Preset cutadapters, replace by yours if required"/>
|
|
136
|
|
137 <repeat name="adapters" title="3' Adapters" help="Sequence of an adapter that was ligated to the 3' end. The adapter itself and anything that follows is trimmed.">
|
|
138 <conditional name="adapter_source">
|
|
139 <param name="adapter_source_list" type="select" label="Source" >
|
|
140 <option value="prebuilt" selected="true">Standard (select from the list below)</option>
|
|
141 <option value="user">Enter custom sequence</option>
|
|
142 </param>
|
|
143
|
|
144 <when value="user">
|
|
145 <param name="adapter_name" size="30" label="Enter custom 3' adapter name (Optional)" type="text" value="" />
|
|
146 <param name="adapter" size="30" label="Enter custom 3' adapter sequence" type="text" value="AATTGGCC" />
|
|
147 </when>
|
|
148
|
|
149 <when value="prebuilt">
|
|
150 <param name="adapter" type="select" label="Choose 3' adapter">
|
|
151 <options from_file="cutadapt_adapters.txt">
|
|
152 <column name="name" index="1"/>
|
|
153 <column name="value" index="0"/>
|
|
154 </options>
|
|
155 </param>
|
|
156 </when>
|
|
157 </conditional>
|
|
158 </repeat>
|
|
159
|
|
160 <repeat name="anywhere_adapters" title="5' or 3' (Anywhere) Adapters" help="Sequence of an adapter that was ligated to the 5' or 3' end. If the adapter is found within the read or overlapping the 3' end of the read, the behavior is the same as for the -a option. If the adapter overlaps the 5' end (beginning of the read), the initial portion of the read matching the adapter is trimmed, but anything that follows is kept. If multiple -a or -b options are given, only the best matching adapter is trimmed.">
|
|
161 <conditional name="anywhere_adapter_source">
|
|
162 <param name="anywhere_adapter_source_list" type="select" label="Source">
|
|
163 <option value="prebuilt" selected="true">Standard (select from the list below)</option>
|
|
164 <option value="user">Enter custom sequence</option>
|
|
165 </param>
|
|
166
|
|
167 <when value="user">
|
|
168 <param name="anywhere_adapter_name" size="30" label="Enter custom 5' or 3' adapter name (Optional)" type="text" value="" />
|
|
169 <param name="anywhere_adapter" size="30" label="Enter custom 5' or 3' adapter sequence" type="text" value="AATTGGCC" />
|
|
170 </when>
|
|
171 <when value="prebuilt">
|
|
172 <param name="anywhere_adapter" type="select" label="Choose 5' or 3' adapter">
|
|
173 <options from_file="cutadapt_adapters.txt">
|
|
174 <column name="name" index="1"/>
|
|
175 <column name="value" index="0"/>
|
|
176 </options>
|
|
177 </param>
|
|
178 </when>
|
|
179 </conditional>
|
|
180 </repeat>
|
|
181
|
|
182 <repeat name="front_adapters" title="5' (Front) Adapters" help="Sequence of an adapter that was ligated to the 5' end. If the adapter sequence starts with the character '^', the adapter is 'anchored'. An anchored adapter must appear in its entirety at the 5' end of the read (it is a prefix of the read). A non-anchored adapter may appear partially at the 5' end, or it may occur within the read. If it is found within a read, the sequence preceding the adapter is also trimmed. In all cases the adapter itself is trimmed.">
|
|
183 <conditional name="front_adapter_source">
|
|
184 <param name="front_adapter_source_list" type="select" label="Source">
|
|
185 <option value="prebuilt" selected="true">Standard (select from the list below)</option>
|
|
186 <option value="user">Enter custom sequence</option>
|
|
187 </param>
|
|
188
|
|
189 <when value="user">
|
|
190 <param name="front_adapter_name" size="30" label="Enter custom 5' adapter name (Optional)" type="text" value="" />
|
|
191 <param name="front_adapter" size="30" label="Enter custom 5' adapter sequence" type="text" value="AATTGGCC" />
|
|
192 </when>
|
|
193 <when value="prebuilt">
|
|
194 <param name="front_adapter" type="select" label="Choose 5' adapter">
|
|
195 <options from_file="cutadapt_adapters.txt">
|
|
196 <column name="name" index="1"/>
|
|
197 <column name="value" index="0"/>
|
|
198 </options>
|
|
199 </param>
|
|
200 </when>
|
|
201 </conditional>
|
|
202 </repeat>
|
|
203
|
|
204 <param name="error_rate" type="float" min="0" max="1" value="0.1" label="Maximum error rate" help="Maximum allowed error rate (no. of errors divided by the length of the matching region)." />
|
|
205 <param name="no_indels" type="boolean" value="false" truevalue="--no-indels" falsevalue="" label="Do not allow indels (Use ONLY with anchored 5' (front) adapters)." help="Do not allow indels in the alignments. That is, allow only mismatches. This option is currently only supported for anchored 5' adapters ('^ADAPTER') (default: both mismatches and indels are allowed)." />
|
|
206 <param name="count" type="integer" min="1" value="1" label="Match times" help="Try to remove adapters at most COUNT times. Useful when an adapter gets appended multiple times." />
|
|
207 <param name="overlap" type="integer" min="1" value="3" label="Minimum overlap length" help="Minimum overlap length. If the overlap between the adapter and the sequence is shorter than LENGTH, the read is not modified. This reduces the number of bases trimmed purely due to short random adapter matches." />
|
|
208 <param name="match_read_wildcards" type="boolean" value="false" truevalue="--match-read-wildcards" falsevalue="" label="Match Read Wildcards" help="Allow 'N's in the read as matches to the adapter." />
|
|
209
|
|
210 <conditional name="output_filtering_options">
|
|
211 <param name="output_filtering" type="select" label="Output filtering options" help="Options for filtering processed reads by those that contain the adapter or by minimum or maximum length">
|
|
212 <option value="default">Default (no filtering)</option>
|
|
213 <option value="filter">Set Filters</option>
|
|
214 </param>
|
|
215 <when value="default" />
|
|
216 <when value="filter">
|
|
217 <param name="discard" type="boolean" value="false" truevalue="--discard" falsevalue="" label="Discard Trimmed Reads" help="Discard reads that contain the adapter instead of trimming them. Use the 'Minimum overlap length' option in order to avoid throwing away too many randomly matching reads!" />
|
|
218 <param name="discard_untrimmed" type="boolean" value="false" truevalue="--discard-untrimmed" falsevalue="" label="Discard Untrimmed Reads" help="Discard reads that do not contain the adapter." />
|
|
219 <param name="min" type="integer" min="0" optional="true" value="0" label="Minimum length" help="Discard trimmed reads that are shorter than LENGTH. Reads that are too short even before adapter removal are also discarded. In colorspace, an initial primer is not counted. Value of 0 means no minimum length." />
|
|
220 <param name="max" type="integer" min="0" optional="true" value="0" label="Maximum length" help="Discard trimmed reads that are longer than LENGTH. Reads that are too long even before adapter removal are also discarded. In colorspace, an initial primer is not counted. Value of 0 means no maximum length." />
|
|
221 <param name="no_trim" type="boolean" value="false" truevalue="--no-trim" falsevalue="" label="Do not trim adapters" help="Match and redirect reads to output/untrimmed-output as usual, but don't remove the adapters (default: trim the adapters)." />
|
|
222 <param name="mask_adapter" type="boolean" value="false" truevalue="--mask-adapter" falsevalue="" label="Mask Adapters" help="Mask adapter bases with 'N' instead of trimming them (default: trim adapters)." />
|
|
223 </when>
|
|
224 </conditional>
|
|
225
|
|
226 <conditional name="output_params">
|
|
227 <param name="output_type" type="select" label="Additional output options" help="By default all reads will be put in the same file. However, reads with adapters matching in the middle, unmatched reads, and too-short reads can be saved in separate files.">
|
|
228 <option value="default">Default</option>
|
|
229 <option value="additional">Additional output files</option>
|
|
230 </param>
|
|
231 <when value="default" />
|
|
232 <when value="additional">
|
|
233 <param name="info_file" type="boolean" value="false" label="Info File" help="Write information about each read and its adapter matches to a file."/>
|
|
234 <param name="rest_file" type="boolean" value="false" label="Rest of Read" help="When the adapter matches in the middle of a read, write the rest (after the adapter) into a file."/>
|
|
235 <param name="wildcard_file" type="boolean" value="false" label="Wildcard File" help="When the adapter has wildcard bases ('N's) write adapter bases matching wildcard positions to file."/>
|
|
236 <param name="too_short_file" type="boolean" value="false" label="Too Short Reads" help="Write reads that are too short (according to minimum length specified) to a file. (default: discard reads)"/>
|
|
237 <param name="too_long_file" type="boolean" value="false" label="Too Long Reads" help="Write reads that are too long (according to maximum length specified) to a file. (default: discard reads)"/>
|
|
238 <param name="untrimmed_file" type="boolean" value="false" label="Untrimmed Reads" help="Write reads that do not contain the adapter to a separate file, instead of writing them to the regular output file. (default: output to same file as trimmed)"/>
|
|
239 </when>
|
|
240 </conditional>
|
|
241
|
|
242 <conditional name="read_modification_params">
|
|
243 <param name="read_modification" type="select" label="Additional modifications to reads" help="Various options to trim reads based on quality, modify read names and quality scores">
|
|
244 <option value="none">No Read Modifications</option>
|
|
245 <option value="modify">Set Modification Options</option>
|
|
246 </param>
|
|
247 <when value="none" />
|
|
248 <when value="modify">
|
|
249 <param name="cut" type="integer" optional="true" value="0" label="Cut bases from reads before adapter trimming" help="Remove bases from the beginning or end of each read before trimming adapters. If positive, the bases are removed from the beginning of each read. If negative, the bases are removed from the end of each read." />
|
|
250 <param name="quality_cutoff" type="integer" min="0" optional="true" value="0" label="Quality cutoff" help="Trim low-quality ends from reads before adapter removal. The algorithm is the same as the one used by BWA (Subtract CUTOFF from all qualities; compute partial sums from all indices to the end of the sequence; cut sequence at the index at which the sum is minimal). Value of 0 means no quality trimming." />
|
|
251 <param name="prefix" label="Prefix" type="text" help="Add this prefix to read names" />
|
|
252 <param name="suffix" label="Suffix" type="text" help="Add this suffix to read names" />
|
|
253 <param name="strip_suffix" label="Strip suffix" type="text" help="Remove this suffix from read names if present." />
|
|
254 <param name="length_tag" label="Length Tag" type="text" help="Search for TAG followed by a decimal number in the name of the read (description/comment field of the FASTA or FASTQ file). Replace the decimal number with the correct length of the trimmed read. For example, use --length-tag 'length=' to search for fields like 'length=123'." />
|
|
255 <param name="zero_cap" type="boolean" value="false" label="Change negative quality values to zero (0)" truevalue="--zero-cap" falsevalue="" help="Workaround to avoid segmentation faults in BWA" />
|
|
256 </when>
|
|
257 </conditional>
|
|
258 </inputs>
|
|
259
|
|
260 <outputs>
|
|
261 <data format="txt" name="report" label="${tool.name} on ${on_string} (Report)" />
|
|
262 <data format="input" name="output" metadata_source="input" label="${tool.name} on ${on_string} (Reads)"/>
|
|
263 <data format="input" name="paired_output" metadata_source="input" label="${tool.name} on ${on_string} (Paired Reads)" >
|
|
264 <filter>(paired_end['paired_end_boolean'] is True)</filter>
|
|
265 </data>
|
|
266 <data format="input" name="rest_output" metadata_source="input" label="${tool.name} on ${on_string} (Rest of Reads)" >
|
|
267 <filter>(output_params['output_type'] == "additional")</filter>
|
|
268 <filter>(output_params['rest_file'] is True)</filter>
|
|
269 </data>
|
|
270 <data format="txt" name="wild_output" metadata_source="input" label="${tool.name} on ${on_string} (Wildcard File)" >
|
|
271 <filter>(output_params['output_type'] == "additional")</filter>
|
|
272 <filter>(output_params['wildcard_file'] is True)</filter>
|
|
273 </data>
|
|
274 <data format="input" name="too_short_output" metadata_source="input" label="${tool.name} on ${on_string} (Too Short Reads)" >
|
|
275 <filter>(output_params['output_type'] == "additional")</filter>
|
|
276 <filter>(output_params['too_short_file'] is True)</filter>
|
|
277 </data>
|
|
278 <data format="input" name="too_long_output" metadata_source="input" label="${tool.name} on ${on_string} (Too Long Reads)" >
|
|
279 <filter>(output_params['output_type'] == "additional")</filter>
|
|
280 <filter>(output_params['too_long_file'] is True)</filter>
|
|
281 </data>
|
|
282 <data format="input" name="untrimmed_output" metadata_source="input" label="${tool.name} on ${on_string} (Untrimmed Reads)" >
|
|
283 <filter>(output_params['output_type'] == "additional")</filter>
|
|
284 <filter>(output_params['untrimmed_file'] is True)</filter>
|
|
285 </data>
|
|
286 <data format="input" name="untrimmed_paired_output" metadata_source="input" label="${tool.name} on ${on_string} (Untrimmed Paired Reads)" >
|
|
287 <filter>(paired_end['paired_end_boolean'] is True)</filter>
|
|
288 <filter>(output_params['output_type'] == "additional")</filter>
|
|
289 <filter>(output_params['untrimmed_file'] is True)</filter>
|
|
290 </data>
|
|
291 <data format="txt" name="info_file" metadata_source="input" label="${tool.name} on ${on_string} (Info File)" >
|
|
292 <filter>(output_params['output_type'] == "additional")</filter>
|
|
293 <filter>(output_params['info_file'] is True)</filter>
|
|
294 </data>
|
|
295 </outputs>
|
|
296
|
|
297 <stdio>
|
|
298 <exit_code range="1" level="fatal" description="IOError, FormatError, or Interrupt" />
|
|
299 <exit_code range="2" level="fatal" description="Invalid options specified" />
|
|
300 <exit_code range="3:" level="fatal" description="Unknown error" />
|
|
301 </stdio>
|
|
302
|
|
303 <tests>
|
|
304 <test>
|
|
305 <param name="input" value="cutadapt_small.fastq" ftype="fastqsanger"/>
|
|
306 <param name="adapter_source_list" value="user"/>
|
|
307 <param name="adapter" value=""/>
|
|
308 <param name="anywhere_adapter_source_list" value="user"/>
|
|
309 <param name="anywhere_adapter" value="TTAGACATATCTCCGTCG"/>
|
|
310 <param name="front_adapter_source_list" value="user"/>
|
|
311 <param name="front_adapter" value=""/>
|
|
312 <param name="output_filtering" value="default"/>
|
|
313 <param name="read_modification" value="none"/>
|
|
314 <param name="output_type" value="default"/>
|
|
315 <output name="output" file="cutadapt_small.out"/>
|
|
316 </test>
|
|
317 <!-- Unable to get tests to function with conditional parameters
|
|
318 <test>
|
|
319 <param name="input" value="cutadapt_small.fastq" ftype="fastqsanger"/>
|
|
320 <param name="adapter_source_list" value="user"/>
|
|
321 <param name="adapter" value="TTAGACATATCTCCGTCG"/>
|
|
322 <param name="anywhere_adapter_source_list" value="user"/>
|
|
323 <param name="anywhere_adapter" value=""/>
|
|
324 <param name="front_adapter_source_list" value="user"/>
|
|
325 <param name="front_adapter" value=""/>
|
|
326 <param name="output_filtering" value="filter"/>
|
|
327 <param name="discard" value="true"/>
|
|
328 <param name="read_modification" value="none"/>
|
|
329 <param name="output_type" value="default"/>
|
|
330 <output name="output" file="cutadapt_discard.out"/>
|
|
331 </test>
|
|
332 <test>
|
|
333 <param name="input" value="cutadapt_rest.fa" ftype="fasta"/>
|
|
334 <param name="adapter_source_list" value="user"/>
|
|
335 <param name="adapter" value="ADAPTER"/>
|
|
336 <param name="anywhere_adapter_source_list" value="user"/>
|
|
337 <param name="anywhere_adapter" value=""/>
|
|
338 <param name="front_adapter_source_list" value="user"/>
|
|
339 <param name="front_adapter" value=""/>
|
|
340 <param name="output_filtering" value="default"/>
|
|
341 <param name="read_modification" value="none"/>
|
|
342 <param name="output_type" value="additional"/>
|
|
343 <param name="rest_file" value="true"/>
|
|
344 <output name="output" file="cutadapt_rest.out"/>
|
|
345 <output name="rest_output" file="cutadapt_rest2.out"/>
|
|
346 </test>
|
|
347 -->
|
|
348 </tests>
|
|
349
|
|
350 <help>
|
|
351 Note
|
|
352 -------
|
|
353 Original code from lparsons, 1% modified to add more reads at once.
|
|
354
|
|
355 Summary
|
|
356 -------
|
|
357 This tool removes adapter sequences from DNA high-throughput
|
|
358 sequencing data. This is usually necessary when the read length of the
|
|
359 machine is longer than the molecule that is sequenced, such as in
|
|
360 microRNA data.
|
|
361
|
|
362 The tool is based on the opensource `cutadapt
|
|
363 <http://code.google.com/p/cutadapt/>`_ tool. See the `complete cutadapt
|
|
364 documentation <https://cutadapt.readthedocs.org/en/latest/index.html>`_ for additional details.
|
|
365
|
|
366 -----
|
|
367
|
|
368 Algorithm
|
|
369 ---------
|
|
370
|
|
371 cutadapt uses a simple semi-global alignment algorithm, without any special optimizations.
|
|
372 For speed, the algorithm is implemented as a Python extension module in ``calignmodule.c``.
|
|
373
|
|
374
|
|
375 Partial adapter matches
|
|
376 -----------------------
|
|
377
|
|
378 Cutadapt correctly deals with partial adapter matches. As an example, suppose
|
|
379 your adapter sequence is ``ADAPTER`` (specified via 3' Adapters parameter).
|
|
380 If you have these input sequences::
|
|
381
|
|
382 MYSEQUENCEADAPTER
|
|
383 MYSEQUENCEADAP
|
|
384 MYSEQUENCEADAPTERSOMETHINGELSE
|
|
385
|
|
386 All of them will be trimmed to ``MYSEQUENCE``. If the sequence starts with an
|
|
387 adapter, like this::
|
|
388
|
|
389 ADAPTERSOMETHING
|
|
390
|
|
391 It will be empty after trimming.
|
|
392
|
|
393 When the allowed error rate is sufficiently high, errors in
|
|
394 the adapter sequence are allowed. For example, ``ADABTER`` (1 mismatch), ``ADAPTR`` (1 deletion),
|
|
395 and ``ADAPPTER`` (1 insertion) will all be recognized if the error rate is set to 0.15.
|
|
396
|
|
397
|
|
398 Anchoring 5' adapters
|
|
399 ---------------------
|
|
400
|
|
401 If you specify a 5' (Front) adapter, the adapter may overlap the beginning of the read or
|
|
402 occur anywhere whithin it. If it appears withing the read, the sequence that precedes it
|
|
403 will also be trimmed in addition to the adapter. For example when the adapter sequence is
|
|
404 ``ADAPTER``::
|
|
405
|
|
406 HELLOADAPTERTHERE
|
|
407 APTERTHERE
|
|
408
|
|
409 will both be trimmed to ``THERE``. To avoid this, you can prefix the adapter with the character
|
|
410 ``^``. This will restrict the search, forcing the adapter to be a prefix of the read. With
|
|
411 the adapter sequence set to ``^ADAPTER``, only reads like this will be trimmed::
|
|
412
|
|
413 ADAPTERHELLO
|
|
414
|
|
415
|
|
416 Allowing adapters anywhere
|
|
417 --------------------------
|
|
418
|
|
419 Cutadapt assumes that any adapter specified via the 3' Adapter parameter
|
|
420 was ligated to the 3\' end of the sequence. This is the correct assumption for
|
|
421 at least the SOLiD and Illumina small RNA protocols and probably others.
|
|
422 The assumption is enforced by the alignment algorithm, which only finds the adapter
|
|
423 when its starting position is within the read. In other words, the 5' base of
|
|
424 the adapter must appear within the read. The adapter and all bases following
|
|
425 it are removed.
|
|
426
|
|
427 If, on the other hand, your adapter can also be ligated to the 5' end (on
|
|
428 purpose or by accident), you should tell cutadapt so by using the Anywhere Adapter
|
|
429 parameter. It will then use a slightly different alignment algorithm
|
|
430 (so-called semiglobal alignment), which allows any type of overlap between the
|
|
431 adapter and the sequence. In particular, the adapter may appear only partially
|
|
432 in the beginning of the read, like this::
|
|
433
|
|
434 PTERMYSEQUENCE
|
|
435
|
|
436 The decision which part of the read to remove is made as follows: If there is at
|
|
437 least one base before the found adapter, then the adapter is considered to be
|
|
438 a 3' adapter and the adapter itself and everything following it is removed.
|
|
439 Otherwise, the adapter is considered to be a 5' adapter and it is removed from
|
|
440 the read.
|
|
441
|
|
442 Here are some examples, which may make this clearer (left: read, right: trimmed
|
|
443 read)::
|
|
444
|
|
445 MYSEQUENCEADAPTER -> MYSEQUENCE (3' adapter)
|
|
446 MADAPTER -> M (3' adapter)
|
|
447 ADAPTERMYSEQUENCE -> MYSEQUENCE (5' adapter)
|
|
448 PTERMYSEQUENCE -> MYSEQUENCE (5' adapter)
|
|
449
|
|
450 The regular algorithm (3' Adapter) would trim the first two examples in the same way,
|
|
451 but trim the third to an empty sequence and trim the fourth not at all.
|
|
452
|
|
453
|
|
454 Format of the info file
|
|
455 -----------------------
|
|
456 The info file contains information about the found adapters. The output is a tab-separated text file. Each line corresponds to one read of the input file. The fields are:
|
|
457
|
|
458 1. Read name
|
|
459 2. Number of errors
|
|
460 3. 0-based start coordinate of the adapter match
|
|
461 4. 0-based end coordinate of the adapter match
|
|
462 5. Sequence of the read to the left of the adapter match (can be empty)
|
|
463 6. Sequence of the read that was matched to the adapter
|
|
464 7. Sequence of the read to the right of the adapter match (can be empty)
|
|
465 8. Name of the found adapter.
|
|
466
|
|
467 The concatenation of the fields 5-7 yields the full read sequence. In column 8, adapters without a name are numbered starting from 1.
|
|
468
|
|
469 If no adapter was found, the format is as follows:
|
|
470
|
|
471 1. Read name
|
|
472 2. The value -1
|
|
473 3. The read sequence
|
|
474
|
|
475 When parsing that file, be aware that additional columns may be added in the future. Note also that some fields can be empty, resulting in consecutive tabs within a line. Also, in the current version, when the *Match times* option is set to a value other than 1 (the default value), multiple lines are written to the info file for each read.
|
|
476
|
|
477 .. _cutadapt: http://code.google.com/p/cutadapt/
|
|
478 </help>
|
|
479
|
|
480 </tool>
|
|
481
|