Project Status: Active – The project has reached a stable, usable state and is being actively developed. Travis build status DOI DOI

Documentation website: https://docs.ropensci.org/workloopR/

Accompanying paper in Journal of Open Source Software: https://doi.org/10.21105/joss.01856

Installation

We are not (yet) on CRAN but the package can be installed via:

#install.packages("devtools") # if devtools is not installed
devtools::install_github("ropensci/workloopR")

Please note that vignettes are not built by default. To build vignettes as well, please use the following code:

devtools::install_github("ropensci/workloopR", build_vignettes = TRUE)

Overview

workloopR (pronounced “work looper”) provides functions for the import, transformation, and analysis of muscle physiology experiments in R. As the package’s title suggests, our initial motivation was to provide functions to analyze work loops. The work loop technique (Josephson 1985) is used in studies of muscle physiology to determine the mechanical work and power output of a muscle. Over the course of developing the package, we expanded this goal to also cover experiments that are often complementary to the work loop technique. There are three currently supported experiment types: work loop, simple twitch, and tetanus.

Figure 1

For more on work loops, we recommend a great review paper by Ahn (2012) as well as this Wikipedia page.

Example

workloopR offers the ability to import, transform, and then analyze a data file. Here is an example using a work loop file included within the package:

library(workloopR)

## import the workloop.ddf file included in workloopR
wl_dat <- read_ddf(system.file("extdata", "workloop.ddf",
                               package = 'workloopR'),
                  phase_from_peak = TRUE)

## select cycles 3 through 5 using a peak-to-peak definition
wl_selected <- select_cycles(wl_dat, cycle_def = "p2p", keep_cycles = 3:5)

## apply a gear ratio correction, run the analysis function,
## and then get the full object
wl_analyzed <- analyze_workloop(wl_selected, GR = 2)
## for brevity, the print() method for this object produces a simple output
wl_analyzed
## but see the structure for the full output, e.g.
#str(wl_analyzed)

## or run the analysis but get the simplified version
wl_analyzed_simple <- analyze_workloop(wl_selected, simplify = TRUE, GR = 2)
wl_analyzed_simple

Graphical overview

Recommended functions and vignettes:

Figure 2

Citation

The preferred way to cite workloopR is:

Baliga VB and Senthivasan S. 2019. workloopR: Analysis of work loops and other data from muscle physiology experiments in R. Journal of Open Source Software, 4(43), 1856, https://doi.org/10.21105/joss.01856

Issues/questions/requests

Feedback is welcome! Please feel free to get in touch with either Vikram (@vbaliga) or Shree (@shreeramsenthi).

We are happy to take feature requests, especially those that involve data import from non-ddf file types. Please see our Issues page for templates that you can use.

🐢

License

GPL (>= 3) + file LICENSE