Example #1
0
def bsub_orthology_query(cache_key, cache_file, query_kws, job_name):
    lsf_options = ['-o', '/dev/null', '-N',
                   # '-q', 'short', # short is a big queue but often busy
                   '-q', 'cbi_12h', # cbi_12h has few nodes but is rarely busy
                   '-W', '2:0',
                   '-J', job_name]
    filename = filemsg.dump({'cache_key': cache_key, 'cache_file': cache_file,
                             'query_kws': query_kws})
    cmd = cliutil.args(__file__) + ['orthquery', '--params', filename]
    return lsf.bsub(cmd, lsf_options)
Example #2
0
def _bsub_task(ns, task, lsfopts, devnull=True):
    '''
    Submit a task to lsf
    '''
    filename = filemsg.dump([ns, task])
    cmd = cliutil.args(__file__) + ['run_task', filename]
    devnull_option = ['-o', '/dev/null'] if devnull else []
    jobname_option = ['-J', _lsf_job_name(ns, task.name)]
    lsfopts = devnull_option + list(lsfopts) + jobname_option
    return lsf.bsub(cmd, lsfopts)