Simplify into a page template thanks to aleksrutins/cheetah#1

This commit is contained in:
Aleks Rutins 2024-06-04 21:26:12 +00:00
parent 27390b6e77
commit e063e315ed
9 changed files with 28 additions and 42 deletions

17
flake.lock generated
View file

@ -8,17 +8,16 @@
"utils": "utils"
},
"locked": {
"lastModified": 1714783491,
"narHash": "sha256-4pUXleYQZpKJep7wwNJo6QuXV8/pk28JC4VzN1uoNh0=",
"owner": "aleksrutins",
"repo": "cheetah",
"rev": "3b0db8cf3b3e86dfb0f3503c54f655c831fdc359",
"type": "github"
"lastModified": 1717535613,
"narHash": "sha256-nyppnrB7J1RaeqCaH6O22QsC/c+N0LTNXw3XgsPzxFg=",
"rev": "1b42da203e960f6cad517ad80e0e2dcf5625e884",
"revCount": 67,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/aleksrutins/cheetah/0.2.3/018fe51b-41d1-7c39-af34-e6ff00a655b2/source.tar.gz"
},
"original": {
"owner": "aleksrutins",
"repo": "cheetah",
"type": "github"
"type": "tarball",
"url": "https://flakehub.com/f/aleksrutins/cheetah/0.2.3.tar.gz"
}
},
"flake-utils": {

View file

@ -1,6 +1,6 @@
{
inputs = {
cheetah.url = "github:aleksrutins/cheetah";
cheetah.url = "https://flakehub.com/f/aleksrutins/cheetah/0.2.3.tar.gz";
utils.url = "github:numtide/flake-utils";
};

11
layouts/page.html Normal file
View file

@ -0,0 +1,11 @@
<extends template="layouts/base.html" [title]="title"></extends>
<p></p>
<p>
<nav-links [back]="back" [next]="next"></nav-links>
</p>
<slot></slot>
<p>
<nav-links [back]="back" [next]="next"></nav-links>
</p>

View file

@ -1,6 +1,4 @@
<extends template="layouts/base.html" title="Choosing Between Activators & Repressors"></extends>
<nav-links back="/hill-functions.html"></nav-links>
<extends template="layouts/page.html" back="/hill-functions.html" title="Choosing Between Activators & Repressors"></extends>
# Choosing Between Activators & Repressors
@ -34,5 +32,3 @@ You've reached the end, for now. I hope to expand this site in the future. If yo
[^3] Gerland, U., & Hwa, T. (2009). Evolutionary selection between alternative modes of gene regulation. Proceedings of the National Academy of Sciences, 106(22), 88418846. <https://doi.org/10.1073/pnas.0808500106>
</section>
<nav-links back="/hill-functions.html"></nav-links>

View file

@ -1,6 +1,4 @@
<extends template="layouts/base.html" title="Activators"></extends>
<nav-links back="/repressors.html" next="/hill-functions.html"></nav-links>
<extends template="layouts/page.html" back="/repressors.html" next="/hill-functions.html" title="Activators"></extends>
# Activators
@ -31,8 +29,6 @@ As you can see, an activator has exactly the opposite effect as a repressor.
That was a short section. Onward!
<nav-links back="/repressors.html" next="/hill-functions.html"></nav-links>
<script>
plot('#binding-curve', (kd, beta0) => [`${beta0}/(1 + x/(${kd}))`, `${beta0} * ((x/${kd})/(1 + (x/${kd})))`], ['#kd', '#beta0'], [[0, 10], [0, 10]])

View file

@ -1,6 +1,4 @@
<extends template="layouts/base.html" title="Concepts of Biocircuits"></extends>
<nav-links next="/simplest-circuit.html"></nav-links>
<extends template="layouts/page.html" next="/simplest-circuit.html" title="Concepts of Biocircuits"></extends>
# Concepts of Biocircuits
@ -26,5 +24,3 @@ Again, though, even though we know a lot about biocircuit design, there are stil
In theory, natural and synthetic circuits _should_ share a common set of design principles. These principles are generally expressed as a statement: _Circuit feature X enables function Y_. We know a few already, but new ones are still being discovered.
That's the introduction. Onward - let's design a circuit!
<nav-links next="/simplest-circuit.html"></nav-links>

View file

@ -1,6 +1,4 @@
<extends template="layouts/base.html" title="Ultrasensitivity & the Hill Function"></extends>
<nav-links back="/activators.html" next="/activators-vs-repressors.html"></nav-links>
<extends template="layouts/page.html" back="/activators.html" next="/activators-vs-repressors.html" title="Ultrasensitivity & the Hill Function"></extends>
# Ultrasensitivity & the Hill Function
@ -54,8 +52,6 @@ To find production rates with the Hill function, just multiply by $\beta_0$:
Onwards!
<nav-links back="/activators.html" next="/activators-vs-repressors.html"></nav-links>
<script>
plot('#hill-graph', (k, n) => [`((x/${k})^(${n}))/(1 + ((x/${k})^(${n})))`, `1/(1 + ((x/${k})^(${n})))`], ['#k', '#n'], [[0, 10], [0, 1]])
plot('#hill-graph-prod', (k, n, b0) => [`(${b0}) * ((x/${k})^(${n}))/(1 + ((x/${k})^(${n})))`, `(${b0})/(1 + ((x/${k})^(${n})))`], ['#k-prod', '#n-prod', '#b0'], [[0, 10], [0, 10]])

View file

@ -1,6 +1,4 @@
<extends template="layouts/base.html" title="Repressors & Leaks"></extends>
<nav-links back="/simplest-circuit.html" next="/activators.html"></nav-links>
<extends template="layouts/page.html" back="/simplest-circuit.html" next="/activators.html" title="Repressors & Leaks"></extends>
# Repressors & Leaks
@ -82,8 +80,6 @@ Because leaks are so common, it's important to make sure that important parts of
Onwards!
<nav-links back="/simplest-circuit.html" next="/activators.html"></nav-links>
<script>
plot('#binding-curve', (kd, beta0) => [`${beta0}/(1 + x/(${kd}))`, `-(${beta0})x/(${kd}) + ${beta0}`], ['#kd', '#beta0'], [[0, 10], [0, 10]])

View file

@ -1,6 +1,4 @@
<extends template="layouts/base.html" title="The Simplest Circuit"></extends>
<nav-links back="/concepts.html" next="/repressors.html"></nav-links>
<extends template="layouts/page.html" back="/concepts.html" next="/repressors.html" title="The Simplest Circuit"></extends>
# The Simplest Circuit
@ -96,8 +94,6 @@ Here's a graph to play with:
It's still a line. Onwards!
<nav-links back="/concepts.html" next="/repressors.html"></nav-links>
<script>
plot('#concentration-graph', (beta, gamma) => [`(${beta}x)/${gamma}`], ['#beta', '#gamma'])
plot('#concentration-graph-2step', (betap, gammap, betam, gammam) => [`((${betap})(${betam})x)/((${gammap})(${gammam}))`], ['#betap', '#gammap', '#betam', '#gammam'])