Skip to content

MattM719/cpet_analysis

Repository files navigation

CPET Bilinear Regression

This is a simplified version of the code used to analyze cardiopulmonary exercise testing (CPET) data in our study, "A Novel Quantification Technique for Analysis of Oxygen Pulse Curve Characteristics During Cardiopulmonary Exercise Testing in Adults with Tetralogy of Fallot." It runs the same method used fit a penalized bilinear regression curve, and provides the key calculations.

  1. Create a virtual environment and install the necessary dependencies from requirements.txt. This code was written for Python v3.10.

  2. Use pseudo_data_generator.py to create some synthetic data. The synthetic data will run, and it can be replaced with real data in the same format. You are responsible for ensuring all data provided to the code are first deidentified. A directory (OUTPUT_DIR) must be supplied. N_FILES and PLOT may be modified as well.

OUTPUT_DIR = os.path.join(os.path.dirname(file), "pseudo_data", "")
os.mkdir(OUTPUT_DIR)

  1. Use cpet_analysis.py to analyze the data. Provide the three requested paths at the beginning of the script before running the code. Alternatively, you may set USE_COMMAND_LINE_INTERFACE to True and run python cpet_analysis.py --help for intstructions on using the optional CLI.

META_DATA_PATH: str = "pseudo_data/meta_data.csv"
MERGED_DATA_PATH: str = "pseudo_data/meta_data.csv"
OUTPUT_DIR: str = os.path.dirname(file)

Please cite our work if you use our code. Questions may be directed to the corresponding author. DOI: 10.1016/j.ijcchd.2024.100539

About

Source code for analyzing CPET data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages