示例#1
0
    parser.add_argument('probanno', help='ID of ProbAnno object', action='store', default=None)
    parser.add_argument('-w', '--probannows', help='workspace where ProbAnno object is saved', action='store', dest='probannows', default=None)
    parser.add_argument('--genomews', help='workspace where Genome object is saved', action='store', dest='genomews', default=None)
    parser.add_argument('--url', help='url for service', action='store', dest='url', default=None)
    parser.add_argument('-e', '--show-error', help='show detailed information for an exception', action='store_true', dest='showError', default=False)
    usage = parser.format_usage()
    parser.description = desc1 + '      ' + usage + desc2
    parser.usage = argparse.SUPPRESS
    args = parser.parse_args()
    
    # Create input parameters for annotate() function.
    input = dict()
    input['genome'] = args.genome
    input['probanno'] = args.probanno
    if args.genomews is None:
        input['genome_workspace'] = user_workspace()
    else:
        input['genome_workspace'] = args.genomews
    if args.probannows is None:
        input['probanno_workspace'] = user_workspace()
    else:
        input['probanno_workspace'] = args.probannows
                
    # Create a probabilistic annotation client.
    if args.url is None:
        args.url = get_url()
    paClient = ProbabilisticAnnotation(url=args.url)

    # Submit a job to annotate the specified genome.
    try:
        jobid = paClient.annotate(input)
    parser.add_argument('probanno', help='ID of ProbAnno object', action='store', default=None)
    parser.add_argument('-w', '--workspace', help='workspace where ProbAnno object is saved', action='store', dest='probannows', default=None)
    parser.add_argument('-v', '--version', help='version number of ProbAnno object', action='store', dest='probannover', type=int, default=None)
    parser.add_argument('-r', '--roles', help='Print role likelihoods instead of annotation likelihoods', action='store_true', dest='roles', default=False)
    parser.add_argument('-u', '--url', help='url for service', action='store', dest='url', default=None)
    parser.add_argument('-e', '--show-error', help='show detailed information for an exception', action='store_true', dest='showError', default=False)
    usage = parser.format_usage()
    parser.description = desc1 + '      ' + usage + desc2
    parser.usage = argparse.SUPPRESS
    args = parser.parse_args()

    # Create input parameters for annotate() function.
    input = dict()
    input['probanno'] = args.probanno
    if args.probannows is None:
        input['probanno_workspace'] = user_workspace()
    else:
        input['probanno_workspace'] = args.probannows
    input['probanno_version'] = args.probannover
                
    # Create a probabilistic annotation client.
    if args.url is None:
        args.url = get_url()
    paClient = ProbabilisticAnnotation(url=args.url)

    # Get the raw data from the server.
    try:
        output = paClient.get_probanno(input)
    except Exception as e:
        print 'Error getting ProbAnno object: %s' %(e.message)
        if args.showError:
