Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
sosiristseng committed Nov 3, 2023
1 parent 8570049 commit be119ab
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 81 deletions.
32 changes: 16 additions & 16 deletions docs/expression-level-effects.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"\n",
"using RetroSignalModel\n",
"using RetroSignalModel: t\n",
"import RetroSignalModel as rs"
"import RetroSignalModel as rs\n"
]
},
{
Expand All @@ -36,7 +36,7 @@
"# Make square wave\n",
"function make_square_wave(; hi=1, lo=0, duty=(0.25, 0.75))\n",
" return t -> ifelse(duty[1] <= t <= duty[2], hi, lo)\n",
"end"
"end\n"
]
},
{
Expand All @@ -53,7 +53,7 @@
"signal(t) = edges[begin] <= t <= edges[end] ? 1.0 : 0.0\n",
"@register_symbolic signal(t)\n",
"\n",
"@named sys = RtgMTK(signal)"
"@named sys = RtgMTK(signal)\n"
]
},
{
Expand Down Expand Up @@ -109,7 +109,7 @@
"metadata": {},
"outputs": [],
"source": [
"plot_varying_protein(sys, params, rs.ΣRtg1, rs.STRESSED[rs.ΣRtg1], rs.ΣRtg1_n)"
"plot_varying_protein(sys, params, rs.ΣRtg1, rs.STRESSED[rs.ΣRtg1], rs.ΣRtg1_n)\n"
]
},
{
Expand All @@ -118,7 +118,7 @@
"metadata": {},
"outputs": [],
"source": [
"plot_varying_protein(sys, params, rs.ΣRtg2, rs.STRESSED[rs.ΣRtg2], rs.ΣRtg1_n)"
"plot_varying_protein(sys, params, rs.ΣRtg2, rs.STRESSED[rs.ΣRtg2], rs.ΣRtg1_n)\n"
]
},
{
Expand All @@ -127,7 +127,7 @@
"metadata": {},
"outputs": [],
"source": [
"plot_varying_protein(sys, params, rs.ΣRtg3, rs.STRESSED[rs.ΣRtg3], rs.ΣRtg1_n)"
"plot_varying_protein(sys, params, rs.ΣRtg3, rs.STRESSED[rs.ΣRtg3], rs.ΣRtg1_n)\n"
]
},
{
Expand All @@ -136,7 +136,7 @@
"metadata": {},
"outputs": [],
"source": [
"plot_varying_protein(sys, params, rs.ΣBmh, rs.STRESSED[rs.ΣBmh], rs.ΣRtg1_n)"
"plot_varying_protein(sys, params, rs.ΣBmh, rs.STRESSED[rs.ΣBmh], rs.ΣRtg1_n)\n"
]
},
{
Expand All @@ -145,7 +145,7 @@
"metadata": {},
"outputs": [],
"source": [
"plot_varying_protein(sys, params, rs.ΣMks, rs.STRESSED[rs.ΣMks], rs.ΣRtg1_n)"
"plot_varying_protein(sys, params, rs.ΣMks, rs.STRESSED[rs.ΣMks], rs.ΣRtg1_n)\n"
]
},
{
Expand All @@ -154,7 +154,7 @@
"metadata": {},
"outputs": [],
"source": [
"plot_varying_protein(sys, params, rs.ΣRtg1, rs.STRESSED[rs.ΣRtg1], rs.Rtg3_n)"
"plot_varying_protein(sys, params, rs.ΣRtg1, rs.STRESSED[rs.ΣRtg1], rs.Rtg3_n)\n"
]
},
{
Expand All @@ -163,7 +163,7 @@
"metadata": {},
"outputs": [],
"source": [
"plot_varying_protein(sys, params, rs.ΣRtg2, rs.STRESSED[rs.ΣRtg2], rs.Rtg3_n)"
"plot_varying_protein(sys, params, rs.ΣRtg2, rs.STRESSED[rs.ΣRtg2], rs.Rtg3_n)\n"
]
},
{
Expand All @@ -172,7 +172,7 @@
"metadata": {},
"outputs": [],
"source": [
"plot_varying_protein(sys, params, rs.ΣRtg3, rs.STRESSED[rs.ΣRtg3], rs.Rtg3_n)"
"plot_varying_protein(sys, params, rs.ΣRtg3, rs.STRESSED[rs.ΣRtg3], rs.Rtg3_n)\n"
]
},
{
Expand All @@ -181,7 +181,7 @@
"metadata": {},
"outputs": [],
"source": [
"plot_varying_protein(sys, params, rs.ΣBmh, rs.STRESSED[rs.ΣBmh], rs.Rtg3_n)"
"plot_varying_protein(sys, params, rs.ΣBmh, rs.STRESSED[rs.ΣBmh], rs.Rtg3_n)\n"
]
},
{
Expand All @@ -190,21 +190,21 @@
"metadata": {},
"outputs": [],
"source": [
"plot_varying_protein(sys, params, rs.ΣMks, rs.STRESSED[rs.ΣMks], rs.Rtg3_n)"
"plot_varying_protein(sys, params, rs.ΣMks, rs.STRESSED[rs.ΣMks], rs.Rtg3_n)\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Julia 1.8.1",
"display_name": "Julia 1.9.3",
"language": "julia",
"name": "julia-1.8"
"name": "julia-1.9"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.8.1"
"version": "1.9.3"
}
},
"nbformat": 4,
Expand Down
10 changes: 5 additions & 5 deletions docs/expression-level.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"# Expression level\n",
"\n",
"explvls = (\n",
" Rtg1p=2190, \n",
" Rtg1p=2190,\n",
" Rtg2p=3260,\n",
" Rtg3p=1050,\n",
" Bmh1p=158000,\n",
Expand All @@ -63,21 +63,21 @@
"bar(collect(explvls), color=:grey, framestyle=:box,\n",
" yscale=:log10, ylabel=\"Number of Molecules / Cell\", minorgrid=true,\n",
" xticks=(1:5, string.(keys(explvls))), xlabel=\"RTG-related proteins\",\n",
" legend=false)"
" legend=false)\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Julia 1.8.1",
"display_name": "Julia 1.9.3",
"language": "julia",
"name": "julia-1.8"
"name": "julia-1.9"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.8.1"
"version": "1.9.3"
},
"orig_nbformat": 4
},
Expand Down
10 changes: 5 additions & 5 deletions docs/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"metadata": {},
"outputs": [],
"source": [
"versioninfo()"
"versioninfo()\n"
]
},
{
Expand All @@ -113,21 +113,21 @@
"outputs": [],
"source": [
"using Pkg\n",
"Pkg.status()"
"Pkg.status()\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Julia 1.8.1",
"display_name": "Julia 1.9.3",
"language": "julia",
"name": "julia-1.8"
"name": "julia-1.9"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.8.1"
"version": "1.9.3"
},
"orig_nbformat": 4
},
Expand Down
26 changes: 13 additions & 13 deletions docs/model-desc.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"using RetroSignalModel\n",
"using ModelingToolkit\n",
"\n",
"@named sys = RtgMTK(; simplify=false)"
"@named sys = RtgMTK(; simplify=false)\n"
]
},
{
Expand All @@ -45,7 +45,7 @@
"using RetroSignalModel\n",
"using Optim\n",
"\n",
"optim_params(targetratio=2, optimoptions=Optim.Options(iterations=100, show_trace=true, show_every=10))"
"optim_params(targetratio=3, optimoptions=Optim.Options(iterations=100, show_trace=true, show_every=10))\n"
]
},
{
Expand All @@ -58,26 +58,26 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"id": "c24c85fc",
"metadata": {},
"outputs": [],
"source": [
"using RetroSignalModel\n",
"using CSV\n",
"using DataFrames\n",
"using Plots"
"using Plots\n"
]
},
{
"cell_type": "code",
"execution_count": 44,
"execution_count": null,
"id": "b95007f6",
"metadata": {},
"outputs": [],
"source": [
"filename = joinpath(dirname(pathof(RetroSignalModel)), \"data\", \"solution_rtgMTK_optim.csv\")\n",
"dfoptim = let \n",
"dfoptim = let\n",
" df = CSV.read(filename, DataFrame)\n",
" df[!, Not(:n_S)] .= log10.(df[!, Not(:n_S)])\n",
"end\n",
Expand All @@ -87,18 +87,18 @@
"end\n",
"\n",
"plot(res..., layout=(6, 4), size=(1024, 1024))\n",
"# savefig(\"optimparams.png\")"
"# savefig(\"optimparams.png\")\n"
]
},
{
"cell_type": "code",
"execution_count": 45,
"execution_count": null,
"id": "4e478291",
"metadata": {},
"outputs": [],
"source": [
"filename = joinpath(dirname(pathof(RetroSignalModel)), \"data\", \"solution_rtgM4.csv\")\n",
"dforig = let \n",
"dforig = let\n",
" df = CSV.read(filename, DataFrame)\n",
" df[!, Not(:n_S)] .= log10.(df[!, Not(:n_S)])\n",
"end\n",
Expand All @@ -108,21 +108,21 @@
"end\n",
"\n",
"plot(res..., layout=(6, 4), size=(1024, 1024))\n",
"# savefig(\"randomparams.png\")"
"# savefig(\"randomparams.png\")\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Julia 1.8.1",
"display_name": "Julia 1.9.3",
"language": "julia",
"name": "julia-1.8"
"name": "julia-1.9"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.8.1"
"version": "1.9.3"
}
},
"nbformat": 4,
Expand Down
16 changes: 8 additions & 8 deletions docs/steadystates.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"outputs": [],
"source": [
"using RetroSignalModel\n",
"using ModelingToolkit"
"using ModelingToolkit\n"
]
},
{
Expand All @@ -25,7 +25,7 @@
"metadata": {},
"outputs": [],
"source": [
"paramsets = load_parameters(\"solution_rtgM4.csv\");"
"paramsets = load_parameters(\"solution_rtgM4.csv\");\n"
]
},
{
Expand All @@ -36,7 +36,7 @@
"source": [
"srange = 0.0:0.05:1.0\n",
"nsols = 100\n",
"paramidx = 1"
"paramidx = 1\n"
]
},
{
Expand All @@ -49,7 +49,7 @@
" find_steady_states(;S = t -> s, params=paramsets[paramidx], trajectories=nsols)\n",
"end\n",
"\n",
"length.(sols)"
"length.(sols)\n"
]
},
{
Expand Down Expand Up @@ -83,21 +83,21 @@
" plot(xs, ys, lab=string(sts[i]))\n",
"end\n",
"\n",
"plot(pls..., size=(1280, 1280))"
"plot(pls..., size=(1280, 1280))\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Julia 1.8.1",
"display_name": "Julia 1.9.3",
"language": "julia",
"name": "julia-1.8"
"name": "julia-1.9"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.8.1"
"version": "1.9.3"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit be119ab

Please sign in to comment.