Men show larger cardiorespiratory responses than women
Description
This repository contains the complete analysis pipeline for the study of sex differences in autonomic, haemodynamic and respiratory responses to paced breathing in trained athletes. Running sacr_analysis.py on the study dataset reproduces every statistic reported in the manuscript: Tables 1 and 2, the effect sizes and confidence intervals drawn in Figure 2, Supplementary Tables S1 and S2, the discipline comparison in Supplementary Table S3, and the sensitivity analyses described in the Methods.
Files
Steps to reproduce
Download all files into one folder, keeping the file names unchanged. The pipeline reads Sci_data_rep.xlsx, sports.txt and w_sports.txt from the working directory. Install Python 3.9 or newer and the four dependencies listed in requirements.txt: pip install -r requirements.txt (numpy ≥ 1.24, scipy ≥ 1.10, openpyxl ≥ 3.1, matplotlib ≥ 3.7.) Run the whole pipeline with a single command: sh run_all.sh On Windows without a shell, run the seven scripts in the order listed in run_all.sh: python sacr_analysis.py Sci_data_rep.xlsx python make_t1.py python make_t2.py python make_fig2.py python make_supplementary.py python hr_rate_adjustment.py python make_disciplines.py The run takes under one minute on an ordinary laptop. The following files are produced in the working directory: results.json — every statistic in the paper, machine-readable. t1.json — the rows of Table 1 exactly as typeset. t2.json — the rows of Table 2 exactly as typeset. Figure2_forest.png — Figure 2. Supplementary_Table_S1.xlsx — all 268 between-sex comparisons of increments. Supplementary_Table_S2.xlsx — the complete data-quality record. disciplines.csv and s3.json — the data behind Supplementary Table S3. To confirm reproduction, compare the console output of sacr_analysis.py with the manuscript. The headline values are: 89 men and 45 women; 16 increments differing between the sexes after Benjamini–Hochberg correction (8 at 0.1 Hz, 8 at 0.25 Hz), 15 of them of larger magnitude in men; rank-biserial r = 0.83 for respiratory LF/HF and 0.68 for heart-rate LF/HF at 0.1 Hz; r = 0.40 for minute ventilation at 0.25 Hz. make_disciplines.py should print χ² = 4.19, df = 3, p = 0.24 for the discipline distribution and Fisher p = 0.031 for the artistic-and-technical group. The pipeline is deterministic. The bootstrap confidence intervals use a fixed seed (RNG_SEED = 20240517 in sacr_analysis.py), so repeated runs produce byte-identical results.json, t1.json, t2.json and Figure2_forest.png. This was verified by running the package from a clean unpacked copy. Every data-handling decision is a named constant at the top of sacr_analysis.py and can be switched off or altered to test its effect: ONE_PER_PARTICIPANT (averaging of repeated measurement blocks), APPLY_PLAUSIBILITY_SCREEN and PLAUSIBILITY_BOUNDS, CORRECTIONS, EXCLUDED_CELLS, EXCLUDED_BLOCKS, REDUNDANT_AMPLITUDE_COLUMNS, and SENSITIVITY_EXCLUDE_PARTICIPANTS for leave-one-out checks. README.md describes each.
Institutions
- Lesya Ukrainka Volyn National UniversityVolyn, Lutsk