djwooten/synergy

Latest Update MuSyC

DJuarez10 opened this issue · 3 comments

May be an issue on my end as I am on a new PC, but after installing the latest update, MuSyC surface plots that I've previously generated in version 4.7 are not being generated correctly. I've attached an image to depict what I mean. Albeit, it looks pretty. Any idea what could be going on here?

A potentially relevant detail is that I'm using plotly 5.1.0.

image

EDIT: Uninstalling synergy-0.5.0 and installing synergy-0.4.7 fixed the issue.
image

from synergy.combination import MuSyC
import pandas as pd
import csv

df = pd.read_csv("data.csv")
df.columns = ['Experiment Name', 'Cell_Line', 'drug2', 'drug2.conc','drug1', 'drug1.conc','effect']
df['effect'] = df['effect'].div(100)

d1 = df['drug1.conc']
d2 = df['drug2.conc']
E = df['effect']

model = MuSyC(E0_bounds=(0,1), E1_bounds=(0,1), E2_bounds=(0,1), E3_bounds=(0,1))
model.fit(d1, d2, E, bootstrap_iterations=100)

model.plot_surface_plotly(d1, d2, scatter_points=df, zlim=(0,1), vmin=0, vmax=1, fontsize=12,
                           xlabel="Drug1, log(nM)",ylabel="Drug2, log(nM)",zlabel="Viability",
                           cmap="inferno_r",  title="DoubleCombo", fname="DoubleCombo.html")

Uhoh, that doesn't look right. It's probably on my end - I'll take a look this morning. The latest update changed what happens in plot_surface_plotly() when d1 and d2 have replicates. Thanks for letting me know - I'll take a look this morning and push a fix asap.

It turns out it the new replicate handling code within plots.plot_surface_plotly() was clashing with some old replicate handling code inside model.plot_surface_plotly(). I was able to get the correct plots once I removed the old code, and have pushed it to version 0.5.1. If you get a chance, please let me know if it works for you using 0.5.1. now. Thanks!

You're a wizard, David! Works like a charm. On the subject of replicates, is heteroskedastic re-sampling for datasets with >= 3 replicates per dose still a planned feature and do you have an idea of when you may roll it out?

Thanks!