An Automated Respiratory Data Pipeline for Waveform Characteristic Analysis
Authors: Lusk Savannah , Ward Christopher , Chang Andersen , Twitchell‐Heyne Avery , Allen Genevera , Ray Russell 
Published: May 2022

Whole body barometric flow through plethysmography is used to study respiratory output in mouse and rat genetic and disease models. Turn‐key commercial and custom systems are both used to gather multiple data streams including respiratory‐pressure waveforms, O2 and CO2 measurement, and other data points for a reasonable estimation of tidal volume and key metabolic parameters.

These experiments typically produce large amounts of data that are time‐consuming and difficult to analyze and organize. For analysis, the investigator may use cumbersome hand annotation subject to observer bias or several software products may be combined to manage raw data, calculated data, statistical analysis, and graphing. Commercial software, however, is prohibitively expensive or bundled with turn‐key systems that limit options for those using bespoke respiratory measurement systems.

To address these deficiencies, we developed a software pipeline for processing raw respiratory recordings and associated metadata (experimental design, age, weight, temperature, etc.) into operative respiratory outcomes, publication‐worthy graphs, and robust statistical analyses. This pipeline consists of three modules. The first module is a Python‐based graphical user interface (GUI) for uploading all relevant data files and allows the user to define and label independent, dependent, and covariate variables relevant to the experimental design, statistical analysis, and graphical outputs. Additionally, parameters can be programmed to define waveform feature segmentation to include manual annotations.

In the second module, BASSPRO, the data are processed with a Python program to segment the respiratory waveform based on user‐defined thresholds for movement artifacts and unique features. BASSPRO quantifies respiratory cycle components and demarks unique features including sighs, apneas, expiratory reflexes, and user‐defined entities. The module also allows for browsing the raw signals with markup of automatically annotated breaths to facilitate validation of breath detection and to permit manual annotation of features, if desired.

The third module, STAGG, is an R‐based program that accepts the BASSPRO output along with configuration files from the GUI to graph the desired variables while performing a linear mixed effects statistical model analysis of the data with appropriate post‐hoc tests. Following graph generation, statistically significant differences in respiratory variables are automatically annotated in the graphs. Following statistical testing, residual analyses are provided that allow the user to determine if a transformation of their data may be appropriate. If so, transformations can be selected within the GUI so no external data analyses are necessary.

The open‐source program offers a facile and highly customizable platform for automated handling and analysis of animal respiratory and metabolic data that sets the stage for high‐throughput studies and machine learning approaches on large data sets.