# HG changeset patch
# User iuc
# Date 1499270214 14400
# Node ID b41a4bb828a384e244984f8bba4b705f9deb91a9
# Parent 41887967ef14c9bbf79fae102208b812e65dbac8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/genetrack commit 2772547f531819d3f6d892ed041fa39b82e3550f
diff -r 41887967ef14 -r b41a4bb828a3 genetrack.xml
--- 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 @@
genetrack_macros.xml
-
- 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
-
+
diff -r 41887967ef14 -r b41a4bb828a3 genetrack_macros.xml
--- 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 @@
1.0
- numpy
+ numpy
+ six
-
-
-
-
-
-
-
-
10.1093/bioinformatics/btn119
diff -r 41887967ef14 -r b41a4bb828a3 genetrack_util.py
--- 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:
diff -r 41887967ef14 -r b41a4bb828a3 genetrack_util.pyc
Binary file genetrack_util.pyc has changed