Title: | A Virtual Patient Simulator in the Context of Calcium and Phosphate Homeostasis |
---|---|
Description: | Explore calcium (Ca) and phosphate (Pi) homeostasis with two novel 'Shiny' apps, building upon on a previously published mathematical model written in C, to ensure efficient computations. The underlying model is accessible here <https://pubmed.ncbi.nlm.nih.gov/28747359/)>. The first application explores the fundamentals of Ca-Pi homeostasis, while the second provides interactive case studies for in-depth exploration of the topic, thereby seeking to foster student engagement and an integrative understanding of Ca-Pi regulation. |
Authors: | David Granjon [aut, cre, cph], Diane de Zélicourt [cph], Vartan Kurtcuoglu [cph], Olivier Bonny [cph], François Verrey [cph], University of Lausanne [fnd], University of Zurich [fnd], Kidney NCCR.CH [fnd], The Interface Group [cph] (Hosting Group), RinteRface [cph] (R/HTML Templates) |
Maintainer: | David Granjon <[email protected]> |
License: | GPL-3 |
Version: | 0.2.1 |
Built: | 2024-11-16 05:21:35 UTC |
Source: | https://github.com/divadnojnarg/capo4sim |
Use inside in the networkCaPO4. Nothing is returned except that the network is updated via visNetworkProxy.
arrow_lighting(edges, simulation, counter, session)
arrow_lighting(edges, simulation, counter, session)
edges |
A dataframe of edges provided by generate_edges. |
simulation |
Which disease is currently selected. See extract_running_sim. |
counter |
To determine which notification to display. We expect a counter returned by the networkCaPO4 module. |
session |
Session object. |
Explore calcium (Ca) and phosphate (Pi) homeostasis with two novel 'Shiny' apps, building upon on a previously published mathematical model written in C, to ensure efficient computations. The underlying model is accessible here <https://www.ncbi.nlm.nih.gov/pubmed/28747359>. The first application explores the fundamentals of Ca-Pi homeostasis, while the second provides interactive case studies for in-depth exploration of the topic, thereby seeking to foster student engagement and an integrative understanding of Ca-Pi regulation. These applications are hosted at <https://rinterface.com/AppsPhysiol.html>.
Maintainer: David Granjon [email protected] [copyright holder]
Other contributors:
Diane de Zélicourt [copyright holder]
Vartan Kurtcuoglu [copyright holder]
Olivier Bonny [copyright holder]
François Verrey [copyright holder]
University of Lausanne [funder]
University of Zurich [funder]
Kidney NCCR.CH [funder]
The Interface Group (Hosting Group) [copyright holder]
RinteRface (R/HTML Templates) [copyright holder]
Create a prettyCheckbox.
diseaseCheckBox(inputId, label)
diseaseCheckBox(inputId, label)
inputId |
Checkbox Input id. |
label |
Checkbox label. |
Only returns inputs associated with php1, hypopara, hypoD3
diseaseSelect(input, output, session)
diseaseSelect(input, output, session)
input |
Shiny inputs |
output |
Shiny Outputs |
session |
Session object. |
Contains php1, hypopara, hypoD3
diseaseSelectUi(id)
diseaseSelectUi(id)
id |
module id. |
Simulations are currently php1, hypoD3 and hypopara. Takes diseases as input given by the diseaseSelect module.
extract_running_sim(diseases)
extract_running_sim(diseases)
diseases |
Shiny input disease selector. See diseaseSelect. |
Nothing is contained inside for now...
fullScreen(input, output, session)
fullScreen(input, output, session)
input |
Shiny inputs |
output |
Shiny Outputs |
session |
Session object. |
Trigger a fullScreen mode. Based on https://stackoverflow.com/questions/42371164/how-to-run-r-shiny-app-in-full-sized-window
fullScreenUI(id)
fullScreenUI(id)
id |
module id. |
Generate edges for the CaPO4 network
generate_edges( components, organs, regulations, diseases, organs_edges_size, hormones_edges_size )
generate_edges( components, organs, regulations, diseases, organs_edges_size, hormones_edges_size )
components |
Shiny input CaPO4 component selector. See networkOptions. |
organs |
Shiny input to toggle organs display. See networkOptions. |
regulations |
Shiny input to toggle hormone display. See networkOptions. |
diseases |
Shiny input disease selector. See diseaseSelect. |
organs_edges_size |
Shiny input for organs edges size. See networkOptions. |
hormones_edges_size |
Shiny input for hormones edges size. See networkOptions. |
Create a CaPO4 network taking nodes and edges as inputs
generate_network(nodes, edges, usephysics = FALSE, isMobile)
generate_network(nodes, edges, usephysics = FALSE, isMobile)
nodes |
A dataframe of nodes provided by generate_nodes. |
edges |
A dataframe of edges provided by generate_edges. |
usephysics |
Whether to use physic. FALSE by default. A visNetwork API parameter. |
isMobile |
Shiny input checking if the app is running on a cellphone/tablet. |
Generate nodes for the CaPO4 network
generate_nodes( components, organs, regulations, background, diseases, organs_nodes_size, hormones_nodes_size )
generate_nodes( components, organs, regulations, background, diseases, organs_nodes_size, hormones_nodes_size )
components |
Shiny input CaPO4 component selector. See networkOptions. |
organs |
Shiny input to toggle organs display. See networkOptions. |
regulations |
Shiny input to toggle hormone display. See networkOptions. |
background |
Shiny input background selector. See networkOptions. |
diseases |
Shiny input disease selector. See diseaseSelect. |
organs_nodes_size |
Shiny input for organs node size. See networkOptions. |
hormones_nodes_size |
Shiny input for hormones node size. See networkOptions.. |
Generate sequential notification as a function of the selected diseases. All notifications are in the notifications.R file in the inst/entry_level app folder. Used in the infos module.
generate_notification(simulation, counter, allowed)
generate_notification(simulation, counter, allowed)
simulation |
Which disease is currently selected. See extract_running_sim. |
counter |
To determine which notification to display. We expect a counter returned by the networkCaPO4 module. |
allowed |
Whether to allow simulations. Expect logical value. See infos module. |
Use inside in the userInfo. Function that helps in generating 4 users fields, image, stat1, stat2 and stat3, so as to reinject them in the header userMenu
generate_userFields(diseases, sliderDisease)
generate_userFields(diseases, sliderDisease)
diseases |
Shiny input disease selector. See diseaseSelect. |
sliderDisease |
Shiny slider input related to the current disease severity. See plotBox. |
Create a CaPO4 glossary
glossaryCaPO4(input, output, session)
glossaryCaPO4(input, output, session)
input |
Shiny inputs |
output |
Shiny Outputs |
session |
Session object. |
Create a CaPO4 glossary
glossaryCaPO4Ui(id)
glossaryCaPO4Ui(id)
id |
module id. |
Create the help section
helpCaPO4(input, output, session)
helpCaPO4(input, output, session)
input |
Shiny inputs |
output |
Shiny Outputs |
session |
Session object. |
Create a help button
helpCaPO4Ui(id)
helpCaPO4Ui(id)
id |
module id. |
Create modals, alerts, ...
infos(input, output, session, diseases, animation_counter, regulations)
infos(input, output, session, diseases, animation_counter, regulations)
input |
Shiny inputs |
output |
Shiny Outputs |
session |
Session object. |
diseases |
Shiny input disease selector. See diseaseSelect. |
animation_counter |
Give the current temporal state of the animation. See networkCaPO4. |
regulations |
Shiny input to toggle hormone display. See networkOptions. |
Create modals, alerts, ...
infosUi(id)
infosUi(id)
id |
module id. |
Create a prettySwitch.
infoSwitch(inputId, label)
infoSwitch(inputId, label)
inputId |
Checkbox Input id. |
label |
Checkbox label. |
Use inside the plotBox module.
make_plot_hypoD3(sliderVal, isMobile)
make_plot_hypoD3(sliderVal, isMobile)
sliderVal |
Shiny slider input related to the current disease severity. See plotBox. |
isMobile |
Shiny input useful to scale elements based on the device screen size. |
Use inside the plotBox module.
make_plot_hypopara(sliderVal, isMobile)
make_plot_hypopara(sliderVal, isMobile)
sliderVal |
Shiny slider input related to the current disease severity. See plotBox. |
isMobile |
Shiny input useful to scale elements based on the device screen size. |
Use inside the plotBox module.
make_plot_php1(sliderVal, isMobile)
make_plot_php1(sliderVal, isMobile)
sliderVal |
Shiny slider input related to the current disease severity. See plotBox. |
isMobile |
Shiny input useful to scale elements based on the device screen size. |
Creates a carousel. Adapted from shinydashboardplus to also allow control of the carousel animation
myCarousel( ..., id, indicators = TRUE, width = 6, .list = NULL, data.interval = 5000, data.ride = "carousel" )
myCarousel( ..., id, indicators = TRUE, width = 6, .list = NULL, data.interval = 5000, data.ride = "carousel" )
... |
Slot for carouselItem |
id |
Carousel id. Must be unique. |
indicators |
Whether to display left and right indicators. |
width |
Carousel width. 6 by default. |
.list |
Should you need to pass carouselItem via lapply or similar, put these item here instead of passing them in ... |
data.interval |
specify data-interval in ms. 5000ms by default, set to "false" to prevent automated animation of the slides. |
data.ride |
specify data-ride. "carousel" by default. |
Create a CaPO4 network
networkCaPO4( input, output, session, isMobile, components, organs, regulations, background, diseases, organs_nodes_size, hormones_nodes_size, organs_edges_size, hormones_edges_size, help )
networkCaPO4( input, output, session, isMobile, components, organs, regulations, background, diseases, organs_nodes_size, hormones_nodes_size, organs_edges_size, hormones_edges_size, help )
input |
Shiny inputs |
output |
Shiny Outputs |
session |
Session object. |
isMobile |
Shiny input checking if the app is running on a cellphone/tablet. |
components |
Shiny input CaPO4 component selector. See networkOptions. |
organs |
Shiny input to toggle organs display. See networkOptions. |
regulations |
Shiny input to toggle hormone display. See networkOptions. |
background |
Shiny input background selector. See networkOptions. |
diseases |
Shiny input disease selector. See diseaseSelect. |
organs_nodes_size |
Shiny input for organs node size. See networkOptions. |
hormones_nodes_size |
Shiny input for hormones node size. See networkOptions. |
organs_edges_size |
Shiny input for organs edges size. See networkOptions. |
hormones_edges_size |
Shiny input for hormones edges size. See networkOptions. |
help |
Help input. |
Create a CaPO4 network
networkCaPO4Ui(id)
networkCaPO4Ui(id)
id |
module id. |
Create a CaPO4 network options
networkOptions(input, output, session, mobile)
networkOptions(input, output, session, mobile)
input |
Shiny inputs |
output |
Shiny Outputs |
session |
Session object. |
mobile |
Whether we are on cellphone/tablets or not. Slot for input$ismobile(). |
Options for the network
networkOptionsUi(id)
networkOptionsUi(id)
id |
module id |
Create modals, alerts, ...
plotBox(input, output, session, diseases, help, isMobile)
plotBox(input, output, session, diseases, help, isMobile)
input |
Shiny inputs |
output |
Shiny Outputs |
session |
Session object. |
diseases |
Shiny input disease selector. See diseaseSelect. |
help |
Help input. |
isMobile |
Shiny input useful to scale elements based on the device screen size. |
Create modals, alerts, ...
plotBoxUi(id)
plotBoxUi(id)
id |
module id. |
Unleash the virtual patient simulator
run_CaPO4Sim(context = c("introduction", "virtual-patient"))
run_CaPO4Sim(context = c("introduction", "virtual-patient"))
context |
Choose between |
if (interactive()) { run_CaPO4Sim(context = "introduction") run_CaPO4Sim(context = "virtual-patient") }
if (interactive()) { run_CaPO4Sim(context = "introduction") run_CaPO4Sim(context = "virtual-patient") }
Select the shinydashboard skin you want
skinSelect(input, output, session)
skinSelect(input, output, session)
input |
Shiny inputs |
output |
Shiny Outputs |
session |
Session object. |
Select the shinydashboard skin you want
skinSelectUi(id)
skinSelectUi(id)
id |
module id. |
Create a CaPO4 user info card
userInfo(input, output, session, diseases, sliderDisease, help)
userInfo(input, output, session, diseases, sliderDisease, help)
input |
Shiny inputs |
output |
Shiny Outputs |
session |
Session object. |
diseases |
Shiny input disease selector. See diseaseSelect. |
sliderDisease |
Shiny input disease severity selector. See plotBox. |
help |
Help input. |
Create a CaPO4 user info card
userInfoUi(id)
userInfoUi(id)
id |
module id. |
Nothing is contained inside for now...
video(input, output, session)
video(input, output, session)
input |
Shiny inputs |
output |
Shiny Outputs |
session |
Session object. |
Contains php1, hypopara, hypoD3
videoUi(id, data)
videoUi(id, data)
id |
module id. |
data |
Video data. |