do_append = False if options.do_append: do_append = options.do_append simil_metric = 'Dice' if options.simil: simil_metric = options.simil outpath = path outpath_set = False if options.outpath: outpath_set = True outpath = path+options.outpath # check for sensible input fp_names = scor.checkFPFile(fp_file) if not fp_names: raise ValueError('No fingerprints given in', fp_file) if outpath_set: scor.checkPath(outpath, 'output') scor.checkSimil(simil_metric) scor.checkQueryMols(num_query_mols, conf.list_num_query_mols) # loop over data-set sources for dataset in conf.set_data.keys(): print dataset # loop over targets for target in conf.set_data[dataset]['ids']: print target # read in actives and calculate fps actives = [] for line in gzip.open(inpath_cmp+dataset+'/cmp_list_'+dataset+'_'+str(target)+'_actives.dat.gz', 'r'): if line[0] != '#': # structure of line: [external ID, internal ID, SMILES]] line = line.rstrip().split() fp_dict = scor.getFPDict(fp_names, line[2])
do_append = False if options.do_append: do_append = options.do_append simil_metric = 'Dice' if options.simil: simil_metric = options.simil outpath = path outpath_set = False if options.outpath: outpath_set = True outpath = path + options.outpath # check for sensible input fp_names = scor.checkFPFile(fp_file) if not fp_names: raise ValueError('No fingerprints given in', fp_file) if outpath_set: scor.checkPath(outpath, 'output') scor.checkSimil(simil_metric) scor.checkQueryMols(num_query_mols, conf.list_num_query_mols) # loop over data-set sources for dataset in conf.set_data.keys(): print dataset # loop over targets for target in conf.set_data[dataset]['ids']: print target # read in actives and calculate fps actives = [] for line in gzip.open( inpath_cmp + dataset + '/cmp_list_' + dataset + '_' + str(target) + '_actives.dat.gz', 'r'): if line[0] != '#': # structure of line: [external ID, internal ID, SMILES]]