workloopR

workloopR: Analysis of work loops and other data from muscle physiology experiments in R - Published in JOSS (2019)

https://github.com/ropensci/workloopr

Science Score: 98.0%

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

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 14 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org, zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

ddf muscle-force muscle-physiology-experiments r r-package rstats tetanus work-loop workloop

Scientific Fields

Materials Science Physical Sciences - 40% confidence
Last synced: 4 months ago · JSON representation ·

Repository

💪 Analysis of work loops and other data from muscle physiology experiments

Basic Info
Statistics
  • Stars: 3
  • Watchers: 3
  • Forks: 2
  • Open Issues: 0
  • Releases: 5
Topics
ddf muscle-force muscle-physiology-experiments r r-package rstats tetanus work-loop workloop
Created over 6 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog Contributing License Citation Codemeta

README.md

workloopR: Analysis of work loops and other data from muscle physiology experiments in R

<!-- badges: start --> Project Status: Active – The project has reached a stable, usable state and is being actively developed. R build status DOI DOI CRAN status <!-- badges: end -->

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

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

Installation

You can install workloopR from CRAN via:

{r install_cran, eval = FALSE} install.packages("workloopR")

Or to get the latest (developmental) version through GitHub, use: ``` r

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: r 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:

```r library(workloopR)

import the workloop.ddf file included in workloopR

wldat <- readddf(system.file("extdata", "workloop.ddf", package = 'workloopR'), phasefrompeak = TRUE)

select cycles 3 through 5 using a peak-to-peak definition

wlselected <- selectcycles(wldat, cycledef = "p2p", keep_cycles = 3:5)

apply a gear ratio correction, run the analysis function,

and then get the full object

wlanalyzed <- analyzeworkloop(wl_selected, GR = 2)

for brevity, the print() method for this object produces a simple output

wl_analyzed File ID: workloop.ddf Cycles: 3 cycles kept out of 6 Mean Work: 0.00308 J Mean Power: 0.08474 W r

but see the structure for the full output, e.g.

str(wl_analyzed)

or run the analysis but get the simplified version

wlanalyzedsimple <- analyzeworkloop(wlselected, simplify = TRUE, GR = 2) wlanalyzedsimple ``` Cycle Work Net_Power a A 0.002785397 0.07639783 b B 0.003147250 0.08661014 c C 0.003305744 0.09122522

Core features and recommended vignettes

For an overview, please also see our "Introduction to workloopR" vignette

Data import: Importing data creates objects of class muscle_stim, which we designed to essentially behave as data.frames but with unique properties that work nicely with workloopR's core functions. Data that are stored in .ddf format (e.g., generated by Aurora Scientific's Dynamic Muscle Control and Analysis Software) are easily imported. Other file formats are welcome, but need to be constructed into muscle_stim objects by the user; please see the vignette "Importing data from non .ddf sources".

  • Example:

```R

import the workloop.ddf file included in workloopR

wldat <- readddf(system.file("extdata", "workloop.ddf", package = 'workloopR'), phasefrompeak = TRUE)

see how the muscle_stim object is organized

wldat str(wldat) names(attributes(wl_dat)) ```

Data transformations & corrections: Prior to analyses, data can be transformed or corrected. Should data have been recorded incorrectly, the gear ratio of the motor arm and/or the direction of the muscle's length change can be adjusted. Before analyzing work loop data, cycles within the work loop can be labeled (according to various definitions of what constitutes a "cycle"), which allows calculation of metrics on a per-cycle basis.

  • Example:

```R

correct the gear ratio of the motor arm

we'll use gear ratio = 2

this multiples Force by 2 and divides Position by 2

wlfixed <- fixGR(wl_dat, GR = 2) ```

Analyses: Core data analytical functions include analyze_workloop() for work loop files and isometric_timing() for twitch and tetanus trials.

```R

import the twitch.ddf file included in workloopR

twitchdat <- readddf(system.file("extdata", "twitch.ddf", package = 'workloopR'))

run isometric_timing() to get info on twitch kinetics

we'll use different set points than the defaults

analyzetwitch <- isometrictiming(twitch_dat, rising = c(25, 50, 75), relaxing = c(75, 50, 25)) ```

Batch processing: We also include functions for batch processing files (e.g., multiple files from a common experiment). These functions allow for the import, cycle selection, gear ratio correction, and ultimately work & power computation for all work loop trial files within a specified directory. This also allows users to correct for potential degradation of the muscle (according to power & work output) over the course of the experiment. See the "Batch processing" vignette

  • Example:

```R

batch read and analyze files included with workloopR

analyzedwls <- readanalyzewldir(system.file("extdata/wldurationtrials", package = 'workloopR'), phasefrompeak = TRUE, cycledef = "p2p", keepcycles = 2:4, GR = 2) ```

Plotting: Although we do not provide plotting functions, all resultant objects are designed to be friendly to visualization via either base-R plotting or tidyverse functions. Please see the "Plotting data in workloopR" vignette.

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

ropensci_footer

Owner

  • Name: rOpenSci
  • Login: ropensci
  • Kind: organization
  • Email: info@ropensci.org
  • Location: Berkeley, CA

JOSS Publication

workloopR: Analysis of work loops and other data from muscle physiology experiments in R
Published
November 01, 2019
Volume 4, Issue 43, Page 1856
Authors
Vikram B. Baliga ORCID
Department of Zoology, University of British Columbia, Vancouver, British Colombia, Canada V6T 1Z4
Shreeram Senthivasan ORCID
Department of Zoology, University of British Columbia, Vancouver, British Colombia, Canada V6T 1Z4
Editor
Daniel S. Katz ORCID
Tags
muscle physiology work loop twitch tetanus ddf

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Baliga"
  given-names: "Vikram B."
  orcid: "https://orcid.org/0000-0002-9367-8974"
- family-names: "Senthivasan"
  given-names: "Shreeram"
  orcid: "https://orcid.org/0000-0002-7118-9547"
title: "workloopR"
version: 1.1.4
doi: 10.21105/joss.01856
date-released: 2019-11-01
url: "https://github.com/ropensci/workloopR"

CodeMeta (codemeta.json)

{
  "@context": [
    "https://doi.org/10.5063/schema/codemeta-2.0",
    "http://schema.org"
  ],
  "@type": "SoftwareSourceCode",
  "identifier": "workloopR",
  "description": "Functions for the import, transformation, and analysis of data \n    from muscle physiology experiments. The work loop technique is used to \n    evaluate the mechanical work and power output of muscle. Josephson (1985) \n    <doi:10.1242/jeb.114.1.493> modernized the technique for\n    application in comparative biomechanics. Although our initial motivation \n    was to provide functions to analyze work loop experiment data, as we \n    developed the package we incorporated the ability to analyze data from \n    experiments that are often complementary to work loops. There are currently \n    three supported experiment types: work loops, simple twitches, and tetanus \n    trials. Data can be imported directly from .ddf files or via an object \n    constructor function. Through either method, data can then be cleaned or \n    transformed via methods typically used in studies of muscle physiology. \n    Data can then be analyzed to determine the timing and magnitude of force \n    development and relaxation (for isometric trials) or the magnitude of work, \n    net power, and instantaneous power among other things (for work loops). \n    Although we do not provide plotting functions, all resultant objects are \n    designed to be friendly to visualization via either base-R plotting or \n    'tidyverse' functions.\n This package has been peer-reviewed by rOpenSci (v. 1.1.0).",
  "name": "workloopR: Analysis of Work Loops and Other Data from Muscle Physiology Experiments",
  "license": "https://spdx.org/licenses/GPL-3.0",
  "version": "1.1.4",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 4.0.2 (2020-06-22)",
  "author": [
    {
      "@type": "Person",
      "givenName": "Vikram B.",
      "familyName": "Baliga",
      "email": "vbaliga87@gmail.com",
      "@id": "https://orcid.org/0000-0002-9367-8974"
    },
    {
      "@type": "Person",
      "givenName": "Shreeram",
      "familyName": "Senthivasan",
      "email": "shreeramsenthi@gmail.com",
      "@id": "https://orcid.org/0000-0002-7118-9547"
    }
  ],
  "contributor": {},
  "copyrightHolder": {},
  "funder": {},
  "maintainer": [
    {
      "@type": "Person",
      "givenName": "Vikram B.",
      "familyName": "Baliga",
      "email": "vbaliga87@gmail.com",
      "@id": "https://orcid.org/0000-0002-9367-8974"
    }
  ],
  "softwareSuggestions": [
    {
      "@type": "SoftwareApplication",
      "identifier": "testthat",
      "name": "testthat",
      "version": ">= 2.1.1",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=testthat"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "knitr",
      "name": "knitr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=knitr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "rmarkdown",
      "name": "rmarkdown",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rmarkdown"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "dplyr",
      "name": "dplyr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=dplyr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "ggplot2",
      "name": "ggplot2",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=ggplot2"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "magrittr",
      "name": "magrittr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=magrittr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "purrr",
      "name": "purrr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=purrr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "tidyr",
      "name": "tidyr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tidyr"
    }
  ],
  "softwareRequirements": [
    {
      "@type": "SoftwareApplication",
      "identifier": "pracma",
      "name": "pracma",
      "version": ">= 2.0.7",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=pracma"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "signal",
      "name": "signal",
      "version": ">= 0.7-6",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=signal"
    }
  ],
  "codeRepository": "https://github.com/ropensci/workloopR/",
  "fileSize": "6077.658KB",
  "citation": [
    {
      "@type": "ScholarlyArticle",
      "datePublished": "2019",
      "author": [
        {
          "@type": "Person",
          "givenName": "Vikram B.",
          "familyName": "Baliga"
        },
        {
          "@type": "Person",
          "givenName": "Shreeram",
          "familyName": "Senthivasan"
        }
      ],
      "name": "workloopR: Analysis of work loops and other data from muscle physiology experiments in R",
      "identifier": "10.21105/joss.01856",
      "pagination": "1856",
      "@id": "https://doi.org/10.21105/joss.01856",
      "sameAs": "https://doi.org/10.21105/joss.01856",
      "isPartOf": {
        "@type": "PublicationIssue",
        "datePublished": "2019",
        "isPartOf": {
          "@type": [
            "PublicationVolume",
            "Periodical"
          ],
          "volumeNumber": "4(43)",
          "name": "Journal of Open Source Software"
        }
      }
    }
  ],
  "issueTracker": "https://github.com/ropensci/workloopR/issues/",
  "developmentStatus": "https://www.repostatus.org/#active",
  "releaseNotes": "https://github.com/ropensci/workloopR/blob/master/NEWS.md",
  "keywords": [
    "muscle-physiology-experiments",
    "work-loop",
    "muscle-force",
    "tetanus",
    "workloop",
    "ddf",
    "r",
    "r-package",
    "rstats"
  ],
  "relatedLink": [
    "https://docs.ropensci.org/workloopR",
    "https://docs.ropensci.org/workloopR/",
    "https://CRAN.R-project.org/package=workloopR"
  ],
  "review": {
    "@type": "Review",
    "url": "https://github.com/ropensci/software-review/issues/326",
    "provider": "https://ropensci.org"
  },
  "provider": {
    "@id": "https://cran.r-project.org",
    "@type": "Organization",
    "name": "Comprehensive R Archive Network (CRAN)",
    "url": "https://cran.r-project.org"
  }
}

GitHub Events

Total
Last Year

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 91
  • Total Committers: 3
  • Avg Commits per committer: 30.333
  • Development Distribution Score (DDS): 0.308
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
vbaliga v****7@g****m 63
Shreeram Senthivasan s****i@g****m 27
Maëlle Salmon m****n@y****e 1

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 2
  • Total pull requests: 1
  • Average time to close issues: 33 minutes
  • Average time to close pull requests: 9 minutes
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 1.5
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 9 minutes
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • vbaliga (2)
Pull Request Authors
  • maelle (2)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 178 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
cran.r-project.org: workloopR

Analysis of Work Loops and Other Data from Muscle Physiology Experiments

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 178 Last month
Rankings
Forks count: 17.8%
Stargazers count: 26.2%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Average: 38.8%
Downloads: 85.1%
Maintainers (1)
Last synced: 4 months ago