deeplearningspatialqrs-tangle

Implementation of a deep-learning-based method for estimation of the spatial QRS-T angle from reduced-lead ECGs

https://github.com/anarasr/deeplearningspatialqrs-tangle

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
    Links to: nature.com, mdpi.com
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.4%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Implementation of a deep-learning-based method for estimation of the spatial QRS-T angle from reduced-lead ECGs

Basic Info
  • Host: GitHub
  • Owner: anarasr
  • License: gpl-3.0
  • Language: MATLAB
  • Default Branch: main
  • Size: 4.51 MB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 3 years ago · Last pushed over 3 years ago
Metadata Files
Readme License Citation

README.md

Deep-Learning-Based Estimation of Spatial QRS-T angle

Welcome to the DeepLearningSpatialQRS-Tangle repository! 🤓

If you're here, you probably saw our open-access research paper: "Deep-Learning-Based Estimation of the Spatial QRS-T Angle from Reduced-Lead ECGs", published on 20th July 2022. In this repository, you'll be able to find code and any relevant documentation mentioned in the paper.

When using this resource, please cite:

Santos Rodrigues A, Augustauskas R, Lukoševičius M, Laguna P, Marozas V. Deep-Learning-Based Estimation of the Spatial QRS-T Angle from Reduced-Lead ECGs. Sensors. 2022; 22(14):5414. https://doi.org/10.3390/s22145414

A few important notes before we start: - The code is written in MATLAB and Python. The required versions and toolboxes are specified in each section. - Some of the code was implemented by other authors, who are stated/cited accordingly throughout this README.md and the .m files. We provide all relevant citations in the Refs.bib file to simplify referencing and citation. - The prefix "fn" in a filename indicates a MATLAB function (fnFunctionName.m). In every function file, you'll find: - A description of the function; - Any applicable literature; - Summary of input/output variables; - A list of additional .mfiles.

It looks roughly like this: Matlab function [out_A] = fnFunctionName(in_A, in_B)

Expand here for details

Matlab function [out_A] = fnFunctionName(in_A, in_B) %FNFUNCTIONNAME is an example to describe the code syntax used. This is the function description. % Any relavant literature is listed as: % [1]: Author 1, Author 2. Title. Journal. Year. DOI. % [2]: Author 1, Author 2. Title. Journal. Year. DOI. %------------------------------------------------------------ % INPUTS: %------------------------------------------------------------ % 1) in_A: This is variable of size MxN. % 2) in_B: This is another variable. %------------------------------------------------------------ % OUTPUTS: %------------------------------------------------------------ % 1) out_A: This is variable. %------------------------------------------------------------ % NECESSARY FUNCTIONS: %------------------------------------------------------------ % 1) fnAnotherFunction.m %------------------------------------------------------------ % Written by: Author (email) % Updated: YYYY-MM-DD. %------------------------------------------------------------ % According to [1]: out_A = in_A + in_B; end


Data

Physionet's PTB-XL dataset is the 12-lead clinical ECG dataset used in our research work. You can download the dataset here.

When using this database, please cite:

Wagner, P., Strodthoff, N., Bousseljot, R.-D., Kreiseler, D., Lunze, F.I., Samek, W., Schaeffter, T. (2020), PTB-XL: A Large Publicly Available ECG Dataset. Scientific Data. https://doi.org/10.1038/s41597-020-0495-6

(and cite this one too)

Goldberger, A., Amaral, L., Glass, L., Hausdorff, J., Ivanov, P. C., Mark, R., ... & Stanley, H. E. (2000). PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation [Online]. 101 (23), pp. e215–e220.


Training and Validation Sets

Section 4.3. of our research paper describes the data splitting process into training and validation datasets. Each dataset is disclosed on the files Training_Dataset.csv and Validation_Dataset.csv in the folder Split Datasets. Only the high-quality recordings suitable for analysis (see Section 4.1.1.) are listed. In each table, you'll find:

