def _process_data(this_round_fp, log_fh=None, error_profile=None):
 cmd = ('%s -relscore_pairid %s %s.dat' % (get_flowgram_ali_exe(), error_profile, this_round_fp))
 proc = Popen(cmd, shell=True, universal_newlines=True, stdout=PIPE, stderr=PIPE)
 (stdout, stderr) = proc.communicate()
 if (proc.returncode != 0):
  host = gethostname()
  if log_fh:
   log_fh.write(('An error occured on %s at %f\n%s' % (host, time(), cmd)))
   log_fh.write(stderr)
   log_fh.close()
  raise RuntimeError(('Worker process crashed. Aborting...!\n' + 'Note: You need to kill the other jobs yourself'))
 if log_fh:
  log_fh.write((this_round_fp + '... done!\n'))
 return stdout

def _process_data ( this_round_fp , log_fh = None , error_profile = None ) : cmd = ( '%s -relscore_pairid %s %s.dat' % ( get_flowgram_ali_exe ( ) , error_profile , this_round_fp ) ) proc = Popen ( cmd , shell = True , universal_newlines = True , stdout = PIPE , stderr = PIPE ) ( stdout , stderr ) = proc . communicate ( ) if ( proc . returncode != 0 ) : host = gethostname ( ) if log_fh : log_fh . write ( ( 'An error occured on %s at %f\n%s' % ( host , time ( ) , cmd ) ) ) log_fh . write ( stderr ) log_fh . close ( ) raise RuntimeError ( ( 'Worker process crashed. Aborting...!\n' + 'Note: You need to kill the other jobs yourself' ) ) if log_fh : log_fh . write ( ( this_round_fp + '... done!\n' ) ) return stdout
compute alignment scores for flowgrams in this_round_fp .