示例#3
0
    parser.add_argument('-e',
                        '--show-error',
                        help='show detailed information for an exception',
                        action='store_true',
                        dest='showError',
                        default=False)
    usage = parser.format_usage()
    parser.description = desc1 + '      ' + usage + desc2
    parser.usage = argparse.SUPPRESS
    args = parser.parse_args()

    # Create input parameters for annotate() function.
    input = dict()
    input['rxnprobs'] = args.rxnprobs
    if args.rxnprobsws is None:
        input['rxnprobs_workspace'] = user_workspace()
    else:
        input['rxnprobs_workspace'] = args.rxnprobsws
    input['rxnprobs_version'] = args.rxnprobsver
    input['sort_field'] = args.sortField

    # Create a probabilistic annotation client.
    if args.url is None:
        args.url = get_url()
    paClient = ProbabilisticAnnotation(url=args.url)

    # Get the raw data from the server.
    try:
        output = paClient.get_rxnprobs(input)
    except Exception as e:
        print 'Error getting RxnProbs object: %s' % (e.message)
    parser.add_argument('--probannows', help='workspace where ProbAnno object is stored', action='store', dest='probannows', default=None)
    parser.add_argument('-t', '--template', help='ID of ModelTemplate object', action='store', dest='template', default=None)
    parser.add_argument('--templatews', help='workspace where ModelTemplate object is stored', action='store', dest='templatews', default=None)
    parser.add_argument('--url', help='url for service', action='store', dest='url', default=None)
    parser.add_argument('-e', '--show-error', help='show detailed information for an exception', action='store_true', dest='showError', default=False)
    usage = parser.format_usage()
    parser.description = desc1 + '      ' + usage + desc2
    parser.usage = argparse.SUPPRESS
    args = parser.parse_args()
    
    # Create input parameters for annotate() function.
    input = dict()
    input['probanno'] = args.probanno
    input['rxnprobs'] = args.rxnprobs
    if args.probannows is None:
        input['probanno_workspace'] = user_workspace()
    else:
        input['probanno_workspace'] = args.probannows
    if args.rxnprobsws is None:
        input['rxnprobs_workspace'] = user_workspace()
    else:
        input['rxnprobs_workspace'] = args.rxnprobsws
    input['template_model'] = args.template
    input['template_workspace'] = args.templatews
                
    # Create a probabilistic annotation client.
    if args.url is None:
        args.url = get_url()
    paClient = ProbabilisticAnnotation(url=args.url)

    # Calculate reaction probabilities from probabilistic annotation.
    parser.add_argument('rxnprobs', help='ID of RxnProbs object', action='store', default=None)
    parser.add_argument('-w', '--workspace', help='workspace where RxnProbs object is saved', action='store', dest='rxnprobsws', default=None)
    parser.add_argument('-v', '--version', help='version number of RxnProbs object', action='store', dest='rxnprobsver', type=int, default=None)
    parser.add_argument('--sort', help='field to use as key for sorting output table', action='store', dest='sortField', default='rxnid')
    parser.add_argument('-u', '--url', help='url for service', action='store', dest='url', default=None)
    parser.add_argument('-e', '--show-error', help='show detailed information for an exception', action='store_true', dest='showError', default=False)
    usage = parser.format_usage()
    parser.description = desc1 + '      ' + usage + desc2
    parser.usage = argparse.SUPPRESS
    args = parser.parse_args()

    # Create input parameters for annotate() function.
    input = dict()
    input['rxnprobs'] = args.rxnprobs
    if args.rxnprobsws is None:
        input['rxnprobs_workspace'] = user_workspace()
    else:
        input['rxnprobs_workspace'] = args.rxnprobsws
    input['rxnprobs_version'] = args.rxnprobsver
    input['sort_field'] = args.sortField
                
    # Create a probabilistic annotation client.
    if args.url is None:
        args.url = get_url()
    paClient = ProbabilisticAnnotation(url=args.url)

    # Get the raw data from the server.
    try:
        output = paClient.get_rxnprobs(input)
    except Exception as e:
        print 'Error getting RxnProbs object: %s' %(e.message)
示例#6
0
    parser.add_argument('-e',
                        '--show-error',
                        help='show detailed information for an exception',
                        action='store_true',
                        dest='showError',
                        default=False)
    usage = parser.format_usage()
    parser.description = desc1 + '      ' + usage + desc2
    parser.usage = argparse.SUPPRESS
    args = parser.parse_args()

    # Create input parameters for annotate() function.
    input = dict()
    input['probanno'] = args.probanno
    if args.probannows is None:
        input['probanno_workspace'] = user_workspace()
    else:
        input['probanno_workspace'] = args.probannows
    input['probanno_version'] = args.probannover

    # Create a probabilistic annotation client.
    if args.url is None:
        args.url = get_url()
    paClient = ProbabilisticAnnotation(url=args.url)

    # Get the raw data from the server.
    try:
        output = paClient.get_probanno(input)
    except Exception as e:
        print 'Error getting ProbAnno object: %s' % (e.message)
        if args.showError: