ReTap is an open-source tool to generate automated UPDRS finger-tapping predictions and kinematic features describing finger tapping based on index-finger accelerometer data. A manuscript describing ReTap's intentions, functionality, methodology, and limitations is under review and will follow.
This repo is structured as follows:
.
├── LICENSE.txt
├── README.md
├── setup.cfg
├── setup.py
├── pyproject.toml
├── conda_requirements.txt
├── create_conda_env.bat
├── add_env_pip_packages.bat
├── runtime.txt
├── src
│ └── retap
│ ├── main_scripts
│ ├── preprocessing
│ ├── feature_extraction
│ ├── prediction
│ └── utils
├── data
│ └── models
│ └── settings
src
contains the actual modules and functions.
data
contains the settings and trained models used by the model for tapping score prediction.
other files contain information about the package, the installation, and the use of the functions.
ReTap will find the (raw) accelerometer files you want to be processed in a FOLDER THAT YOU NEED TO DEFINE. This local folder-location you have to define within ReTap/data/settings/configs.json
, as variable raw_acc_folder
.
You can run ReTap's functionality either as a python-script directly from the command line, or execute it within a Jupyter Notebook. Both will be explained below.
ReTap will generate two folders containing the results and the illustrative figures of the feature extraction and the tapping-score-prediction. THESE FOLDER WILL BE CREATED NEXT TO THE FOLDER WITH RAW ACCELEROMETER DATA YOU DEFINED. These folders will be called retap_results
and retap_figures
.
.
├── YOUR DEFINED FOLDER (in configs.json)
├── retap_figures
│ └── block_detection
├── retap_results
│ └── extracted_tapblocks (csv files with preprocessed data per detected tapping block)
│ └── features (json-file with all features on a single-tap-event level, stored per detected tapping block)
│ └── predictions (csv file with the predicted tapping-score, per detected tapping block)
There are some important steps you need to do, before you can work with the results.
retap_figures/block_detection
. Here you can identify if the block detection was succesful, and you can decide which blocks you will include or discard.git clone https://github.com/jgvhabets/ReTap.git
cd ReTap
, git init
, git remote -v
, git branch
(switch to branch main e.g. with git checkout main
)pip install
will follow soonpip install
, the environment-installation requires 2 commands: one for conda install
, and one for pip install
.
Steps to perform in your (anaconda) prompt:
cd Users/USERNAME/Research/ReTap
.\create_conda_env.bat
(confirm Proceed? with y
).\add_env_pip_packages.bat
conda activate retap_test
ReTap/data/settings/configs.json
.raw_acc_folder
within configs.json into THE LOCAL FOLDER WHERE YOU STORED THE ACCELEROMETER FILES THAT NEED TO BE PROCESSED.raw_acc_folder
within ReTap/data/settings/configs.json
is changed succesfully, you can execute ReTap from a notebook, see the example in src/retap/main_scripts/run_retap.ipynb
raw_acc_folder
within ReTap/data/settings/configs.json
is changed succesfully, you can execute ReTap directly using the script src/retap/main_scripts/run_retap.py
cd Users/USERNAME/FOLDERNAME/ReTap
)python -m src.retap.main_scripts.run_retap
(the -m
has to be added since the scripts is ran directly from a module) Please do not hesitate and reach out in case of any questions, contributions, or what so ever!
This software is available under MIT-LICENSE. Also see the document LICENSE.txt.