[hg] galaxy 3432: FASTQ Manupulation tool no longer considers @ ...
details: http://www.bx.psu.edu/hg/galaxy/rev/b4dd38c06398 changeset: 3432:b4dd38c06398 user: Dan Blankenberg <dan@bx.psu.edu> date: Tue Feb 23 23:17:09 2010 -0500 description: FASTQ Manupulation tool no longer considers @ when matching or translating sequence identifiers. diffstat: tools/fastq/fastq_manipulation.xml | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diffs (36 lines): diff -r 2b0e2519f7ac -r b4dd38c06398 tools/fastq/fastq_manipulation.xml --- a/tools/fastq/fastq_manipulation.xml Tue Feb 23 19:54:54 2010 -0500 +++ b/tools/fastq/fastq_manipulation.xml Tue Feb 23 23:17:09 2010 -0500 @@ -1,4 +1,4 @@ -<tool id="fastq_manipulation" name="Manipulate FASTQ" version="1.0.0"> +<tool id="fastq_manipulation" name="Manipulate FASTQ" version="1.0.1"> <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 --> <description>reads on various attributes</description> <command interpreter="python">fastq_manipulation.py $input_file $fastq_manipulation_file $output_file $output_file.files_path '${input_file.extension[len( 'fastq' ):]}'</command> @@ -168,7 +168,7 @@ def match_read( fastq_read ): #for $match_block in $match_blocks: #if $match_block['match_type']['match_type_selector'] == 'identifier': - search_target = fastq_read.identifier + search_target = fastq_read.identifier[1:] ##don't include @ #elif $match_block['match_type']['match_type_selector'] == 'sequence': search_target = fastq_read.sequence #elif $match_block['match_type']['match_type_selector'] == 'quality': @@ -186,7 +186,7 @@ #for $manipulate_block in $manipulate_blocks: #if $manipulate_block['manipulation_type']['manipulation_type_selector'] == 'identifier': #if $manipulate_block['manipulation_type']['manipulation']['manipulation_selector'] == 'translate': - new_read.identifier = new_read.identifier.translate( maketrans( binascii.unhexlify( "${ binascii.hexlify( str( manipulate_block['manipulation_type']['manipulation']['from'] ) ) }" ), binascii.unhexlify( "${ binascii.hexlify( str( manipulate_block['manipulation_type']['manipulation']['to'] ) ) }" ) ) ) + 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'] ) ) }" ) ) ) #end if #elif $manipulate_block['manipulation_type']['manipulation_type_selector'] == 'sequence': #if $manipulate_block['manipulation_type']['manipulation']['manipulation_selector'] == 'translate': @@ -236,6 +236,8 @@ #continue #end if #end for + if new_read.description != "+": + new_read.description = "+%s" % new_read.identifier[1:] ##ensure description is still valid return new_read def match_and_manipulate_read( fastq_read ): new_read = fastq_read
participants (1)
-
Greg Von Kuster