Skip to main content
Log in

Moving average and standard deviation thresholding (MAST): a novel algorithm for accurate R-wave detection in the murine electrocardiogram

  • Original Paper
  • Published:
Journal of Comparative Physiology B Aims and scope Submit manuscript

Abstract

Advances in implantable radio-telemetry or diverse biologging devices capable of acquiring high-resolution ambulatory electrocardiogram (ECG) or heart rate recordings facilitate comparative physiological investigations by enabling detailed analysis of cardiopulmonary phenotypes and responses in vivo. Two priorities guiding the meaningful adoption of such technologies are: (1) automation, to streamline and standardize large dataset analysis, and (2) flexibility in quality-control. The latter is especially relevant when considering the tendency of some fully automated software solutions to significantly underestimate heart rate when raw signals contain high-amplitude noise. We present herein moving average and standard deviation thresholding (MAST), a novel, open-access algorithm developed to perform automated, accurate, and noise-robust single-channel R-wave detection from ECG obtained in chronically instrumented mice. MAST additionally and automatically excludes and annotates segments where R-wave detection is not possible due to artefact levels exceeding signal levels. Customizable settings (e.g. window width of moving average) allow for MAST to be scaled for use in non-murine species. Two expert reviewers compared MAST’s performance (true/false positive and false negative detections) with that of a commercial ECG analysis program. Both approaches were applied blindly to the same random selection of 270 3-min ECG recordings from a dataset containing varying amounts of signal artefact. MAST exhibited roughly one quarter the error rate of the commercial software and accurately detected R-waves with greater consistency and virtually no false positives (sensitivity, Se: 98.48% ± 4.32% vs. 94.59% ± 17.52%, positive predictivity, +P: 99.99% ± 0.06% vs. 99.57% ± 3.91%, P < 0.001 and P = 0.0274 respectively, Wilcoxon signed rank; values are mean ± SD). Our novel, open-access approach for automated single-channel R-wave detection enables investigators to study murine heart rate indices with greater accuracy and less effort. It also provides a foundational code for translation to other mammals, ectothermic vertebrates, and birds.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Similar content being viewed by others

Availability of data and material

The datasets generated during and/or analysed during the current study are available from the corresponding author on reasonable request.

Code availability

The code is available on Github at: https://github.com/NDomnik/MAST_QRS; https://doi.org/10.5281/zenodo.4287696.

References

Download references

Acknowledgements

To Frapps (Peter Frappell), to whom this special edition is dedicated: our sincere gratitude for your unfailing support, passion, curiosity, and enthusiasm for your research and for your unparalleled ability to inspire the same in others. JTF and NJD send heartfelt thanks for an unforgettable research adventure in Hobart; it is one that they reminisce over both fondly and frequently, regaling any trainee who will listen about the wonders of the invertebrate heart. Thank you for welcoming us to your lab, your campus, your wonderful extended research community, and (along with Deirdre) your home. You have touched our lives in so many ways. The authors also wish to thank Alexandra McCartney (Queen’s University) for her support in performing literature searches and her contributions towards the citations contained in this manuscript.

Funding

Research was supported by Canadian Institutes of Health Research (JTF: MOP81211), a Personnel Award from the Heart and Stroke Foundation of Canada (ST), a Natural Science and Engineering Research Council Alexander Graham Bell CGS Scholarship (NJD) and Queen’s University’s Faculty of Arts and Sciences (GEJS).

Author information

Authors and Affiliations

Authors

Contributions

All authors contributed to study conception and design, drafting, and editing of the manuscript and approved its final version. NJD conducted the radio-telemetry experiments. ST and GEJS wrote the algorithm code. NJD and GEJS analyzed resulting data with the reported code as well as a commercially available software solution.

Corresponding author

Correspondence to Nicolle J. Domnik.

Ethics declarations

Conflict of interest

The authors declare that this research was conducted in the absence of either commercial or financial relationships that could be construed as a potential conflict of interest.

Ethics approval

Experiments were approved by the Queen’s Animal Care Committee (protocol #: 2016-1632 “The Role of Muscarinic receptor subtypes in the cardiopulmonary phenotype of the OVA sensitized allergic airway hyperresponsive (AHR) murine model”) and performed according to the guidelines of the Canadian Council of Animal Care.

Consent to participate

N/A.

Consent for publication

N/A.

Additional information

Communicated by E. Polymeropoulos.

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Domnik, N.J., Torbey, S., Seaborn, G.E.J. et al. Moving average and standard deviation thresholding (MAST): a novel algorithm for accurate R-wave detection in the murine electrocardiogram. J Comp Physiol B 191, 1071–1083 (2021). https://doi.org/10.1007/s00360-021-01389-3

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00360-021-01389-3

Keywords

Navigation