X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=blobdiff_plain;f=htsworkflow%2Fpipelines%2Fipar.py;fp=htsworkflow%2Fpipelines%2Fipar.py;h=576bff85aedba54c2cd01b0e0c12d2c18aff5b06;hp=f818b3495fbf2fd2d8f2fba13d698188e7680d3f;hb=53ebb47e86e81ce349d4ef4e16aef94be93486ea;hpb=4262586d10cc0cc227390873b301b55244204c11 diff --git a/htsworkflow/pipelines/ipar.py b/htsworkflow/pipelines/ipar.py index f818b34..576bff8 100644 --- a/htsworkflow/pipelines/ipar.py +++ b/htsworkflow/pipelines/ipar.py @@ -52,11 +52,11 @@ class Tiles(object): return value_list def items(self): - return zip(self.keys(), self.values()) + return list(zip(list(self.keys()), list(self.values()))) def __getitem__(self, key): # FIXME: this is inefficient. building the dictionary be rescanning the xml. - v = dict(self.items()) + v = dict(list(self.items())) return v[key] class IPAR(object): @@ -146,12 +146,12 @@ class IPAR(object): """ suffix_node = self.tree.find('RunParameters/CompressionSuffix') if suffix_node is None: - print "find compression suffix failed" + print("find compression suffix failed") return None suffix = suffix_node.text files = [] format = "%s_%s_%04d_%s.txt%s" - for lane, attrib in self.tiles.items(): + for lane, attrib in list(self.tiles.items()): for file_type in ["int","nse"]: start, stop = attrib['TileRange'] for tile in range(start, stop+1): @@ -159,8 +159,8 @@ class IPAR(object): return files def dump(self): - print "Matrix:", self.matrix - print "Tree:", self.tree + print("Matrix:", self.matrix) + print("Tree:", self.tree) def get_elements(self): attribs = {'version': str(IPAR.XML_VERSION) } @@ -195,7 +195,7 @@ def load_ipar_param_tree(paramfile): tree = ElementTree.parse(paramfile).getroot() run = tree.find('Run') - if run.attrib.has_key('Name') and run.attrib['Name'] in SOFTWARE_NAMES: + if 'Name' in run.attrib and run.attrib['Name'] in SOFTWARE_NAMES: return run else: LOGGER.info("No run found")