-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Additional example for RTF, dose-dependency
- Loading branch information
ckreutz
committed
Dec 6, 2023
1 parent
95499dd
commit 0f83333
Showing
4 changed files
with
215 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
...mples/ToyModels/TransientFunction/Example4_FitDoseDependentFunctionToData/Data/LDH_WT.def
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
DESCRIPTION | ||
|
||
PREDICTOR | ||
time T min time 0 10 | ||
|
||
INPUTS | ||
|
||
OBSERVABLES | ||
|
||
ERRORS | ||
|
||
CONDITIONS | ||
isKO "0" | ||
|
||
RANDOM | ||
|
Binary file added
BIN
+18.7 KB
...ples/ToyModels/TransientFunction/Example4_FitDoseDependentFunctionToData/Data/LDH_WT.xlsx
Binary file not shown.
45 changes: 45 additions & 0 deletions
45
...ransientFunction/Example4_FitDoseDependentFunctionToData/Models/TransientDoseFunction.def
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
DESCRIPTION | ||
|
||
PREDICTOR | ||
t T h time 0 10 | ||
|
||
COMPARTMENTS | ||
|
||
STATES | ||
|
||
INPUTS | ||
Signal_sus C au conc "signum_TF * amp_sus*(1-exp(-(log10(10^(10*t/maxt)+10^(toffset_TF_sus))-log10(1+10^(toffset_TF_sus)))/timescale_sus))" | ||
|
||
REACTIONS | ||
|
||
DERIVED | ||
|
||
|
||
OBSERVABLES | ||
Response C au conc 0 0 "offset_TF + Signal_sus" | ||
|
||
ERRORS | ||
// the following error model assumes the same error for each expriment: | ||
Response "sd_TF" | ||
|
||
|
||
SUBSTITUTIONS | ||
|
||
|
||
CONDITIONS | ||
timescale_sus "timescale_sus*timeUnitFactor/maxt" | ||
toffset_TF_sus "toffset_TF_sus*timeUnitFactor/maxt" | ||
signum_TF "1" | ||
timeUnitFactor "100" | ||
maxt "10" | ||
amp_sus "(Max_amp_sus*dose^(hill_amp_sus))/(KD_amp_sus^(hill_amp_sus)+dose^(hill_amp_sus))*(1-isKO) + isKO*fold_as*(Max_amp_sus*dose^(hill_amp_sus))/(KD_amp_sus^(hill_amp_sus)+dose^(hill_amp_sus))" | ||
timescale_sus "(Max_timescale_sus*KD_timescale_sus^(hill_timescale_sus))/(KD_timescale_sus^(hill_timescale_sus)+dose^(hill_timescale_sus))*(1-isKO) + isKO*fold_ts*(Max_timescale_sus*KD_timescale_sus^(hill_timescale_sus))/(KD_timescale_sus^(hill_timescale_sus)+dose^(hill_timescale_sus))" | ||
toffset_TF_sus "(Max_toffset_TF_sus*KD_toffset_TF_sus^(hill_toffset_TF_sus))/(KD_toffset_TF_sus^(hill_toffset_TF_sus)+dose^(hill_toffset_TF_sus))*(1-isKO) + isKO*fold_to*(Max_toffset_TF_sus*KD_toffset_TF_sus^(hill_toffset_TF_sus))/(KD_toffset_TF_sus^(hill_toffset_TF_sus)+dose^(hill_toffset_TF_sus))" | ||
|
||
|
||
PARAMETERS | ||
//name value qFit dolog lb ub | ||
//offset 0 1 0 -100 100 | ||
//signum 1 0 0 -1 1 | ||
|
||
|
154 changes: 154 additions & 0 deletions
154
...ork3/Examples/ToyModels/TransientFunction/Example4_FitDoseDependentFunctionToData/Setup.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
% addpath('../TransientFunction_library/') % functions for fitting the transient model (e.g. fitting both signums) | ||
|
||
nLHS = 500; | ||
|
||
%% LDH | ||
arInit | ||
arLoadModel('TransientDoseFunction') | ||
% arLoadData('LDH',1) | ||
arLoadData('LDH_WT',1) | ||
arLoadData('LDH_KO',1) | ||
arCompileAll(true) | ||
|
||
% Initialize_FitTransient % setting bounds, identification of parameter-types from name | ||
|
||
% arLoadPars(1) | ||
|
||
arSetPars('KD_toffset_TF_sus',log10(2), 1,1,-5,3); | ||
arSetPars('Max_toffset_TF_sus',10, 1,0,-1,100); % unlog | ||
arSetPars('hill_toffset_TF_sus',1, 1,0,1,5); | ||
arSetPars('hill_timescale_sus',1, 1,0,1,5); | ||
arSetPars('hill_amp_sus',1, 1,0,1,5); | ||
|
||
arFitLHS(nLHS) % multi-start fitting | ||
% arFitTransient % single fit | ||
arQplot('y') | ||
arPlot | ||
arPrint | ||
|
||
%% | ||
arSave('LDH') | ||
|
||
arPLEInit | ||
ple | ||
pleExtend | ||
pleSmooth | ||
arSave('current') | ||
|
||
%% | ||
% arLoad('20220815T133125_PLEs_Gut') | ||
PlotHillCurves(2) | ||
print -dpng HillCurves_LDH | ||
|
||
PlotHillCurves(3) | ||
print -dpng HillCurves2_LDH | ||
|
||
PlotHillCurves_3D | ||
PrintAllToPng(1:2,'HillCurves_LDH_3D') | ||
|
||
% PLE | ||
PlotProfile('fold_as','max. amplitude ratio KO/WT') | ||
title('LDH') | ||
print -dpng Profile_fold_Amax_LDH | ||
|
||
PlotProfile('fold_ts','velocity ratio KO/WT') | ||
title('LDH') | ||
print -dpng Profile_fold_timescale_LDH | ||
|
||
PlotProfile('fold_to','delay ratio KO/WT') | ||
title('LDH') | ||
print -dpng Profile_fold_toffset_LDH | ||
|
||
PlotFits | ||
suptitle('LDH') | ||
print -dpng PlotFits_LDH | ||
|
||
|
||
Plot3D | ||
print -dpng 3D_LDH | ||
% arSave('LDH_foldAufHill_LHS500_gut') | ||
|
||
%% IL1b | ||
arInit | ||
arLoadModel('TransientDoseFunction') | ||
% arLoadData('LDH',1) | ||
arLoadData('IL1b_WT',1) | ||
arLoadData('IL1b_KO',1) | ||
arCompileAll(true) | ||
|
||
% Initialize_FitTransient % setting bounds, identification of parameter-types from name | ||
|
||
% arLoadPars(1) | ||
|
||
arSetPars('KD_toffset_TF_sus',log10(2), 1,1,-5,3); | ||
arSetPars('Max_toffset_TF_sus',10, 1,0,-1,100); % unlog | ||
arSetPars('hill_toffset_TF_sus',1, 1,0,1,5); | ||
arSetPars('hill_timescale_sus',1, 1,0,1,5); | ||
arSetPars('hill_amp_sus',1, 1,0,1,5); | ||
|
||
arFitLHS(nLHS) % multi-start fitting | ||
% arFitTransient % single fit | ||
arQplot('y') | ||
arPlot | ||
arPrint | ||
|
||
%% | ||
arSave('IL1b') | ||
|
||
arPLEInit | ||
ple | ||
pleExtend | ||
arSave('current') | ||
|
||
|
||
%% without t_offset | ||
% indFix = [arPrint('fold_to'),arPrint('_toffset_')] | ||
% ar.qFit(indFix) = 0; | ||
|
||
arFit | ||
arSave('IL1b_toffsetFixed') | ||
|
||
arPLEInit | ||
ple | ||
pleExtend | ||
pleSmooth | ||
arSave('current') | ||
|
||
%% Fits IL1b | ||
% arLoad('20220815T150340_IL1b_toffsetFixed') | ||
|
||
PlotFits | ||
suptitle('IL1b') | ||
print -dpng PlotFits_IL1b | ||
|
||
PlotProfile('fold_as','max. amplitude ratio KO/WT') | ||
title('IL1b') | ||
print -dpng Profile_fold_Amax_IL1b | ||
|
||
PlotProfile('fold_ts','velocity ratio KO/WT') | ||
title('IL1b') | ||
print -dpng Profile_fold_timescale_IL1b | ||
|
||
PlotProfile('fold_to','delay ratio KO/WT') | ||
title('IL1b') | ||
print -dpng Profile_fold_toffset_IL1b | ||
|
||
|
||
PlotHillCurves(2) | ||
print -dpng HillCurves_IL1b | ||
|
||
PlotHillCurves(3) | ||
print -dpng HillCurves2_IL1b | ||
|
||
PlotHillCurves_3D | ||
PrintAllToPng(1:2,'HillCurves_IL1b_3D') | ||
|
||
PlotHillCurves_3D('1./((Max_timescale_sus*KD_timescale_sus^(hill_timescale_sus))./(KD_timescale_sus^(hill_timescale_sus)+dosesFine.^(hill_timescale_sus))*(1-isKO) + isKO*fold_ts*(Max_timescale_sus*KD_timescale_sus^(hill_timescale_sus))./(KD_timescale_sus^(hill_timescale_sus)+dosesFine.^(hill_timescale_sus)));',... | ||
'Velocity'); | ||
PlotHillCurves_3D('((Max_toffset_TF_sus*KD_toffset_TF_sus^(hill_toffset_TF_sus))./(KD_toffset_TF_sus^(hill_toffset_TF_sus)+dosesFine.^(hill_toffset_TF_sus))*(1-isKO) + isKO*fold_to*(Max_toffset_TF_sus*KD_toffset_TF_sus^(hill_toffset_TF_sus))./(KD_toffset_TF_sus^(hill_toffset_TF_sus)+dosesFine.^(hill_toffset_TF_sus)));',... | ||
'Max. Delay'); | ||
|
||
Plot3D | ||
print -dpng 3D_IL1b | ||
|
||
% arSave('IL1b_foldAufHill_LHS500_gut') |