changeset 4:b41a4bb828a3 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/genetrack commit 2772547f531819d3f6d892ed041fa39b82e3550f
author iuc
date Wed, 05 Jul 2017 11:56:54 -0400
parents 41887967ef14
children
files genetrack.xml genetrack_macros.xml genetrack_util.py genetrack_util.pyc
diffstat 4 files changed, 22 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/genetrack.xml	Sat Jan 21 14:41:43 2017 -0500
+++ b/genetrack.xml	Wed Jul 05 11:56:54 2017 -0400
@@ -5,18 +5,18 @@
         <import>genetrack_macros.xml</import>
     </macros>
     <expand macro="requirements" />
-    <command>
-        python $__tool_directory__/genetrack.py
-        --input_format $input_format_cond.input_format
-        #for $i in $input_format_cond.input:
-            --input "${i}" "${i.hid}"
-        #end for
-        --sigma $sigma
-        --exclusion $exclusion
-        --up_width $up_width
-        --down_width $down_width
-        --filter $filter
-    </command>
+    <command detect_errors="exit_code"><![CDATA[
+python '$__tool_directory__/genetrack.py'
+--input_format $input_format_cond.input_format
+#for $i in $input_format_cond.input:
+    --input '${i}' '${i.hid}'
+#end for
+--sigma $sigma
+--exclusion $exclusion
+--up_width $up_width
+--down_width $down_width
+--filter $filter
+    ]]></command>
     <inputs>
         <conditional name="input_format_cond">
             <param name="input_format" type="select" label="Format of files for conversion">
--- a/genetrack_macros.xml	Sat Jan 21 14:41:43 2017 -0500
+++ b/genetrack_macros.xml	Wed Jul 05 11:56:54 2017 -0400
@@ -3,17 +3,10 @@
     <token name="@WRAPPER_VERSION@">1.0</token>
     <xml name="requirements">
         <requirements>
-            <requirement type="package" version="1.11.3">numpy</requirement>
+            <requirement type="package" version="1.13.0">numpy</requirement>
+            <requirement type="package" version="1.10.0">six</requirement>
         </requirements>
     </xml>
-    <xml name="stdio">
-        <stdio>
-            <exit_code range="1:"/>
-            <exit_code range=":-1"/>
-            <regex match="Error:"/>
-            <regex match="Exception:"/>
-        </stdio>
-    </xml>
     <xml name="citations">
         <citations>
             <citation type="doi">10.1093/bioinformatics/btn119</citation>
--- a/genetrack_util.py	Sat Jan 21 14:41:43 2017 -0500
+++ b/genetrack_util.py	Wed Jul 05 11:56:54 2017 -0400
@@ -6,6 +6,7 @@
 import tempfile
 
 import numpy
+from six import Iterator
 
 GFF_EXT = 'gff'
 SCIDX_EXT = 'scidx'
@@ -41,7 +42,7 @@
     return data
 
 
-class ChromosomeManager(object):
+class ChromosomeManager(Iterator):
     """
     Manages a CSV reader of an index file to only load one chrom at a time
     """
@@ -53,8 +54,8 @@
         self.current_index = 0
         self.next_valid()
 
-    def next(self):
-        self.line = self.reader.next()
+    def __next__(self):
+        self.line = next(self.reader)
 
     def is_valid(self, line):
         if len(line) not in [4, 5, 9]:
@@ -77,10 +78,10 @@
         """
         Advance to the next valid line in the reader
         """
-        self.line = self.reader.next()
+        self.line = next(self.reader)
         s = 0
         while not self.is_valid(self.line):
-            self.line = self.reader.next()
+            self.line = next(self.reader)
             s += 1
         if s > 0:
             # Skip initial line(s) of file
@@ -115,7 +116,7 @@
                 self.current_index = read[0]
                 self.add_read(read)
             try:
-                self.next()
+                next(self)
             except StopIteration:
                 self.done = True
                 break
@@ -271,7 +272,7 @@
         return math.exp(-x * x / (2 * sigma2))
 
     # width is the half of the distribution
-    values = map(normal_func, range(-width, width))
+    values = list(map(normal_func, range(-width, width)))
     values = numpy.array(values, numpy.float)
     # normalization
     if normalize:
Binary file genetrack_util.pyc has changed