diff --git a/docs/expression-level-effects.ipynb b/docs/expression-level-effects.ipynb index 9d16f91..7f47fbe 100644 --- a/docs/expression-level-effects.ipynb +++ b/docs/expression-level-effects.ipynb @@ -19,7 +19,7 @@ "\n", "using RetroSignalModel\n", "using RetroSignalModel: t\n", - "import RetroSignalModel as rs" + "import RetroSignalModel as rs\n" ] }, { @@ -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" ] }, { @@ -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" ] }, { @@ -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" ] }, { @@ -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" ] }, { @@ -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" ] }, { @@ -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" ] }, { @@ -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" ] }, { @@ -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" ] }, { @@ -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" ] }, { @@ -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" ] }, { @@ -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" ] }, { @@ -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, diff --git a/docs/expression-level.ipynb b/docs/expression-level.ipynb index 4f7cb0f..689ddf4 100644 --- a/docs/expression-level.ipynb +++ b/docs/expression-level.ipynb @@ -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", @@ -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 }, diff --git a/docs/index.ipynb b/docs/index.ipynb index 1b76032..6faed36 100644 --- a/docs/index.ipynb +++ b/docs/index.ipynb @@ -103,7 +103,7 @@ "metadata": {}, "outputs": [], "source": [ - "versioninfo()" + "versioninfo()\n" ] }, { @@ -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 }, diff --git a/docs/model-desc.ipynb b/docs/model-desc.ipynb index 14cdd90..e754159 100644 --- a/docs/model-desc.ipynb +++ b/docs/model-desc.ipynb @@ -20,7 +20,7 @@ "using RetroSignalModel\n", "using ModelingToolkit\n", "\n", - "@named sys = RtgMTK(; simplify=false)" + "@named sys = RtgMTK(; simplify=false)\n" ] }, { @@ -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" ] }, { @@ -58,7 +58,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "id": "c24c85fc", "metadata": {}, "outputs": [], @@ -66,18 +66,18 @@ "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", @@ -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", @@ -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, diff --git a/docs/steadystates.ipynb b/docs/steadystates.ipynb index 338f20c..16be580 100755 --- a/docs/steadystates.ipynb +++ b/docs/steadystates.ipynb @@ -16,7 +16,7 @@ "outputs": [], "source": [ "using RetroSignalModel\n", - "using ModelingToolkit" + "using ModelingToolkit\n" ] }, { @@ -25,7 +25,7 @@ "metadata": {}, "outputs": [], "source": [ - "paramsets = load_parameters(\"solution_rtgM4.csv\");" + "paramsets = load_parameters(\"solution_rtgM4.csv\");\n" ] }, { @@ -36,7 +36,7 @@ "source": [ "srange = 0.0:0.05:1.0\n", "nsols = 100\n", - "paramidx = 1" + "paramidx = 1\n" ] }, { @@ -49,7 +49,7 @@ " find_steady_states(;S = t -> s, params=paramsets[paramidx], trajectories=nsols)\n", "end\n", "\n", - "length.(sols)" + "length.(sols)\n" ] }, { @@ -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, diff --git a/docs/validation.ipynb b/docs/validation.ipynb index d7bcc2a..d875d12 100644 --- a/docs/validation.ipynb +++ b/docs/validation.ipynb @@ -19,7 +19,7 @@ "using DifferentialEquations\n", "using LaTeXStrings\n", "using RetroSignalModel\n", - "import RetroSignalModel as rs" + "import RetroSignalModel as rs\n" ] }, { @@ -34,7 +34,7 @@ "ks = load_parameters(\"solution_rtgM4.csv\")[1]\n", "prob = SteadyStateProblem(sys, u0, ks)\n", "# Warm up\n", - "sol = solve(prob, DynamicSS(Rodas5()));" + "sol = solve(prob, DynamicSS(Rodas5()));\n" ] }, { @@ -43,7 +43,7 @@ "metadata": {}, "outputs": [], "source": [ - "psmap = Dict(k => i for (i, k) in enumerate(parameters(sys)))" + "psmap = Dict(k => i for (i, k) in enumerate(parameters(sys)))\n" ] }, { @@ -68,7 +68,7 @@ " p[idxmulS] = s\n", " sol = solve(remake(prob, p=p), DynamicSS(Rodas5()))\n", " rs.rtg3_nucleus(sol) / rs.rtg3_cytosol(sol)\n", - "end" + "end\n" ] }, { @@ -93,7 +93,7 @@ " plot!(0.0:0.02:1.0, r3nc_Δb, label = string(\"Bmh \", L\"10^{-%$i}\", \" X\"))\n", "end\n", "\n", - "plot!(legend=:right, title=\"Bmh Knockdown\", xlabel=\"Damage Signal\", ylabel=\"Ratio of nucleus to cytosol RTG3\", xlims=(0.0, 1.0), ylims=(0.0, 5.0))" + "plot!(legend=:right, title=\"Bmh Knockdown\", xlabel=\"Damage Signal\", ylabel=\"Ratio of nucleus to cytosol RTG3\", xlims=(0.0, 1.0), ylims=(0.0, 5.0))\n" ] }, { @@ -125,7 +125,7 @@ " plot!(0.0:0.02:1.0, r3nc_Δb, label = string(\"Mks \", L\"10^{-%$i}\", \" X\"))\n", "end\n", "\n", - "plot!(legend=:right, title=\"Mks Knockdown\", xlabel=\"Damage Signal\", ylabel=\"Ratio of nucleus to cytosol RTG3\", xlims=(0.0, 1.0), ylims=(0.0, 5.0))" + "plot!(legend=:right, title=\"Mks Knockdown\", xlabel=\"Damage Signal\", ylabel=\"Ratio of nucleus to cytosol RTG3\", xlims=(0.0, 1.0), ylims=(0.0, 5.0))\n" ] }, { @@ -152,8 +152,8 @@ " rs.rtg3_nucleus(sol) / rs.rtg3_cytosol(sol)\n", "end\n", "\n", - "pl1 = plot(0.0:0.02:1.0, [r3nc_wt r3nc_ra], label=[\"Wild Type\" \"Rapamycin / Glutamate\"], lw=2, legend=:right, \n", - " xlims=(0.0, 1.0), ylims=(0.0, 5.0), xlabel=\"Damage Signal\", ylabel=\"Ratio of nucleus to cytosol RTG3\")" + "pl1 = plot(0.0:0.02:1.0, [r3nc_wt r3nc_ra], label=[\"Wild Type\" \"Rapamycin / Glutamate\"], lw=2, legend=:right,\n", + " xlims=(0.0, 1.0), ylims=(0.0, 5.0), xlabel=\"Damage Signal\", ylabel=\"Ratio of nucleus to cytosol RTG3\")\n" ] }, { @@ -218,7 +218,7 @@ " p[idxmulS] = s\n", " sol = solve(remake(prob, p=p), DynamicSS(Rodas5()))\n", " return rs.rtg3_nucleus(sol) / rs.rtg3_cytosol(sol)\n", - "end" + "end\n" ] }, { @@ -238,7 +238,7 @@ "f_r3nc_ΔRtg2(s) = get_r3nc(s, prob |> remake_ΔRtg2)\n", "f_r3nc_ΔRtg2_ra(s) = get_r3nc(s, prob |> remake_ΔRtg2 |> remake_rapa)\n", "f_r3nc_ΔRtg3(s) = get_r3nc(s, prob |> remake_ΔRtg3)\n", - "f_r3nc_ΔRtg3_ra(s) = get_r3nc(s, prob |> remake_ΔRtg3 |> remake_rapa)" + "f_r3nc_ΔRtg3_ra(s) = get_r3nc(s, prob |> remake_ΔRtg3 |> remake_rapa)\n" ] }, { @@ -248,48 +248,48 @@ "outputs": [], "source": [ "pl1 = plot(\n", - " [f_r3nc_wt f_r3nc_ra], 0.0, 1.0, \n", - " label=[\"WT\" \"Rapa\"], lw=2, legend=:right, \n", - " xlims=(0.0, 1.0), ylims=(0.0, 5.0), \n", + " [f_r3nc_wt f_r3nc_ra], 0.0, 1.0,\n", + " label=[\"WT\" \"Rapa\"], lw=2, legend=:right,\n", + " xlims=(0.0, 1.0), ylims=(0.0, 5.0),\n", " xlabel=\"Damage\", ylabel=\"nucleus:cytosol RTG3\",\n", " title = \"Without knockout\")\n", "\n", "pl2 = plot(\n", - " [f_r3nc_ΔBmh f_r3nc_ΔBmh_ra], 0.0, 1.0, \n", - " label=[\"WT\" \"Rapa\"], lw=2, legend=:right, \n", - " xlims=(0.0, 1.0), ylims=(0.0, 5.0), \n", + " [f_r3nc_ΔBmh f_r3nc_ΔBmh_ra], 0.0, 1.0,\n", + " label=[\"WT\" \"Rapa\"], lw=2, legend=:right,\n", + " xlims=(0.0, 1.0), ylims=(0.0, 5.0),\n", " xlabel=\"Damage\", ylabel=\"nucleus:cytosol RTG3\",\n", " title = \"Bmh knockout\")\n", "\n", "pl3 = plot(\n", - " [f_r3nc_ΔMks f_r3nc_ΔMks_ra], 0.0, 1.0, \n", - " label=[\"WT\" \"Rapa\"], lw=2, legend=:right, \n", - " xlims=(0.0, 1.0), ylims=(0.0, 5.0), \n", + " [f_r3nc_ΔMks f_r3nc_ΔMks_ra], 0.0, 1.0,\n", + " label=[\"WT\" \"Rapa\"], lw=2, legend=:right,\n", + " xlims=(0.0, 1.0), ylims=(0.0, 5.0),\n", " xlabel=\"Damage\", ylabel=\"nucleus:cytosol RTG3\",\n", " title = \"Mks knockout\")\n", "\n", "pl4 = plot(\n", - " [f_r3nc_ΔRtg1 f_r3nc_ΔRtg1_ra], 0.0, 1.0, \n", - " label=[\"WT\" \"Rapa\"], lw=2, legend=:right, \n", - " # xlims=(0.0, 1.0), ylims=(0.0, 5.0), \n", + " [f_r3nc_ΔRtg1 f_r3nc_ΔRtg1_ra], 0.0, 1.0,\n", + " label=[\"WT\" \"Rapa\"], lw=2, legend=:right,\n", + " # xlims=(0.0, 1.0), ylims=(0.0, 5.0),\n", " xlabel=\"Damage\", ylabel=\"nucleus:cytosol RTG3\",\n", " title = \"Rtg1 knockout\")\n", "\n", "pl5 = plot(\n", - " [f_r3nc_ΔRtg2 f_r3nc_ΔRtg2_ra], 0.0, 1.0, \n", - " label=[\"WT\" \"Rapa\"], lw=2, legend=:right, \n", - " xlims=(0.0, 1.0), ylims=(0.0, 1.0), \n", + " [f_r3nc_ΔRtg2 f_r3nc_ΔRtg2_ra], 0.0, 1.0,\n", + " label=[\"WT\" \"Rapa\"], lw=2, legend=:right,\n", + " xlims=(0.0, 1.0), ylims=(0.0, 1.0),\n", " xlabel=\"Damage\", ylabel=\"nucleus:cytosol RTG3\",\n", " title = \"Rtg2 knockout\")\n", "\n", "pl6 = plot(\n", - " [f_r3nc_ΔRtg3 f_r3nc_ΔRtg3_ra], 0.0, 1.0, \n", - " label=[\"WT\" \"Rapa\"], lw=2, legend=:right, \n", - " # xlims=(0.0, 1.0), ylims=(0.0, 5.0), \n", + " [f_r3nc_ΔRtg3 f_r3nc_ΔRtg3_ra], 0.0, 1.0,\n", + " label=[\"WT\" \"Rapa\"], lw=2, legend=:right,\n", + " # xlims=(0.0, 1.0), ylims=(0.0, 5.0),\n", " xlabel=\"Damage\", ylabel=\"nucleus:cytosol RTG3\",\n", " title = \"Rtg3 knockout\")\n", "\n", - "plot(pl1, pl2, pl3, pl4, pl5, pl6, layout = (3, 2), size=(600, 800), left_margin = 5mm)" + "plot(pl1, pl2, pl3, pl4, pl5, pl6, layout = (3, 2), size=(600, 800), left_margin = 5mm)\n" ] }, { @@ -307,7 +307,7 @@ "source": [ "colors = [:black :red :orange :purple :green :blue]\n", "labels = [\"WT\" \"ΔBmh\" \"ΔMks\" \"ΔRtg1\" \"ΔRtg2\" \"ΔRtg3\"]\n", - "labels_rapa = labels .* \" (Rapa)\"" + "labels_rapa = labels .* \" (Rapa)\"\n" ] }, { @@ -322,21 +322,21 @@ "\n", "plot!([f_r3nc_ra f_r3nc_ΔBmh_ra f_r3nc_ΔMks_ra f_r3nc_ΔRtg1_ra f_r3nc_ΔRtg2_ra f_r3nc_ΔRtg3_ra], 0.0, 1.0,\n", "label = labels_rapa, linestyle=:dash, linecolor = colors,\n", - "xlabel=\"Damage\", ylabel=\"Nucleus:cytosol RTG3\", size=(600, 600))" + "xlabel=\"Damage\", ylabel=\"Nucleus:cytosol RTG3\", size=(600, 600))\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 },