outpath = inpath

    summary = {}

    # loop over dataset sources
    for dataset in list(conf.set_data.keys()):
        print(dataset)
        # input directory
        inpath = outpath + '/' + dataset

        # loop over targets
        for target in conf.set_data[dataset]['ids']:
            print(target)

            # load results
            results, fpkeys = ana_func.readFile(
                open(inpath + '/target_' + str(target) + '.txt', 'r'))
            methodkeys = list(results.keys())

            # if summary is not yet set: prepare it
            if len(summary) == 0:
                for m in methodkeys:
                    summary[m] = defaultdict(list)

            # fill results into summary dictionary
            for m in methodkeys:
                for i, k in enumerate(fpkeys):
                    j = i * 2
                    summary[m][k].append(
                        [target, results[m][j], results[m][j + 1]])

    # write out
    if options.inpath:
        inpath = path + options.inpath
        ana_func.checkPath(inpath)
    outpath = inpath

    summary = {}

    # input path
    inpath = outpath + "/ChEMBL"

    # loop over targets
    for target in conf.set_data:
        print target

        # load results
        results, fpkeys = ana_func.readFile(open(inpath + "/target_" + str(target) + ".txt", "r"))
        methodkeys = results.keys()

        # if summary is not yet set: prepare it
        if len(summary) == 0:
            for m in methodkeys:
                summary[m] = defaultdict(list)

        # fill results into summary dictionary
        for m in methodkeys:
            for i, k in enumerate(fpkeys):
                j = i * 2
                summary[m][k].append([target, results[m][j], results[m][j + 1]])

    # write out
    outdir = outpath + "/fp_summary/"
Ejemplo n.º 3
0
    outpath = inpath

    summary = {}

    # loop over dataset sources
    for dataset in conf.set_data.keys():
        print dataset
        # input path
        inpath = outpath+'/'+dataset

        # loop over targets
        for target in conf.set_data[dataset]['ids']:
            print target

            # load results
            results, fpkeys = ana_func.readFile(open(inpath+'/target_'+str(target)+'.txt', 'r'))
            methodkeys = results.keys()

            # if summary is not yet set: prepare it
            if len(summary) == 0:
                for m in methodkeys:
                    summary[m] = defaultdict(list)

            # fill results into summary dictionary
            for m in methodkeys:
                for i,k in enumerate(fpkeys):
                    j = i*2
                    summary[m][k].append([target, results[m][j], results[m][j+1]])

    # write out
    outdir = outpath+'/fp_summary/'
    outpath = inpath

    summary = {}

    # loop over dataset sources
    for dataset in list(conf.set_data.keys()):
        print(dataset)
        # input path
        inpath = outpath + "/" + dataset

        # loop over targets
        for target in conf.set_data[dataset]["ids"]:
            print(target)

            # load results
            results, fpkeys = ana_func.readFile(
                open(inpath + "/target_" + str(target) + ".txt", "r"))
            methodkeys = list(results.keys())

            # if summary is not yet set: prepare it
            if len(summary) == 0:
                for m in methodkeys:
                    summary[m] = defaultdict(list)

            # fill results into summary dictionary
            for m in methodkeys:
                for i, k in enumerate(fpkeys):
                    j = i * 2
                    summary[m][k].append(
                        [target, results[m][j], results[m][j + 1]])

    # write out