Example #1
0
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))
Example #2
0
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)
Example #3
0
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)
Example #4
0
def probematch_sync(handle_files, cmdoptions):
    service = RDPTools()
    return service.probematch(handle_files[0], cmdoptions, handle_files[1])
Example #5
0
def classifier_sync(handle_files, cmdoptions):
    service = RDPTools()
    return service.classify(handle_files, cmdoptions)
Example #6
0
def seqmatch_sync(handle_files, cmdoptions):
    service = RDPTools()
    return service.seqmatch(handle_files[0], handle_files[1], cmdoptions)