code: def iter_tours(tourfile, frames=1):
      
      fp = open(tourfile)
  
      i = 0
      for row in fp:
          if row[0] == '>':
              label = row[1:].strip()
              if label.startswith("GA"):
                  pf, j, score = label.split("-", 2)
                  j = int(j)
              else:
                  j = 0
              i += 1
          else:
              if j % frames != 0:
                  continue
              tour, tour_o = separate_tour_and_o(row)
              yield i, label, tour, tour_o
  
      fp.close()
docs: Extract tours from tourfile. Tourfile contains a set of contig
      configurations, generated at each iteration of the genetic algorithm. Each
      configuration has two rows, first row contains iteration id and score,
      second row contains list of contigs, separated by comma.