Mercurial > repos > devteam > fastq_manipulation
annotate fastq_manipulation.xml @ 2:16d28d67ebeb draft
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/galaxy_sequence_utils/fastq_manipulation commit de7140295cce07e1bc1697e51dab4271c8d7a8a6
author | devteam |
---|---|
date | Fri, 18 Dec 2015 19:28:39 -0500 |
parents | b50aeae8bcaa |
children | 7ea141c4c834 |
rev | line source |
---|---|
2
16d28d67ebeb
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/galaxy_sequence_utils/fastq_manipulation commit de7140295cce07e1bc1697e51dab4271c8d7a8a6
devteam
parents:
1
diff
changeset
|
1 <tool id="fastq_manipulation" name="Manipulate FASTQ" version="1.0.2"> |
0 | 2 <options sanitize="False" /> <!-- This tool uses a file to rely all parameter information (actually a dynamically generated python module), we can safely not sanitize any parameters --> |
3 <requirements> | |
4 <requirement type="package" version="1.0.0">galaxy_sequence_utils</requirement> | |
5 </requirements> | |
6 <description>reads on various attributes</description> | |
7 <command interpreter="python">fastq_manipulation.py $input_file $fastq_manipulation_file $output_file $output_file.files_path '${input_file.extension[len( 'fastq' ):]}'</command> | |
8 <inputs> | |
9 <!-- This tool is purposely over-engineered (e.g. Single option conditionals) to allow easy enhancement with workflow/rerun compatibility --> | |
10 <page> | |
11 <param name="input_file" type="data" format="fastqsanger,fastqcssanger" label="FASTQ File" help="Requires groomed data: if your data does not appear here try using the FASTQ groomer."/> | |
12 <!-- Match Reads --> | |
13 <repeat name="match_blocks" title="Match Reads"> | |
14 <conditional name="match_type"> | |
15 <param name="match_type_selector" type="select" label="Match Reads by"> | |
16 <option value="identifier">Name/Identifier</option> | |
17 <option value="sequence">Sequence Content</option> | |
18 <option value="quality">Quality Score Content</option> | |
19 </param> | |
20 <when value="identifier"> | |
21 <conditional name="match"> | |
22 <param name="match_selector" type="select" label="Identifier Match Type"> | |
23 <option value="regex">Regular Expression</option> | |
24 </param> | |
25 <when value="regex"> | |
26 <param type="text" name="match_by" label="Match by" value=".*" /> | |
27 </when> | |
28 </conditional> | |
29 </when> | |
30 <when value="sequence"> | |
31 <conditional name="match"> | |
32 <param name="match_selector" type="select" label="Sequence Match Type"> | |
33 <option value="regex">Regular Expression</option> | |
34 </param> | |
35 <when value="regex"> | |
36 <param type="text" name="match_by" label="Match by" value=".*" /> | |
37 </when> | |
38 </conditional> | |
39 </when> | |
40 <when value="quality"> | |
41 <conditional name="match"> | |
42 <param name="match_selector" type="select" label="Quality Match Type"> | |
43 <option value="regex">Regular Expression</option> | |
44 </param> | |
45 <when value="regex"> | |
46 <param type="text" name="match_by" label="Match by" value=".*" /> | |
47 </when> | |
48 </conditional> | |
49 </when> | |
50 </conditional> | |
51 </repeat> | |
52 <!-- Manipulate Matched Reads --> | |
53 <repeat name="manipulate_blocks" title="Manipulate Reads"> | |
54 <conditional name="manipulation_type"> | |
55 <param name="manipulation_type_selector" type="select" label="Manipulate Reads on"> | |
56 <option value="identifier">Name/Identifier</option> | |
57 <option value="sequence">Sequence Content</option> | |
58 <option value="quality">Quality Score Content</option> | |
59 <option value="miscellaneous">Miscellaneous Actions</option> | |
60 </param> | |
61 <when value="identifier"> | |
62 <conditional name="manipulation"> | |
63 <param name="manipulation_selector" type="select" label="Identifier Manipulation Type"> | |
64 <option value="translate">String Translate</option> | |
65 </param> | |
66 <when value="translate"> | |
67 <param name="from" type="text" label="From" value="" /> | |
68 <param name="to" type="text" label="To" value="" /> | |
69 </when> | |
70 </conditional> | |
71 </when> | |
72 <when value="sequence"> | |
73 <conditional name="manipulation"> | |
74 <param name="manipulation_selector" type="select" label="Sequence Manipulation Type"> | |
75 <option value="rev_comp">Reverse Complement</option> | |
76 <option value="rev_no_comp">Reverse, No Complement</option> | |
77 <option value="no_rev_comp">Complement, No Reverse</option> | |
78 <option value="trim">Trim</option> | |
79 <option value="dna_to_rna">DNA to RNA</option> | |
80 <option value="rna_to_dna">RNA to DNA</option> | |
81 <option value="translate">String Translate</option> | |
82 <option value="change_adapter">Change Adapter Base</option> | |
83 </param> | |
84 <when value="rev_comp"> | |
85 <!-- no extra settings --> | |
86 </when> | |
87 <when value="rev_no_comp"> | |
88 <!-- no extra settings --> | |
89 </when> | |
90 <when value="no_rev_comp"> | |
91 <!-- no extra settings --> | |
92 </when> | |
93 <when value="trim"> | |
94 <conditional name="offset_type"> | |
95 <param name="base_offset_type" type="select" label="Define Base Offsets as" help="Use Absolute for fixed length reads (Illumina, SOLiD)<br>Use Percentage for variable length reads (Roche/454)"> | |
96 <option value="offsets_absolute" selected="true">Absolute Values</option> | |
97 <option value="offsets_percent">Percentage of Read Length</option> | |
98 </param> | |
99 <when value="offsets_absolute"> | |
100 <param name="left_column_offset" label="Offset from 5' end" value="0" type="integer" help="Values start at 0, increasing from the left"> | |
101 <validator type="in_range" message="Base Offsets must be positive" min="0" max="inf"/> | |
102 <validator type="expression" message="An integer is required.">int( float( value ) ) == float( value )</validator> | |
103 </param> | |
2
16d28d67ebeb
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/galaxy_sequence_utils/fastq_manipulation commit de7140295cce07e1bc1697e51dab4271c8d7a8a6
devteam
parents:
1
diff
changeset
|
104 <param name="right_column_offset" label="Offset from 3' end" value="0" type="integer" help="Values start at 0, increasing from the right; use a negative value to remove everything to the right of the absolute value of the position"> |
0 | 105 <validator type="expression" message="An integer is required.">int( float( value ) ) == float( value )</validator> |
106 </param> | |
107 </when> | |
108 <when value="offsets_percent"> | |
109 <param name="left_column_offset" label="Offset from 5' end" value="0" type="float"> | |
110 <validator type="in_range" message="Base Offsets must be between 0 and 100" min="0" max="100"/> | |
111 </param> | |
112 <param name="right_column_offset" label="Offset from 3' end" value="0" type="float"> | |
113 <validator type="in_range" message="Base Offsets must be between 0 and 100" min="0" max="100"/> | |
114 </param> | |
115 </when> | |
116 </conditional> | |
117 <param name="keep_zero_length" label="Keep reads with zero length" type="boolean" truevalue="keep_zero_length" falsevalue="exclude_zero_length" selected="False"/> | |
118 </when> | |
119 <when value="dna_to_rna"> | |
120 <!-- no extra settings --> | |
121 </when> | |
122 <when value="rna_to_dna"> | |
123 <!-- no extra settings --> | |
124 </when> | |
125 <when value="translate"> | |
126 <param name="from" type="text" label="From" value="" /> | |
127 <param name="to" type="text" label="To" value="" /> | |
128 </when> | |
129 <when value="change_adapter"> | |
130 <param name="new_adapter" label="New Adapter" type="text" value="G" help="An empty string will remove the adapter base" /> | |
131 </when> | |
132 </conditional> | |
133 </when> | |
134 <when value="quality"> | |
135 <conditional name="manipulation"> | |
136 <param name="manipulation_selector" type="select" label="Quality Manipulation Type"> | |
137 <option value="translate">String Translate</option> | |
138 <!-- <option value="modify_each_score">Apply Transformation to each Score</option> Not enabled yet--> | |
139 </param> | |
140 <when value="translate"> | |
141 <param name="from" type="text" label="From" value="" /> | |
142 <param name="to" type="text" label="To" value="" /> | |
143 </when> | |
144 <when value="modify_each_score"> | |
145 <param name="map_score" type="text" label="Modify Score by" value="$score + 1" /> | |
146 </when> | |
147 </conditional> | |
148 </when> | |
149 <when value="miscellaneous"> | |
150 <conditional name="manipulation"> | |
151 <param name="manipulation_selector" type="select" label="Miscellaneous Manipulation Type"> | |
152 <option value="remove">Remove Read</option> | |
153 </param> | |
154 <when value="remove"> | |
155 <!-- no extra settings --> | |
156 </when> | |
157 </conditional> | |
158 </when> | |
159 </conditional> | |
160 </repeat> | |
161 </page> | |
162 </inputs> | |
163 <configfiles> | |
164 <configfile name="fastq_manipulation_file">##create an importable module | |
165 #import binascii | |
166 import re | |
167 import binascii | |
168 from string import maketrans | |
169 ##does read match | |
170 def match_read( fastq_read ): | |
171 #for $match_block in $match_blocks: | |
172 #if $match_block['match_type']['match_type_selector'] == 'identifier': | |
173 search_target = fastq_read.identifier[1:] ##don't include @ | |
174 #elif $match_block['match_type']['match_type_selector'] == 'sequence': | |
175 search_target = fastq_read.sequence | |
176 #elif $match_block['match_type']['match_type_selector'] == 'quality': | |
177 search_target = fastq_read.quality | |
178 #else: | |
179 #continue | |
180 #end if | |
181 if not re.search( binascii.unhexlify( "${ binascii.hexlify( str( match_block['match_type']['match']['match_by'] ) ) }" ), search_target ): | |
182 return False | |
183 #end for | |
184 return True | |
185 ##modify matched reads | |
186 def manipulate_read( fastq_read ): | |
187 new_read = fastq_read.clone() | |
188 #for $manipulate_block in $manipulate_blocks: | |
189 #if $manipulate_block['manipulation_type']['manipulation_type_selector'] == 'identifier': | |
190 #if $manipulate_block['manipulation_type']['manipulation']['manipulation_selector'] == 'translate': | |
191 new_read.identifier = "@%s" % new_read.identifier[1:].translate( maketrans( binascii.unhexlify( "${ binascii.hexlify( str( manipulate_block['manipulation_type']['manipulation']['from'] ) ) }" ), binascii.unhexlify( "${ binascii.hexlify( str( manipulate_block['manipulation_type']['manipulation']['to'] ) ) }" ) ) ) | |
192 #end if | |
193 #elif $manipulate_block['manipulation_type']['manipulation_type_selector'] == 'sequence': | |
194 #if $manipulate_block['manipulation_type']['manipulation']['manipulation_selector'] == 'translate': | |
195 new_read.sequence = new_read.sequence.translate( maketrans( binascii.unhexlify( "${ binascii.hexlify( str( manipulate_block['manipulation_type']['manipulation']['from'] ) ) }" ), binascii.unhexlify( "${ binascii.hexlify( str( manipulate_block['manipulation_type']['manipulation']['to'] ) ) }" ) ) ) | |
196 #elif $manipulate_block['manipulation_type']['manipulation']['manipulation_selector'] == 'rev_comp': | |
197 new_read = new_read.reverse_complement() | |
198 #elif $manipulate_block['manipulation_type']['manipulation']['manipulation_selector'] == 'rev_no_comp': | |
199 new_read = new_read.reverse() | |
200 #elif $manipulate_block['manipulation_type']['manipulation']['manipulation_selector'] == 'no_rev_comp': | |
201 new_read = new_read.complement() | |
202 #elif $manipulate_block['manipulation_type']['manipulation']['manipulation_selector'] == 'trim': | |
203 #if $manipulate_block['manipulation_type']['manipulation']['offset_type']['base_offset_type'] == 'offsets_percent': | |
204 left_column_offset = int( round( float( ${ manipulate_block['manipulation_type']['manipulation']['offset_type']['left_column_offset'] } ) / 100.0 * float( len( new_read ) ) ) ) | |
205 right_column_offset = int( round( float( ${ manipulate_block['manipulation_type']['manipulation']['offset_type']['right_column_offset'] } ) / 100.0 * float( len( new_read ) ) ) ) | |
206 #else | |
207 left_column_offset = ${ manipulate_block['manipulation_type']['manipulation']['offset_type']['left_column_offset'] } | |
208 right_column_offset = ${ manipulate_block['manipulation_type']['manipulation']['offset_type']['right_column_offset'] } | |
209 #end if | |
2
16d28d67ebeb
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/galaxy_sequence_utils/fastq_manipulation commit de7140295cce07e1bc1697e51dab4271c8d7a8a6
devteam
parents:
1
diff
changeset
|
210 if right_column_offset != 0: |
0 | 211 right_column_offset = -right_column_offset |
212 else: | |
213 right_column_offset = None | |
214 new_read = new_read.slice( left_column_offset, right_column_offset ) | |
215 if not ( ${str( manipulate_block['manipulation_type']['manipulation']['keep_zero_length'] ) == 'keep_zero_length'} or len( new_read ) ): | |
216 return None | |
217 #elif $manipulate_block['manipulation_type']['manipulation']['manipulation_selector'] == 'dna_to_rna': | |
218 new_read = new_read.sequence_as_DNA() | |
219 #elif $manipulate_block['manipulation_type']['manipulation']['manipulation_selector'] == 'rna_to_dna': | |
220 new_read = new_read.sequence_as_RNA() | |
221 #elif $manipulate_block['manipulation_type']['manipulation']['manipulation_selector'] == 'change_adapter': | |
222 if new_read.sequence_space == 'color': | |
223 new_read = new_read.change_adapter( binascii.unhexlify( "${ binascii.hexlify( str( manipulate_block['manipulation_type']['manipulation']['new_adapter'] ) ) }" ) ) | |
224 #end if | |
225 #elif $manipulate_block['manipulation_type']['manipulation_type_selector'] == 'quality': | |
226 #if $manipulate_block['manipulation_type']['manipulation']['manipulation_selector'] == 'translate': | |
227 new_read.quality = new_read.quality.translate( maketrans( binascii.unhexlify( "${ binascii.hexlify( str( manipulate_block['manipulation_type']['manipulation']['from'] ) ) }" ), binascii.unhexlify( "${ binascii.hexlify( str( manipulate_block['manipulation_type']['manipulation']['to'] ) ) }" ) ) ) | |
228 #elif $manipulate_block['manipulation_type']['manipulation']['manipulation_selector'] == 'map_score': | |
229 def score_method( score ): | |
230 raise Exception, "Unimplemented" ##This option is not yet available, need to abstract out e.g. column adding tool action: preventing users from using 'harmful' actions | |
231 new_read.quality_map( score_method ) | |
232 #end if | |
233 #elif $manipulate_block['manipulation_type']['manipulation_type_selector'] == 'miscellaneous': | |
234 #if $manipulate_block['manipulation_type']['manipulation']['manipulation_selector'] == 'remove': | |
235 return None | |
236 #end if | |
237 #else: | |
238 #continue | |
239 #end if | |
240 #end for | |
241 if new_read.description != "+": | |
242 new_read.description = "+%s" % new_read.identifier[1:] ##ensure description is still valid | |
243 return new_read | |
244 def match_and_manipulate_read( fastq_read ): | |
245 new_read = fastq_read | |
246 if match_read( fastq_read ): | |
247 new_read = manipulate_read( fastq_read ) | |
248 return new_read | |
249 </configfile> | |
250 </configfiles> | |
251 <outputs> | |
252 <data format="input" name="output_file" /> | |
253 </outputs> | |
254 <tests> | |
255 <!-- match all and do nothing --> | |
256 <test> | |
257 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" /> | |
258 <param name="match_type_selector" value="identifier" /> | |
259 <param name="match_selector" value="regex" /> | |
260 <param name="match_by" value=".*" /> | |
261 <param name="manipulation_type_selector" value="identifier" /> | |
262 <param name="manipulation_selector" value="translate" /> | |
263 <param name="from" value="" /> | |
264 <param name="to" value="" /> | |
265 <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" /> | |
266 </test> | |
267 <!-- match None and do nothing --> | |
268 <test> | |
269 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" /> | |
270 <param name="match_type_selector" value="identifier" /> | |
271 <param name="match_selector" value="regex" /> | |
272 <param name="match_by" value="STRINGDOESNOTEXIST" /> | |
273 <param name="manipulation_type_selector" value="identifier" /> | |
274 <param name="manipulation_selector" value="translate" /> | |
275 <param name="from" value="" /> | |
276 <param name="to" value="" /> | |
277 <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" /> | |
278 </test> | |
279 <!-- match all and remove --> | |
280 <test> | |
281 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" /> | |
282 <param name="match_type_selector" value="identifier" /> | |
283 <param name="match_selector" value="regex" /> | |
284 <param name="match_by" value=".*" /> | |
285 <param name="manipulation_type_selector" value="miscellaneous" /> | |
286 <param name="manipulation_selector" value="remove" /> | |
287 <output name="output_file" file="empty_file.dat" /> | |
288 </test> | |
289 <!-- match None and remove --> | |
290 <test> | |
291 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" /> | |
292 <param name="match_type_selector" value="identifier" /> | |
293 <param name="match_selector" value="regex" /> | |
294 <param name="match_by" value="STRINGDOESNOTEXIST" /> | |
295 <param name="manipulation_type_selector" value="miscellaneous" /> | |
296 <param name="manipulation_selector" value="remove" /> | |
297 <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" /> | |
298 </test> | |
299 <!-- match all and trim to 4 inner-most bases --> | |
300 <test> | |
301 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" /> | |
302 <param name="match_type_selector" value="identifier" /> | |
303 <param name="match_selector" value="regex" /> | |
304 <param name="match_by" value=".*" /> | |
305 <param name="manipulation_type_selector" value="sequence" /> | |
306 <param name="manipulation_selector" value="trim" /> | |
307 <param name="base_offset_type" value="offsets_absolute"/> | |
308 <param name="left_column_offset" value="45"/> | |
309 <param name="right_column_offset" value="45"/> | |
310 <param name="keep_zero_length" value="true" /> | |
311 <output name="output_file" file="fastq_trimmer_out1.fastqsanger" /> | |
312 </test> | |
313 <test> | |
314 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" /> | |
315 <param name="match_type_selector" value="identifier" /> | |
316 <param name="match_selector" value="regex" /> | |
317 <param name="match_by" value=".*" /> | |
318 <param name="manipulation_type_selector" value="sequence" /> | |
319 <param name="manipulation_selector" value="trim" /> | |
320 <param name="base_offset_type" value="offsets_percent"/> | |
321 <param name="left_column_offset" value="47.87"/> | |
322 <param name="right_column_offset" value="47.87"/> | |
323 <param name="keep_zero_length" value="true" /> | |
324 <output name="output_file" file="fastq_trimmer_out1.fastqsanger" /> | |
325 </test> | |
326 <!-- match all and rev comp --> | |
327 <test> | |
328 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" /> | |
329 <param name="match_type_selector" value="identifier" /> | |
330 <param name="match_selector" value="regex" /> | |
331 <param name="match_by" value=".*" /> | |
332 <param name="manipulation_type_selector" value="sequence" /> | |
333 <param name="manipulation_selector" value="rev_comp" /> | |
334 <output name="output_file" file="sanger_full_range_rev_comp.fastqsanger" /> | |
335 </test> | |
336 <!-- match all and rev comp, with ambiguous DNA --> | |
337 <test> | |
338 <param name="input_file" value="misc_dna_original_sanger.fastqsanger" ftype="fastqsanger" /> | |
339 <param name="match_type_selector" value="identifier" /> | |
340 <param name="match_selector" value="regex" /> | |
341 <param name="match_by" value=".*" /> | |
342 <param name="manipulation_type_selector" value="sequence" /> | |
343 <param name="manipulation_selector" value="rev_comp" /> | |
344 <output name="output_file" file="misc_dna_as_sanger_rev_comp_1.fastqsanger" /> | |
345 </test> | |
346 <!-- match all and rev comp, with ambiguous RNA --> | |
347 <test> | |
348 <param name="input_file" value="misc_rna_original_sanger.fastqsanger" ftype="fastqsanger" /> | |
349 <param name="match_type_selector" value="identifier" /> | |
350 <param name="match_selector" value="regex" /> | |
351 <param name="match_by" value=".*" /> | |
352 <param name="manipulation_type_selector" value="sequence" /> | |
353 <param name="manipulation_selector" value="rev_comp" /> | |
354 <output name="output_file" file="misc_rna_as_sanger_rev_comp_1.fastqsanger" /> | |
355 </test> | |
356 <!-- match first seq and rev comp --> | |
357 <test> | |
358 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" /> | |
359 <param name="match_type_selector" value="identifier" /> | |
360 <param name="match_selector" value="regex" /> | |
361 <param name="match_by" value="FAKE0001" /> | |
362 <param name="manipulation_type_selector" value="sequence" /> | |
363 <param name="manipulation_selector" value="rev_comp" /> | |
364 <output name="output_file" file="sanger_full_range_rev_comp_1_seq.fastqsanger" /> | |
365 </test> | |
366 <!-- match first seq and rev comp: i.e. undo above --> | |
367 <test> | |
368 <param name="input_file" value="sanger_full_range_rev_comp_1_seq.fastqsanger" ftype="fastqsanger" /> | |
369 <param name="match_type_selector" value="identifier" /> | |
370 <param name="match_selector" value="regex" /> | |
371 <param name="match_by" value="FAKE0001" /> | |
372 <param name="manipulation_type_selector" value="sequence" /> | |
373 <param name="manipulation_selector" value="rev_comp" /> | |
374 <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" /> | |
375 </test> | |
376 <!-- match all and DNA to RNA --> | |
377 <test> | |
378 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" /> | |
379 <param name="match_type_selector" value="identifier" /> | |
380 <param name="match_selector" value="regex" /> | |
381 <param name="match_by" value=".*" /> | |
382 <param name="manipulation_type_selector" value="sequence" /> | |
383 <param name="manipulation_selector" value="dna_to_rna" /> | |
384 <output name="output_file" file="sanger_full_range_as_rna.fastqsanger" /> | |
385 </test> | |
386 <!-- match all and RNA to DNA --> | |
387 <test> | |
388 <param name="input_file" value="sanger_full_range_as_rna.fastqsanger" ftype="fastqsanger" /> | |
389 <param name="match_type_selector" value="identifier" /> | |
390 <param name="match_selector" value="regex" /> | |
391 <param name="match_by" value=".*" /> | |
392 <param name="manipulation_type_selector" value="sequence" /> | |
393 <param name="manipulation_selector" value="rna_to_dna" /> | |
394 <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" /> | |
395 </test> | |
396 </tests> | |
397 <help> | |
398 This tool allows you to build complex manipulations to be applied to each matching read in a FASTQ file. A read must match all matching directives in order for it to be manipulated; if a read does not match, it is output in a non-modified manner. All reads matching will have each of the specified manipulations performed upon them, in the order specified. | |
399 | |
400 Regular Expression Matches are made using re.search, see http://docs.python.org/library/re.html for more information. | |
401 All matching is performed on a single line string, regardless if e.g. the sequence or quality score spans multiple lines in the original file. | |
402 | |
403 String translations are performed using string.translate, see http://docs.python.org/library/string.html#string.translate and http://docs.python.org/library/string.html#string.maketrans for more information. | |
404 | |
405 .. class:: warningmark | |
406 | |
407 Only color space reads can have adapter bases substituted. | |
408 | |
409 | |
410 ----- | |
411 | |
412 **Example** | |
413 | |
414 Suppose you have a color space sanger formatted sequence (fastqcssanger) and you want to double-encode the color space into psuedo-nucleotide space (this is different from converting) to allow these reads to be used in tools which do not natively support it (using specially designed indexes). This tool can handle this manipulation, however, this is generally not recommended as results tend to be poorer than those produced from tools which are specially designed to handle color space data. | |
415 | |
416 Steps: | |
417 | |
418 1. Click **Add new Match Reads** and leave the matching options set to the default (Matching by sequence name/identifier using the regular expression "\*."; thereby matching all reads). | |
419 2. Click **Add new Manipulate Reads**, change **Manipulate Reads on** to "Sequence Content", set **Sequence Manipulation Type** to "Change Adapter Base" and set **New Adapter** to "" (an empty text field). | |
420 3. Click **Add new Manipulate Reads**, change **Manipulate Reads on** to "Sequence Content", set **Sequence Manipulation Type** to "String Translate" and set **From** to "0123." and **To** to "ACGTN". | |
421 4. Click Execute. The new history item will contained double-encoded psuedo-nucleotide space reads. | |
422 | |
423 </help> | |
1
b50aeae8bcaa
planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents:
0
diff
changeset
|
424 <citations> |
b50aeae8bcaa
planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents:
0
diff
changeset
|
425 <citation type="doi">10.1093/bioinformatics/btq281</citation> |
b50aeae8bcaa
planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents:
0
diff
changeset
|
426 </citations> |
0 | 427 </tool> |