for ligand in ligands
        ]
        markercolors = ["k" for ligand in ligands]

        if len(x) > 1:
            scatter_plot_info(x, y, ligands, out_text_file)

            scatter_plot(x,
                         y,
                         args.xlabel,
                         args.ylabel,
                         out_figure_file,
                         show_xy_axes=args.show_xy_axes,
                         xerr=xerr,
                         yerr=yerr,
                         show_regression_line=True,
                         show_diagonal_line=False,
                         show_rmse=True,
                         show_R=True,
                         show_regression_line_eq=True,
                         markers=markers,
                         markersize=5,
                         markercolors=markercolors,
                         same_xy_scale=False,
                         text_pos=[0.1, 0.7])

all_ligands = [
    all_algdock_scores[scheme][ref_ligand].keys()
    for scheme in weighting_schemes for ref_ligand in SIX_YANK_SYSTEMS
]
common_ligands = set(all_ligands[0])
unioned_ligands = set(all_ligands[0])
Exemple #2
0
    out_file = os.path.basename(data_file) + ".pdf"

    title = os.path.basename(data_file)
    if args.title:
        title = " vs ".join(title.split("_vs_"))
    else:
        title = None
    scatter_plot(x,
                 y,
                 args.xlabel,
                 args.ylabel,
                 out_file,
                 show_xy_axes=True,
                 xerr=None,
                 yerr=None,
                 x_logscale=False,
                 y_logscale=False,
                 show_regression_line=False,
                 show_diagonal_line=False,
                 show_rmse=True,
                 show_R=True,
                 show_regression_line_eq=True,
                 markers=None,
                 markersize=4,
                 markercolors=None,
                 same_xy_scale=False,
                 integer_limits=False,
                 text_pos=[0.1, 0.7],
                 title=title)
        y_errs.append(algdock_errors[ref_ligand][target_ligand])

    ys = np.array(ys)
    y_errs = np.array(y_errs) * error_scales[i] / 2.

    dummy_ligands = ["abc" for _ in ys]
    scatter_plot_info(xs, ys, dummy_ligands, out_log)

    ylim = ylims[i]
    if ylim is not None:
        ylim = [float(s) for s in ylim.split("_")]

    scatter_plot(xs,
                 ys,
                 args.xlabel,
                 args.ylabel,
                 out_fig,
                 show_xy_axes=True,
                 yerr=y_errs,
                 ylimits=ylim,
                 show_regression_line=True,
                 show_diagonal_line=False,
                 show_rmse=True,
                 show_R=True,
                 show_regression_line_eq=True,
                 markersize=4,
                 same_xy_scale=False,
                 text_pos=[0.1, 0.7])

print("DONE")
Exemple #4
0
    for target_ligand in target_ligands:
        ys.append(rbfes_without_cv[ref_ligand][target_ligand])
        y_errs.append(rbfe_errors_without_cv[ref_ligand][target_ligand])

ys = np.array(ys)
y_errs = np.array(y_errs) / 2.

dummy_ligands = ["abc" for _ in ys]
scatter_plot_info(xs, ys, dummy_ligands, "rmse_pearsonR_without_CV.dat")

scatter_plot(xs, ys, args.xlabel, args.ylabel, "without_CV.pdf",
             show_xy_axes=True,
             xerr=x_errs, yerr=y_errs,
             show_regression_line=True,
             show_diagonal_line=False,
             show_rmse=True,
             show_R=True,
             show_regression_line_eq=True,
             markersize=4,
             same_xy_scale=False,
             text_pos=[0.1, 0.7])


# with CV
ys = []
y_errs = []
for ref_ligand in ref_ligands:
    for target_ligand in target_ligands:
        ys.append(rbfes_with_cv[ref_ligand][target_ligand])
        y_errs.append(rbfe_errors_with_cv[ref_ligand][target_ligand])