コード例 #1
0
ファイル: rdp-probematch.py プロジェクト: kbase/rdptools
def probematch_async(handle_files, cmdoptions):
    service = RDPTools()
    try:
        jobid = service.probematch_submit(handle_files[0], cmdoptions, handle_files[1])
    except urllib2.URLError:
        raise SystemExit("Failed to connect to KBase server")
    except subprocess.CalledProcessError, args:
        raise SystemExit("Failed to execute command: " + " ".join(args))
コード例 #2
0
ファイル: rdp-classifier.py プロジェクト: kbase/rdptools
def classifier_async(handle_files, cmdoptions):
    service = RDPTools()
    try:
        jobid = service.classify_submit(handle_files, cmdoptions)
    except urllib2.URLError:
        raise SystemExit("Failed to connect to KBase server")
    except RuntimeError:
        raise SystemExit("Failed to upload job to AWE")

    print "Got jobID", jobid

    while True:
        status, detail_handle, hier_handle = service.classify_check(jobid)
        print "status =", status
        if status == "completed":
            return detail_handle, hier_handle
        elif status == "suspend":
            print "Failed to execute job"
            return None, None
        time.sleep(1)
コード例 #3
0
ファイル: rdp-seqmatch.py プロジェクト: kbase/rdptools
def seqmatch_async(handle_files, cmdoptions):
    service = RDPTools()
    try:
        jobid = service.seqmatch_submit(
                    handle_files[0], handle_files[1], cmdoptions)
    except urllib2.URLError:
        raise SystemExit("Failed to connect to KBase server")
    except RuntimeError:
        raise SystemExit("Failed to upload job to AWE server")

    print "Got jobID", jobid

    while True:
        status, result_handle = service.seqmatch_check(jobid)
        print "status =", status
        if status == "completed":
            return result_handle
        elif status == "suspend":
            print "Failed to execute job"
            return None
        time.sleep(1)
コード例 #4
0
ファイル: rdp-probematch.py プロジェクト: kbase/rdptools
def probematch_sync(handle_files, cmdoptions):
    service = RDPTools()
    return service.probematch(handle_files[0], cmdoptions, handle_files[1])
コード例 #5
0
ファイル: rdp-classifier.py プロジェクト: kbase/rdptools
def classifier_sync(handle_files, cmdoptions):
    service = RDPTools()
    return service.classify(handle_files, cmdoptions)
コード例 #6
0
ファイル: rdp-seqmatch.py プロジェクト: kbase/rdptools
def seqmatch_sync(handle_files, cmdoptions):
    service = RDPTools()
    return service.seqmatch(handle_files[0], handle_files[1], cmdoptions)