| ecgid | patientid | sex | scpcodes | class | qrstangle | qrst_range | |:--- |:--- |:--- |:--- |:--- |:--- |:--- | |16968 | 2089 | 1 | {'NORM': 100.0, 'SR': 0.0} | ["Norm"] | 21.081 | [20:25[ | | ... | ... | ... | ... | ... | ... | ... | ... | | 1427 | 20044 | 0 | {'ASMI': 100.0, 'ISCAL': 100.0, 'SR': 0.0} |["MI","STTC"] | 152.1103 | [150:155[ | | ... | ... | ... | ... | ... | ... | ... | ... |

The attributes ecg_id, patient_id, sex and scp_codes correspond to the same attributes in the file ptbxl_database.csv provided by the original documentation of the PTB-XL dataset, whereas qrst_angle is the estimated QRS-T angle $\alpha$ (°) using the conventional approach and qrst_range is the range of $\alpha$ = [0:5:180]° as described in the paper.

You can easily load the .csv files in the MATLAB environment with the readtable function: Matlab Train_Data = readtable("Training_Dataset.csv"); Val_Data = readtable("Validation_Dataset.csv");


How to read the raw ECG files in MATLAB?

After downloading the raw files from the PTB-XL dataset page, you can open the .dat files in MATLAB: Matlab % Switch the environment/directory cd([YOUR_DATA_DIR]) % Read file fid = fopen([recording_name, '.dat']); % Get the raw ECG and convert to volts ecg_raw = transpose(fread(fid, [12 inf], 'int16'))./1000; % Close file fclose(fid); % Get back to working environment cd(WORKING_DIR); Alternatively, you can use our function fnFileReaderECG.m. You can also use Physionet's WFDB Software Package, but we do not recommend it (it is excruciantingly slow).

Citation (CITATION.cff)

cff-version: 1.2.0
title: Deep-Learning-Based Estimation of Spatial QRS-T angle
message: "Please cite this software using the metadata from 'preferred-citation'."
type: software
authors:
  - given-names: Ana
    family-names: Santos Rodrigues
    email: ana.rodrigues@ktu.lt
    affiliation: Biomedical Engineering Institute, Kaunas University of Technology
    orcid: 'https://orcid.org/0000-0002-5011-8192'
  - given-names: Rytis
    family-names: Augustauskas
    email: rytis.augustauskas@ktu.lt
    affiliation: Department of Automation, Kaunas University of Technology
    orcid: 'https://orcid.org/0000-0001-8672-3872'
  - given-names: Mantas
    family-names: Lukoševičius
    email: mantas.lukosevicius@ktu.lt
    affiliation: Faculty of Informatics, Kaunas University of Technology
    orcid: 'https://orcid.org/0000-0001-7963-285X'
  - given-names: Pablo
    family-names: Laguna
    email: laguna@unizar.es
    affiliation: Biomedical Signal Interpretation and Computational Simulation (BSICoS) Group, 
    Aragón Institute of Engineering Research (I3A), IIS 
    Aragón, University of Zaragoza
    orcid: 'https://orcid.org/0000-0003-3434-9254'
  - given-names: Vaidotas
    family-names: Marozas
    email: vaidotas.marozas@ktu.lt
    affiliation: Biomedical Engineering Institute, Kaunas University of Technology
    orcid: 'https://orcid.org/0000-0002-6879-5845'
version: all
date-released: 2022-07-20
license: GPL-3.0-or-later
repository-code: https://github.com/anarasr/DeepLearningSpatialQRS-Tangle
preferred-citation:
 type: article
 doi: 10.3390/s22145414
 title: Deep-Learning-Based Estimation of the Spatial QRS-T Angle from Reduced-Lead ECGs
 authors:
   - family-names: Santos Rodrigues
     given-names: Ana
   - family-names: Augustauskas
     given-names: Rytis
   - family-names: Lukoševičius
     given-names: Mantas
   - family-names: Laguna
     given-names: Pablo
   - family-names: Marozas
     given-names: Vaidotas
 journal: Sensors
 year: 2022
 volume: 14
 pages: 5414

GitHub Events

Total
Last Year