Ejemplo n.º 1
0
 def suffix(self, stop=None):
     """
     Get the SNAP operator suffix sequence
     
     Parameters
     ----------
     stop: str
         the ID of the last workflow node
     
     Returns
     -------
     str
         a file suffix created from the order of which the nodes will be executed
     """
     nodes = self.tree.findall('node')
     names = [re.sub(r'[ ]*\([0-9]+\)', '', y.attrib['id']) for y in nodes]
     names_unique = []
     for name in names:
         if name not in names_unique:
             names_unique.append(name)
         if name == stop:
             break
     config = ExamineSnap()
     suffix = '_'.join(
         filter(None, [config.get_suffix(x) for x in names_unique]))
     return suffix
Ejemplo n.º 2
0
 def suffix(self):
     """
     
     Returns
     -------
     str
         a file suffix created from the order of which the nodes will be executed
     """
     nodes = self.tree.findall('node')
     names = [re.sub(r'[ ]*\([0-9]+\)', '', y.attrib['id']) for y in nodes]
     names_unique = []
     for name in names:
         if name not in names_unique:
             names_unique.append(name)
     config = ExamineSnap()
     suffix = '_'.join(
         filter(None, [config.get_suffix(x) for x in names_unique]))
     return suffix