示例#1
0
def main(args):
    '''
    Main function
    '''
    # check parameters
    # extract params for the methods
    params = {}
    methods = ["sanxot1"]
    for method in methods:
        if not method in args.params:
            _print_exception(
                2, "checking the parameters for the {} method".format(method))
        match = re.search(r'{\s*' + method + r'\s*:\s*([^\}]*)}', args.params,
                          re.IGNORECASE)
        if match.group():
            params[method] = match.group(1)
        else:
            _print_exception(
                2, "checking the parameters for the {} method".format(method))

    # get directory from input files
    outdir = os.path.dirname(os.path.realpath(args.profile))

    # create builder ---
    logging.info("create workflow builder")
    w = wf.builder(outdir, logging)

    logging.info("execute sanxot")
    w.sanxot({
        "-a": "q2a_outs",
        "-d": args.profile,
    }, params["sanxot1"])
示例#2
0
def main(args):
    '''
    Main function
    '''
    # check parameters
    # extract params for the methods
    params = {}
    methods = ["sanxot1"]
    for method in methods:
        if not method in args.params:
            _print_exception( 2, "checking the parameters for the {} method".format(method) )
        match = re.search(r'{\s*' + method + r'\s*:\s*([^\}]*)}', args.params, re.IGNORECASE)
        if match.group():
            params[method] = match.group(1)
        else:
            _print_exception( 2, "checking the parameters for the {} method".format(method) )
    # extract temporal working directory...
    if args.tmpdir:
        tmpdir = args.tmpdir
    # otherwisae, get directory from input files
    else:
        tmpdir = os.path.dirname(os.path.realpath(args.catfile))+"/tmp"
    
    # create builder ---
    logging.info("create workflow builder")
    w = wf.builder(tmpdir, logging)

    logging.info("execute sanxot")
    w.sanxot({
        "-a": "c2a_outs",
        "-d": args.catfile,
        "-z": args.c2afile
    }, params["sanxot1"])
示例#3
0
def main(args):
    '''
    Main function
    '''
    # check parameters
    # extract params for the methods
    params = {}
    methods = ["aljamia1"]
    for method in methods:
        if not method in args.params:
            _print_exception(
                2, "checking the parameters for the {} method".format(method))
        match = re.search(r'{\s*' + method + r'\s*:\s*([^\}]*)}', args.params,
                          re.IGNORECASE)
        if match.group():
            params[method] = match.group(1)
        else:
            _print_exception(
                2, "checking the parameters for the {} method".format(method))

    # get directory from input files
    outdir = os.path.dirname(os.path.realpath(args.relfile))

    # create builder ---
    logging.info("create workflow builder")
    w = wf.builder(outdir, logging)

    logging.info("aljamia for peptide to protein")
    w.aljamia({"-x": args.idqfile, "-o": args.relfile}, params["aljamia1"])
示例#4
0
def main(args):
    '''
    Main function
    '''
    # check parameters
    # extract params for the methods
    params = {}
    methods = ["klibrate1", "sanxot1", "sanxotsieve1", "sanxot2"]
    for method in methods:
        if not method in args.params:
            _print_exception( 2, "checking the parameters for the {} method".format(method) )
        match = re.search(r'{\s*' + method + r'\s*:\s*([^\}]*)}', args.params, re.IGNORECASE)
        if match.group():
            params[method] = match.group(1)
        else:
            _print_exception( 2, "checking the parameters for the {} method".format(method) )
    # extract temporal working directory...
    if args.tmpdir:
        tmpdir = args.tmpdir
    # otherwisae, get directory from input files
    else:
        tmpdir = os.path.dirname(os.path.realpath(args.relfile))+"/tmp"
    
    # create builder ---
    logging.info("create workflow builder")
    w = wf.builder(tmpdir, logging)

    logging.info("klibrate scans")
    w.klibrate({
        "-d": args.uscanfile,
        "-r": args.relfile,
        "-o": args.scanfile
    }, params["klibrate1"])

    logging.info("execute sanxot")
    w.sanxot({
        "-a": "s2p_outs",
        "-d": args.scanfile,
        "-r": args.relfile
    }, params["sanxot1"])

    logging.info("execute sanxotsieve")
    p = { "-d": args.scanfile, "-r": args.relfile, "-f": args.fdr }
    if args.variance: # force the variance
        p["-v"] = args.variance
    else: # use the file variance
        p["-V"] = "s2p_outs_infoFile.txt"
    w.sanxotsieve(p, params["sanxotsieve1"])

    logging.info("execute sanxot")
    tagfile = os.path.splitext( os.path.basename(args.scanfile) )[0] + "_tagged.tsv"
    p = { "-a": "s2p_nouts", "-d": args.scanfile, "-r": tagfile, "-o": args.pepfile }
    if args.variance:
        p["-v"] = args.variance
    else:
        p["-V"] = "s2p_outs_infoFile.txt"
    w.sanxot(p, params["sanxot2"])
def main(args):
    '''
    Main function
    '''
    # check parameters
    # extract params for the methods
    params = {}
    methods = ["sanxot1", "sanxotsieve1", "sanxot2"]
    for method in methods:
        if not method in args.params:
            _print_exception(
                2, "checking the parameters for the {} method".format(method))
        match = re.search(r'{\s*' + method + r'\s*:\s*([^\}]*)}', args.params,
                          re.IGNORECASE)
        if match.group():
            params[method] = match.group(1)
        else:
            _print_exception(
                2, "checking the parameters for the {} method".format(method))

    # get directory from input files
    outdir = os.path.dirname(os.path.realpath(args.catfile))

    # create builder ---
    logging.info("create workflow builder")
    w = wf.builder(outdir, logging)

    logging.info("execute sanxot")
    w.sanxot({
        "-a": "q2c_outs",
        "-d": args.profile,
        "-r": args.relfile
    }, params["sanxot1"])

    logging.info("execute sanxotsieve")
    w.sanxotsieve(
        {
            "-d": args.profile,
            "-r": args.relfile,
            "-f": args.fdr,
            "-V": "q2c_outs_infoFile.txt"
        }, params["sanxotsieve1"])

    logging.info("execute sanxot")
    tagfile = os.path.splitext(os.path.basename(
        args.profile))[0] + "_tagged.xls"
    w.sanxot(
        {
            "-a": "q2c_nouts",
            "-d": args.profile,
            "-r": tagfile,
            "-o": args.catfile,
            "-V": "q2c_outs_infoFile.txt",
        }, params["sanxot2"])
示例#6
0
def main(args):
    '''
    Main function
    '''
    # check parameters
    # extract params for the methods
    params = {}
    methods = ["aljamia1"]
    for method in methods:
        if not method in args.params:
            _print_exception(
                2, "checking the parameters for the {} method".format(method))
        match = re.search(r'{\s*' + method + r'\s*:\s*([^\}]*)}', args.params,
                          re.IGNORECASE)
        if match.group():
            params[method] = match.group(1)
        else:
            _print_exception(
                2, "checking the parameters for the {} method".format(method))

    # get directory from input files
    outdir = os.path.dirname(os.path.realpath(args.relfile))

    # create builder ---
    logging.info("create workflow builder")
    w = wf.builder(outdir, logging)

    logging.info("aljamia for peptide to protein")
    w.aljamia({
        "-x": args.idqfile,
        "-o": "p2q_rels_aux.xls"
    }, params["aljamia1"])

    logging.info('create corrector object')
    co = corrector(w.tmpdir + "/p2q_rels_aux.xls", args.species, args.pretxt,
                   args.indb)

    logging.info('calculate the unique protein')
    co.get_unique_protein()

    logging.info('print output')
    co.to_csv(args.relfile)
示例#7
0
def main(args):
    '''
    Main function
    '''
    # check parameters
    # extract params for the methods
    params = {}
    methods = ["aljamia1", "aljamia2"]
    for method in methods:
        if not method in args.params:
            _print_exception( 2, "checking the parameters for the {} method".format(method) )
        match = re.search(r'{\s*' + method + r'\s*:\s*([^\}]*)}', args.params, re.IGNORECASE)
        if match.group():
            params[method] = match.group(1)
        else:
            _print_exception( 2, "checking the parameters for the {} method".format(method) )
    # extract temporal working directory...
    if args.tmpdir:
        tmpdir = args.tmpdir
    # otherwisae, get directory from input files
    else:
        tmpdir = os.path.dirname(os.path.realpath(args.relfile))+"/tmp"
    
    # create builder ---
    logging.info("create workflow builder")
    w = wf.builder(tmpdir, logging)

    logging.info("aljamia for scan uncalibrated")
    w.aljamia({
        "-x": args.idqfile,
        "-o": args.scanfile
    }, params["aljamia1"])

    logging.info("aljamia for s2p relationship")
    w.aljamia({
        "-x": args.idqfile,
        "-o": args.relfile
    }, params["aljamia2"])