def runCommand( args ):

    cmd, logfile = args
    log = open(logfile, "w" )
    log.write("# %s" % " ".join(cmd))
    retcode = subprocess.call( cmd,
                               preexec_fn=subprocess_setup,
                               stderr=log)

    if retcode != 0:
        die( "Error: segment-based junction search failed with err ="+str(retcode))

    log.close()
dataset/ETHPy150Open CGATOxford/cgat/obsolete/tophat_segment_juncs.py/runCommand/original