changeset 4:5b87038565bb draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/galaxy_sequence_utils/fastq_manipulation commit d4ced60a941c4c4a2fe95de9c09a10086810b387"
author iuc
date Wed, 19 Feb 2020 12:31:39 -0500
parents 7861f3b10c68
children
files fastq_manipulation.xml macros.xml
diffstat 2 files changed, 19 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/fastq_manipulation.xml	Fri Nov 01 13:24:05 2019 -0400
+++ b/fastq_manipulation.xml	Wed Feb 19 12:31:39 2020 -0500
@@ -1,10 +1,11 @@
-<tool id="fastq_manipulation" name="Manipulate FASTQ" version="1.1.1">
+<tool id="fastq_manipulation" name="Manipulate FASTQ" version="@TOOL_VERSION@">
     <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>
-    <requirements>
-        <requirement type="package" version="1.1.1">galaxy_sequence_utils</requirement>
-    </requirements>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
     <edam_topics>
         <edam_topic>topic_0622</edam_topic>
     </edam_topics>
@@ -39,7 +40,7 @@
         #else:
             #continue
         #end if
-    if not re.search(binascii.unhexlify("${ binascii.hexlify(str(match_block['match_type']['match']['match_by'])) }").decode(), search_target):
+    if not re.search(binascii.unhexlify(${ binascii.hexlify(str(match_block['match_type']['match']['match_by']).encode()) }).decode(), search_target):
         return False
     #end for
     return True
@@ -51,11 +52,11 @@
     #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 = "@%s" % new_read.identifier[1:].translate(maketrans(binascii.unhexlify("${ binascii.hexlify(str(manipulate_block['manipulation_type']['manipulation']['from'])) }").decode(), binascii.unhexlify("${ binascii.hexlify(str(manipulate_block['manipulation_type']['manipulation']['to'])) }").decode()))
+    new_read.identifier = "@%s" % new_read.identifier[1:].translate(maketrans(binascii.unhexlify(${ binascii.hexlify(str(manipulate_block['manipulation_type']['manipulation']['from']).encode()) }).decode(), binascii.unhexlify(${ binascii.hexlify(str(manipulate_block['manipulation_type']['manipulation']['to']).encode()) }).decode()))
             #end if
         #elif $manipulate_block['manipulation_type']['manipulation_type_selector'] == 'sequence':
             #if $manipulate_block['manipulation_type']['manipulation']['manipulation_selector'] == 'translate':
-    new_read.sequence = new_read.sequence.translate(maketrans(binascii.unhexlify("${ binascii.hexlify(str(manipulate_block['manipulation_type']['manipulation']['from'])) }").decode(), binascii.unhexlify("${ binascii.hexlify(str(manipulate_block['manipulation_type']['manipulation']['to'])) }").decode()))
+    new_read.sequence = new_read.sequence.translate(maketrans(binascii.unhexlify(${ binascii.hexlify(str(manipulate_block['manipulation_type']['manipulation']['from']).encode()) }).decode(), binascii.unhexlify(${ binascii.hexlify(str(manipulate_block['manipulation_type']['manipulation']['to']).encode()) }).decode()))
             #elif $manipulate_block['manipulation_type']['manipulation']['manipulation_selector'] == 'rev_comp':
     new_read = new_read.reverse_complement()
             #elif $manipulate_block['manipulation_type']['manipulation']['manipulation_selector'] == 'rev_no_comp':
@@ -83,11 +84,11 @@
     new_read = new_read.sequence_as_RNA()
             #elif $manipulate_block['manipulation_type']['manipulation']['manipulation_selector'] == 'change_adapter':
     if new_read.sequence_space == 'color':
-        new_read = new_read.change_adapter(binascii.unhexlify("${ binascii.hexlify(str(manipulate_block['manipulation_type']['manipulation']['new_adapter'])) }").decode())
+        new_read = new_read.change_adapter(binascii.unhexlify(${ binascii.hexlify(str(manipulate_block['manipulation_type']['manipulation']['new_adapter']).encode()) }).decode())
             #end if
         #elif $manipulate_block['manipulation_type']['manipulation_type_selector'] == 'quality':
             #if $manipulate_block['manipulation_type']['manipulation']['manipulation_selector'] == 'translate':
-    new_read.quality = new_read.quality.translate(maketrans(binascii.unhexlify("${ binascii.hexlify(str(manipulate_block['manipulation_type']['manipulation']['from'])) }").decode(), binascii.unhexlify("${ binascii.hexlify(str(manipulate_block['manipulation_type']['manipulation']['to'])) }").decode()))
+    new_read.quality = new_read.quality.translate(maketrans(binascii.unhexlify(${ binascii.hexlify(str(manipulate_block['manipulation_type']['manipulation']['from'])).encode() }).decode(), binascii.unhexlify(${ binascii.hexlify(str(manipulate_block['manipulation_type']['manipulation']['to']).encode()) }).decode()))
             #elif $manipulate_block['manipulation_type']['manipulation']['manipulation_selector'] == 'map_score':
     def score_method(score):
         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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Wed Feb 19 12:31:39 2020 -0500
@@ -0,0 +1,9 @@
+<macros>
+    <token name="@TOOL_VERSION@">1.1.5</token>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="@TOOL_VERSION@">galaxy_sequence_utils</requirement>
+            <yield/>
+        </requirements>
+    </xml>>
+</macros>