djwooten / synergy

Python library for calculting synergy of drug combinations using several drug synergy frameworks
GNU General Public License v3.0
27 stars 5 forks source link

Higher MuSyc Fits Params are Concentration Scale Dependent? #10

Open DJuarez10 opened 3 years ago

DJuarez10 commented 3 years ago
#Generate Data
import numpy as np
from synergy.utils import dose_tools
from synergy.higher import MuSyC

E_params = [2,1,1,1,1,0,0,0]
h_params = [2,1,0.8]
C_params = [0.1,0.01,0.1]
alpha_params = [2,3,1,1,0.7,0.5,2,1,1]
gamma_params = [0.4,2,1,2,0.7,3,2,0.5,2]

params = E_params + h_params + C_params + alpha_params + gamma_params

truemodel = MuSyC(E_bounds=(0,2), h_bounds=(1e-3,1e3), alpha_bounds=(1e-5, 1e5), gamma_bounds=(1e-5,1e5))
truemodel.parameters = params

d = dose_tools.grid_multi((1e-3,1e-3,1e-3),(1,1,1),(6,6,6), include_zero=True)
E = truemodel.E(d)

#Multiply Concentrations by 1000
dx = d*1000

#Fit MuSyC
model = MuSyC(E_bounds=(0,2), h_bounds=(1e-3,1e3), alpha_bounds=(1e-5, 1e5), gamma_bounds=(1e-5,1e5))
model.fit(d, E, bootstrap_iterations=20)
print(model.summary(confidence_interval=95))

Outputs the following:

beta_1,3    1.00    (1.00,1.00) (>0) synergistic
beta_2,3    1.00    (1.00,1.00) (>0) synergistic
alpha_1_3   2.01    (1.99,2.03) (>1) synergistic
alpha_1_2   3.03    (2.97,3.07) (>1) synergistic
alpha_1,2_3 0.71    (0.70,0.71) (<1) antagonistic
alpha_3_1   2.00    (1.98,2.01) (>1) synergistic
alpha_2,3_1 0.90    (0.87,0.92) (<1) antagonistic
gamma_1_3   0.40    (0.40,0.40) (<1) antagonistic
gamma_1_2   2.00    (1.99,2.01) (>1) synergistic
gamma_2_1   1.99    (1.99,2.00) (>1) synergistic
gamma_1,2_3 0.70    (0.70,0.70) (<1) antagonistic
gamma_3_1   1.99    (1.98,2.00) (>1) synergistic
gamma_1,3_2 0.50    (0.50,0.50) (<1) antagonistic
gamma_2,3_1 2.03    (1.98,2.11) (>1) synergistic
#1000x Concentrations Fit
modelx.fit(dx, E, bootstrap_iterations=20)
print(modelx.summary(confidence_interval=95))

Outputs the following:

beta_1,3    0.64    (0.58,0.69) (>0) synergistic
beta_2,3    0.89    (0.81,0.94) (>0) synergistic
alpha_1_3   19.01   (14.68,22.76)   (>1) synergistic
alpha_1_2   5.89    (4.15,10.70)    (>1) synergistic
alpha_2_3   1.20    (1.08,1.39) (>1) synergistic
alpha_2_1   0.00    (0.00,0.03) (<1) antagonistic
alpha_1,2_3 0.55    (0.36,0.79) (<1) antagonistic
alpha_3_1   0.83    (0.71,0.91) (<1) antagonistic
alpha_1,3_2 99999.95    (17.27,100000.00)   (>1) synergistic
gamma_1_3   0.72    (0.67,0.79) (<1) antagonistic
gamma_1_2   0.80    (0.69,0.90) (<1) antagonistic
gamma_2_3   1.11    (1.06,1.21) (>1) synergistic
gamma_2_1   0.27    (0.16,0.39) (<1) antagonistic
gamma_3_1   1.41    (1.18,1.55) (>1) synergistic
gamma_1,3_2 0.11    (0.07,0.35) (<1) antagonistic
gamma_2,3_1 7.79    (5.08,41.90)    (>1) synergistic

Is this similar to the previously addressed issue in two drug MuSyC?