Skip to content

reblocke/tcco2-accuracy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TcCO2 Accuracy

ATS abstract CHEST abstract App License: MIT

Research software and a static browser app for studying agreement between transcutaneous CO2 (TcCO2) monitoring and arterial PaCO2 across clinical contexts. The browser app runs the Python numerical model in Pyodide and keeps all user-entered values client-side.

Project status: abstract/poster stage. Results have been presented at ATS 2025 and CHEST 2025; the manuscript has not yet been submitted. This is research software and is not intended for clinical decision-making.

Links And Identifiers

Item Link
Static app https://reblocke.github.io/tcco2-accuracy/
Repository https://github.com/reblocke/tcco2-accuracy
Machine-readable index llms.txt
ATS 2025 abstract 10.1164/ajrccm.2025.211.Abstracts.A2683
CHEST 2025 abstract 10.1016/j.chest.2025.07.3877
Conway evidence synthesis 10.1136/thoraxjnl-2017-211466
Conway data/code archive Figshare record

Authors, Funding, And Disclosures

Contributor Role Affiliation
Dustin Anderson-Bell, MD Abstract author University of Utah Health
Brian W. Locke, MD, MSc Abstract author, repository maintainer Intermountain Health; University of Utah
Ram Gouripeddi, MBBS, MS ATS abstract author University of Utah Biomedical Informatics
W. Richards, BS ATS abstract author University of Utah Biomedical Informatics

Funding/support listed with the abstracts includes the American Thoracic Society ASPIRE Fellowship, the Intermountain Fund, NIH NRSA 5T32HL105321, and NCATS UM1TR004409. Repository issues and pull requests are the preferred contact route. Maintainer: Brian W. Locke (@reblocke, ORCID 0000-0002-3588-5238).

Quick Start

Requirements: Python 3.11 and uv.

uv sync --locked
make verify

Serve the static app locally:

make serve

Then open http://127.0.0.1:8000. The app loads staged Python from web/assets/py/, canonical data from web/assets/data/, and runs computations in a browser worker. Those staged assets are generated by make stage-web and are not the canonical source.

Rebuild Outputs

Regenerate review/manuscript artifacts:

uv run python scripts/rebuild_artifacts.py --out artifacts --paco2-path Data/in_silico_tcco2_db.dta --seed 202401 --n-boot 1000 --thresholds 45

The full artifact rebuild may use the in-silico PaCO2 distribution at Data/In Silico TCCO2 Database.dta, or the local alias Data/in_silico_tcco2_db.dta, when that restricted local file is present. The static browser app does not require that .dta; it uses the shipped binned prior Data/paco2_public_prior.csv, which retains 1 mmHg prior weights but omits exact bin counts. Generate exact count-bearing manuscript outputs only into .pytest_tmp/, .tmp/, or a private manuscript workspace unless explicitly approved for release.

Repository Layout

src/tcco2_accuracy/core/   Pure numerical/statistical source of truth
src/tcco2_accuracy/        I/O, contracts, wrappers, reporting, workflows
tests/                     Core, workflow, contract, and browser tests
web/                       Static GitHub Pages app
scripts/                   Staging, artifact, and data-prep commands
Data/                      Canonical public CSV/XLSX inputs and public prior
artifacts/                 Small aggregate review/manuscript outputs
docs/                      Architecture, deployment, validation, and decisions
Code/                      Stata reference code
Makefile                   Local command surface
pyproject.toml             Package and dependency metadata
uv.lock                    Locked Python environment

Internal drafts, editable poster decks, third-party PDFs, RData source archives, local Stata .dta files, and exact count-bearing PaCO2 outputs are local-only or source-linked materials and are not part of the public branch tip.

Static App Model

  • Python remains the single source of truth for computation.
  • JavaScript handles controls, uploads, worker messaging, and plotting.
  • The posterior chart uses a posterior-focused x-axis for readability; numeric summaries still use the full posterior/prior support.
  • Default calculations use repo-shipped canonical bootstrap parameters and the public 1 mmHg density prior for responsiveness.
  • Custom study tables or changed bootstrap settings trigger in-browser recomputation through the staged Python package.
  • User-entered values and uploads remain in the browser. The app has no backend, telemetry, persistence, or patient-value URLs.

Data Access And Dictionary

  • Canonical Conway study inputs are maintained in Data/conway_studies.csv and Data/conway_studies.xlsx.
  • The public PaCO2 prior for app deployment is maintained in Data/paco2_public_prior.csv; exact count-bearing prior bins are restricted local/generated outputs and should not be committed.
  • No patient-level protected health information (PHI) is included in this repository.
  • Public/restricted asset boundaries are documented in docs/DATA_GOVERNANCE.md and Data/PROVENANCE.md.
  • Variable and artifact documentation is available in data_dictionary.md and data_dictionary.csv.

If future analyses require restricted data, do not commit raw files. Provide synthetic examples and access instructions instead.

Quality Checks

Command Purpose
make stage-web Stage Python and data assets for the static app
make test Run Python unit, workflow, staging, and browser-contract tests
make e2e Run Playwright browser smoke tests against the staged app
make visual-qa Write local review screenshots under .pytest_tmp/visual-qa/
make verify Run staging, format check, lint, unit tests, and E2E tests

Scientific validation targets are documented in docs/VALIDATION.md.

Citation

Until a manuscript or archived software DOI is available, cite the repository release or commit and the conference abstracts:

Anderson-Bell D, Locke BW. Simulation suggests transcutaneous CO2 sensors may accurately detect hypercapnia across settings. CHEST. 2025;168(4):A6917. doi:10.1016/j.chest.2025.07.3877

Anderson-Bell D, Locke BW, Gouripeddi R, Richards W. In silico estimation of the performance of transcutaneous CO2 sensors for detecting hypercapnia in newly admitted inpatients. American Journal of Respiratory and Critical Care Medicine. 2025;211(Supplement_1):A2683. doi:10.1164/ajrccm.2025.211.Abstracts.A2683

See CITATION.cff for machine-readable metadata.

License

  • Code and author-owned repository documentation: MIT License (see LICENSE)
  • Data and external evidence sources: governed by original source licenses and access terms.
  • Third-party article pages, source records, and abstract pages: linked and cited rather than mirrored as publisher PDFs or full publisher text.

About

Research software and browser app for TcCO2-to-PaCO2 accuracy and inference simulation

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors