code: def _write_segments(self, filename):
          
          # Column headers
          shead = '\t'.join(['id', 'multiplicon', 'genome', 'list', 'first',
                             'last', 'order'])
          with open(filename, 'w') as fhandle:
              fhandle.write(shead + '\n')
              for mrow in self.segments:
                  fhandle.write('\t'.join([str(e) for e in mrow]) + '\n')
docs: Write segments to file.
  
              - filename, (str) location of output file