An automation stack for synchronizing raw actigraphy exports, routing them through GGIR, and publishing QC plots for the BOOST observational and intervention studies. The service pulls IDs from REDCap, reconciles them with RDSS file drops, mirrors curated files to the LSS project hierarchy, and runs the GGIR + QC suite end to end.
- Features
- Repository Layout
- Prerequisites
- Quick Start
- Running the Pipeline
- Configuration
- Testing & QA
- Automation & Cron Support
- Troubleshooting Tips
- Contributing
- Roadmap
- License
- Mirrors RDSS accelerometer files into LSS study folders using deterministic naming (
sub-####_ses-#_accel.csv). - Executes GGIR (3.2.6) via bundled R scripts and captures QC metrics per subject/session.
- Generates interactive activity composition plots (Plotly/Matplotlib) and summary tables for downstream dashboards.
- Exposes a Python CLI (
code/main.py) that orchestrates symlink creation, ingest, GGIR, QC, and group visualizations. - Provides cron wrappers to keep remote environments synchronized with
mainand to ship new outputs automatically.
code/
core/ # GGIR-facing R scripts and conda env spec
utils/ # ingest, QC, plotting, symlink helpers
tests/ # QA notebooks, sample fixtures, exploratory plots
res/data.json # latest ingest manifest written by the pipeline
cron*.sh # automation entry points (local + production)
logs/ # QC summaries emitted by utils.qc
AGENTS.md # contributor workflow guide
- Python 3.11 (see
pyproject.toml). - R 4.3 with GGIR 3.0+;
code/core/environment.ymlcaptures a conda environment that works on VossLab Linux. - Access to RDSS (
/mnt/nfs/rdss/vosslab/Repositories/Accelerometer_Data) and LSS project mounts. - REDCap API token with access to report
43327(store in an environment variable, e.g.BOOST_TOKEN). - Git credentials for fetching/pushing when using the cron wrappers.
# 1. Clone
git clone https://github.com/HBCLab/boost-act.git
cd boost-act
# 2. Python environment
python -m venv .venv
source .venv/bin/activate
pip install -r code/requirements.txt
# 3. Optional: create R/GGIR env (Linux)
conda env create -f code/core/environment.yml
conda activate act-newerexport BOOST_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
python -m code.main <daysago> $BOOST_TOKEN <system>daysagofilters RDSS files by acquisition date; use1for “yesterday’s drops”.systemcontrols filesystem roots:vosslnx(default),local, orargon.- The run will:
- Create fresh symlinks under
../mnt(seeutils.mnt). - Match REDCap IDs to RDSS filenames (
utils.comparison_utils). - Copy curated CSVs into the correct LSS project folders (
utils.save). - Call GGIR through
core/acc_new.Rand execute QC/plotting (utils.qc,utils.group). - Write a subject manifest to
code/res/data.json.
- Create fresh symlinks under
For ad-hoc diagnostics, re-run plot generation with python code/tests/gt3x/plots.py (requires adjusting the hard-coded file path).
- Edit
code/utils/pipe.pyif new deployment targets or mounts are added. - Update
code/core/acc_new.Rto tweak GGIR parameters or derivative paths. - Place credentials in the environment or a secure secrets manager; never commit tokens.
- Logging defaults to INFO via
logging.basicConfigincode/main.py; adjust the level for verbose runs.
- Lightweight Python tests can be added under
code/tests/<area>/test_*.pyand executed withpytest. - QA notebooks in
code/tests/*/*.ipynbdocument exploratory checks; rerun them after major data or script changes. utils.qcaggregates results intologs/GGIR_QC_errs.csv; inspect this file to confirm expected wear-time and calibration checks.- Use sandbox tokens and the
localsystem flag to validate changes without touching production mounts.
cron.shbootstraps the conda env, pulls latestmain, runs the pipeline (daysago=1, production token), and pushes any resulting artifacts.cron_local.shmirrors the same flow without conda activation logic; run it from a workstation once credentials and remotes are configured.- Review git staging before enabling cron on a new host to avoid committing large raw exports.
- Missing symlinks: run
python -c "from code.utils.mnt import create_symlinks; create_symlinks('../mnt')"and confirm mount availability. - GGIR failures: check the console output and logs under
code/core/or R’s stderr; ensure the conda env includes GGIR dependencies. - REDCap mismatches:
utils.comparison_utils.ID_COMPARISONSlogs duplicate IDs; review its stdout andAGENTS.mdfor remediation steps. - Permission errors: verify the executing user can read RDSS and write to the LSS target directories.
Contributions are welcome! Start by reviewing AGENTS.md for code style, testing expectations, and PR etiquette. Please open issues for feature requests or bugs, and link related cron/job IDs when proposing changes that affect automation.
- Finish session-aware aggregation in
utils.group.Groupto replace TODO blocks. - Expand automated test coverage with filesystem mocks for ingest routines.
- Parameterize REDCap report IDs and GGIR derivative paths for multi-study support.
No license has been specified yet. Until a license is published, usage is limited to collaborators with explicit permission from the maintainers.
/mnt/lss/Projects/BOOST/InterventionStudy/3-experiment/data/act-int-test/derivatives/GGIR-3.2.6-test-ncp-sleep2/sub-8020/accel/ses-3/output_ses-3/results/part5_personsummary_MM_L44.8M100.6V428.8_T5A5.csv /mnt/lss/Projects/BOOST/ObservationalStudy/3-experiment/data/act-obs-test/derivatives/GGIR-3.2.6-test-ncp-sleep2/sub-7168/accel/ses-1/output_ses-1/results/part5_personsummary_MM_L44.8M100.6V428.8_T5A5.csv
cp /mnt/rdss/VossLab/Repositories/Accelerometer_Data/1168\ \(2025-08-14\)RAW.csv \
/mnt/lss/Projects/BOOST/InterventionStudy/3-experiment/data/act-int-test/sub-8019/accel/ses-3