X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=blobdiff_plain;f=htsworkflow%2Fpipelines%2Fgerald.py;h=2d5d3d51a05e7fddc222b54d1dd2e3384e7af984;hp=2eaff677e6d90c75848a24a43f4b28fad8d2beff;hb=refs%2Fheads%2Fpython3-django1.5;hpb=4262586d10cc0cc227390873b301b55244204c11 diff --git a/htsworkflow/pipelines/gerald.py b/htsworkflow/pipelines/gerald.py index 2eaff67..2d5d3d5 100644 --- a/htsworkflow/pipelines/gerald.py +++ b/htsworkflow/pipelines/gerald.py @@ -59,10 +59,10 @@ class Alignment(object): """ Debugging function, report current object """ - print 'Software:'. self.__class__.__name__ - print 'Alignment version:', self.version - print 'Run date:', self.date - print 'config.xml:', self.tree + print('Software:'. self.__class__.__name__) + print('Alignment version:', self.version) + print('Run date:', self.date) + print('config.xml:', self.tree) self.summary.dump() def get_elements(self, root_tag): @@ -70,7 +70,7 @@ class Alignment(object): return None gerald = ElementTree.Element(root_tag, - {'version': unicode(Gerald.XML_VERSION)}) + {'version': str(Gerald.XML_VERSION)}) gerald.append(self.tree) gerald.append(self.summary.get_elements()) if self.eland_results: @@ -283,7 +283,7 @@ class LaneParametersGA(LaneParameters): lanes = [x.tag.split('_')[1] for x in container.getchildren()] try: index = lanes.index(self._lane_id) - except ValueError, e: + except ValueError as e: return None element = container[index] return element.text @@ -397,7 +397,7 @@ class LaneSpecificRunParameters(collections.MutableMapping): def __iter__(self): if self._lanes is None: self._initialize_lanes() - return self._lanes.iterkeys() + return iter(self._lanes.keys()) def __getitem__(self, key): if self._lanes is None: @@ -410,7 +410,7 @@ class LaneSpecificRunParameters(collections.MutableMapping): return self._lanes[real_key] raise KeyError("%s not found in %s" % ( repr(key), - ",".join((repr(k) for k in self._lanes.keys())))) + ",".join((repr(k) for k in list(self._lanes.keys()))))) def __setitem__(self, key, value): if len(self._lanes) > 100: