gastempt

A package and a Shiny web application to create simulated gastric emptying data, and to analyze experimental gastric emptying data using population fit with R and package nlme. Use the Docker image (https://hub.docker.com/u/dmenne) for easy installation. Documentation:

https://github.com/dmenne/gastempt

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.6%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

A package and a Shiny web application to create simulated gastric emptying data, and to analyze experimental gastric emptying data using population fit with R and package nlme. Use the Docker image (https://hub.docker.com/u/dmenne) for easy installation. Documentation:

Basic Info
Statistics
  • Stars: 3
  • Watchers: 1
  • Forks: 3
  • Open Issues: 0
  • Releases: 0
Created about 10 years ago · Last pushed 11 months ago
Metadata Files
Readme

README.md

gastempt: Fitting gastric emptying curves

Dieter Menne\ Menne Biomed Consulting Tübingen, Germany\ https://www.menne-biomed.de\ dieter.menne\@menne-biomed.de{.email}

R build status Downloads codecov

A package and a Shiny web application to create simulated gastric emptying data, and to analyze gastric emptying from clinical studies using a population fit with R and package nlme. In addition, Bayesian fits with Stan to handle critical cases are implemented.

Part of the work has been supported by section GI MRT, Klinik für Gastroenterologie und Hepatologie, Universitätsspital Zürich; thanks to Werner Schwizer and Andreas Steingötter for their contributions.

Download

The package is available from CRAN and github (source, documentation). To install, use:

devtools::install_github("dmenne/gastempt")

Compilation of the Stan models needs several minutes.

Shiny online interface

The web interface can be installed on your computer, or run as web app.

Two models are implemented in the web interface

  • linexp, vol = v0 * (1 + kappa * t / tempt) * exp(-t / tempt):Recommended for gastric emptying curves with an initial volume overshoot from secretion. With parameter kappa > 1, there is a maximum after t=0. When all emptying curves start with a steep drop, this model can be difficult to fit.
  • powexp, vol = v0 * exp(-(t / tempt) ^ beta): The power exponential function introduced by Elashof et. al. to fit scintigraphic emptying data; this type of data does not have an initial overshoot by design. Compared to the linexp model, fitting powexp is more reliable and rarely fails to converge in the presence of noise and outliers. The power exponential can be useful with MRI data when there is an unusual late phase in emptying.

Methods with variants

  • Population fits based on function nlme in package R nlme.
  • Stan-based fits, both without and with covariance estimation. Thanks to priors, fitting with Bayesian methods also works for single records, even if stability strongly improves with more data sets available; see stan_gastempt. Some details can be found in my blog. The rationale for using Stan to fit non-linear curves is discussed here for 13C breath test data, but is equally valid for gastric emptying data.

Data entry:

  • Data can be entered directly from the clipboard copied from Excel, or can be simulated using a Shiny app.
  • Several preset simulations are provided in the Shiny app, with different amounts of noise and outliers
  • Robustness of models can be tested by manipulating noise quality and between-subject variance.
  • Fits are displayed with data.
  • The coefficients of the analysis including half-emptying time t50 and the slope at time t50 can be downloaded in .csv format.

Example

Program with simulated data (needs about 10 seconds till plot shows):

library(gastempt)
dd = simulate_gastempt(n_records = 6, seed = 471)
d = dd$data
ret = stan_gastempt(d)
print(ret$coef)
print(ret$plot)

Screenshot

Installing Docker

  • For Windows 10, you can get the installer from the Docker store. For installation details, see here.\
  • Linux users know how to install Docker anyway.

Installing gastempt

  • From the command line, enter the following to start the container
docker run --name gastempt  --restart unless-stopped -p 3838:3838 -d dmenne/gastempt
  • The first startup needs some time because 1 GB has to be downloaded. Subsequent startups require only a few seconds.
  • Connect to the app with your browser via localhost:3838.

Owner

  • Name: Dieter Menne
  • Login: dmenne
  • Kind: user
  • Location: 72144 Dusslingen, Germany
  • Company: Menne Biomed Consulting

Started as a nuclear physicist, PhD in genetics/biophysics. Signal processing in bat echolocation (Marburg, Tübingen, Singapore) Since 1989: Freelance

GitHub Events

Total
  • Issues event: 2
  • Issue comment event: 1
  • Push event: 11
Last Year
  • Issues event: 2
  • Issue comment event: 1
  • Push event: 11

Committers

Last synced: over 3 years ago

All Time
  • Total Commits: 288
  • Total Committers: 3
  • Avg Commits per committer: 96.0
  • Development Distribution Score (DDS): 0.201
Top Committers
Name Email Commits
Dieter Menne d****e@m****e 230
Dieter Menne d****e@m****r 56
Jeffrey Pullin j****n@g****m 2
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 2
  • Total pull requests: 3
  • Average time to close issues: 7 days
  • Average time to close pull requests: 12 months
  • Total issue authors: 2
  • Total pull request authors: 3
  • Average comments per issue: 2.0
  • Average comments per pull request: 1.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: 3 days
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 2.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • MRWUR (1)
  • esbenbolvig (1)
Pull Request Authors
  • jeffreypullin (1)
  • andrjohns (1)
  • bgoodri (1)
Top Labels
Issue Labels
bug (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 257 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 10
  • Total maintainers: 1
cran.r-project.org: gastempt

Analyzing Gastric Emptying from MRI or Scintigraphy

  • Versions: 10
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 257 Last month
Rankings
Forks count: 17.8%
Stargazers count: 26.2%
Dependent packages count: 29.8%
Average: 31.5%
Dependent repos count: 35.5%
Downloads: 48.5%
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • R >= 4.2.0 depends
  • Rcpp >= 1.0.3 imports
  • assertthat * imports
  • dplyr * imports
  • ggplot2 >= 3.3.0 imports
  • methods * imports
  • nlme * imports
  • rstan >= 2.21.0 imports
  • shiny * imports
  • stringr * imports
  • tibble >= 3.1.0 imports
  • utf8 * imports
  • covr * suggests
  • knitr * suggests
  • ragg * suggests
  • rmarkdown * suggests
  • rstantools * suggests
  • testthat >= 2.99 suggests
  • vdiffr * suggests
.github/workflows/check-standard.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/checkout v3 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
Dockerfile docker
  • rocker/r-base latest build