scieee Open visual document viewer

Monitoring blood potassium concentration in hemodialysis patients by quantifying T-wave morphology dynamics

Palmieri, F.; Gomis, P.; Ferreira, D.; Pueyo, E.; Bergasa, B.; Martínez, J.P.; Ruiz, J.E.; Laguna, P.; Martín-Yebra, A.; Bukhari, H.A.; Ramírez, J.

Abstract

We investigated the ability of time-warping-based ECG-derived markers of T-wave morphology changes in time (dw) and amplitude (da), as well as their non-linear components (dNLw and dNLa), and the heart rate corrected counterpart (dw,c), to monitor potassium concentration ([K+]) changes (Δ[K+]) in end-stage renal disease (ESRD) patients undergoing hemodialysis (HD). We compared the performance of the proposed time-warping markers, together with other previously proposed [K+] markers, such as T-wave width (Tw) and T-wave slope-to-amplitude ratio (TS/A), when computed from standard ECG leads as well as from principal component analysis (PCA)-based leads. 48-hour ECG recordings and a set of hourly-collected blood samples from 29 ESRD-HD patients were acquired. Values of dw, da, dNLw, dNLa and dw,c were calculated by comparing the morphology of the mean warped T-waves (MWTWs) derived at each hour along the HD with that from a reference MWTW, measured at the end of the HD. From the same MWTWs Tw and TS/A were also extracted. Similarly, Δ[K+] was calculated as the difference between the [K+] values at each hour and the [K+] reference level at the end of the HD session. We found that dw and dw,c showed higher correlation coefficients with Δ[K+] than TS/A—Spearman’s (ρ) and Pearson’s (r)—and Tw—Spearman’s (ρ)—in both SL and PCA approaches being the intra-patient median ρ≥0.82 and r≥0.87 in SL and ρ≥0.82 and r≥0.89 in PCA respectively. Our findings would point at dw and dw,c as the most suitable surrogate of Δ[K+], suggesting that they could be potentially useful for non-invasive monitoring of ESRD-HD patients in hospital, as well as in ambulatory settings. Therefore, the tracking of T-wave morphology variations by means of time-warping analysis could improve continuous and remote [K+] monitoring of ESRD-HD patients and flagging risk of [K+]-related cardiovascular events. Palmieri, F.; Gomis, P.; Ferreira, D.; Ruiz, J.E.; Bergasa, B.; Martín-Yebra, A.; Bukhari, H.A.; Pueyo, E.; Martínez, J.P.; Ramírez, J.; Laguna, P.

Full text

ͷ ǤǣȋͰͱͲͳʹ͵Ȍ Ƥ | (2021) 11:3883 | ǣȀȀǤȀͷͶǤͷͶ͹;ȀͺͷͻͿ;ǦͶ͸ͷǦ;͸Ϳ͹ͻǦͻ www.na u e.com/scien i ic epo s   Ǧ  ͷǡ͸ǡ͹*ǡͷǡͺǡ͹ǡ±ͻǡͻǡ ÀǦ͸ǡͼǡǤ͸ǡͼǡ͸ǡͼǡÀ͸ǡͼǡ ÀͽƬ͸ǡͼ ǦǦǦǦ ȋ d w Ȍȋ daȌǡǦȋ dNL wdNL aȌ ǡ      ȋ dw,cȌǡȋ [ K+ ] Ȍ ȋ [ K+ ] ȌǦȋȌȋȌǤ Ǧǡ [ K+ ]  ǡǦȋ Tw ȌǦǦǦȋ T S/ A Ȍǡ ȋȌǦǤͺ;Ǧ Ǧ͸ͿǦǤ  dw ǡ daǡ dNL wǡ dNL adw,c ǦȋȌǡ Ǥ Tw  T S/ A Ǥǡ [ K+ ]  ơ [ K+ ]  [ K+ ]  Ǥ dw dw,cƥ  [ K+ ]  T S/ A Ȅǯȋ ρ Ȍǯȋ ȌȄ Tw Ȅǯȋ ρ ȌȄ Ǧ ρ ≥ 0 . 82  ≥ 0 . 8 7 ρ ≥ 0 . 82  ≥ 0 . 89  ǤƤ dw dw,c [ K+ ] ǡ  ǦǦ ǡǤǡǦ Ǧ [ K+ ] Ǧ ƪ [ K+ ] ǦǤ Ch onic kidney disease (CKD) is de ined as he p esence o kidney damage, pe sis ing o 3 mon hs o mo e, i espec i e o he cause1. I ep esen s a s a e o p og essi e loss o kidney unc ion ul ima ely esul ing in need o enal eplacemen he apy such as hemodialysis (HD) o ansplan a ion. The de elopmen o CKD and i s p og ession o his e minal s age, called end-s age enal disease (ESRD), emains a signi ican sou ce o educed quali y o li e and p ema u e mo ali y2. In pa icula , sudden ca diac dea h (SCD) ep esen s an impo an cause o dea h in ESRD-HD pa ien s3. Va ious isk ac o s may be esponsible o SCD in his pa ien popula ion, including le en icula hype ophy and ib osis, diso de ed bone-mine al me abolism, HD-induced changes in elec oly e, and luid and acid-base s a us, which may lead o elec oca diog aphic (ECG) abno mali ies and en icula a hy hmia3,4. Recen s udies ha e shown ha blood po assium concen a ions ( [ K+ ] ) ou side he physiological in e al a e associa ed wi h inc eased mo ali y isk5. In heal hy condi ions, he main enance o [ K+ ] homeos asis is ensu ed by no mal enal ac i i y6. Howe e , ESRD-HD pa ien s su e om [ K+ ] imbalance, leading o a high incidence  ͷCen e de Rece ca en Enginye ia Biomèdica, Uni e si a Poli ècnica de Ca alunya, Ba celona, Spain. ͸CIBER en ÀǡȋǦȌǡǡǤ͹Labo a o ios Rubió, Cas ellbisbal, Ba celona, Spain. ͺValencian In e na ional Uni e si y, Valencia, Spain. ͻNeph ology Depa men , Hospi al ÀǡǡǤͼǡ ͹ǡ×ǡǡ ǡ Ǥ ͽWilliam Ha ey Resea ch Ins i u e, Queen Ma y Uni e si y o London, London, UK. *email: ƪǤǤ ͸ Vol:.(1234567890) Ƥ | (2021) 11:3883 | ǣȀȀǤȀͷͶǤͷͶ͹;ȀͺͷͻͿ;ǦͶ͸ͷǦ;͸Ϳ͹ͻǦͻ www.na u e.com/scien i ic epo s/ o a hy hmic e en s. The p o-a hy hmic consequences o [ K+ ] imbalance can be explained conside ing ha po assium cu en s a e in ol ed in he epola iza ion p ocess o he ca diac ac ion po en ial (AP), de e mining memb ane po en ial and e ac o iness o he myoca dium7. The e o e, e en modes de ia ions o [ K+ ] om i s no mal ange (hypokalemia i [ K+ ] < 3.5 mmol/L o hype kalemia i [ K+ ] > 5 mmol/L) may lead o hospi alisa- ion o dea h in ESRD-HD pa ien s8. E alua ion o [ K+ ] le els is cu en ly based on blood samples ha equi e u he analyses in he labo a o y, limi ing con inuous moni o ing. Non-in asi e ma ke s able o ack a ia ions in [ K+ ] le els a e he e o e needed. The elec oca diog am (ECG) is a non-in asi e, easily accessible, and inexpensi e p ac ice ha e lec s he elec ical ac i i y o he hea . In pa icula , he T-wa e e lec s he spa io- empo al epola iza ion o he en- icle, and i s analysis has been used o measu e he ulne abili y o a pa ien o en icula a hy hmias9. This ac is o pa icula in e es because T wa es a e equen ly al e ed in ESRD-HD pa ien s4. The QT in e al is he s anda d index o en icula epola iza ion, and i has been p oposed o moni o ESRD-HD pa ien s10. Howe e , he e ec s o HD on QT in e al, and i s co ec ed e sion QTc, a e s ill con o e sial, since se e al s udies11 epo ed a p olonga ion du ing he HD sessions, bu o he s epo ed opposi e end o e en no changes a all12. This mo i a es he analysis o he o e all T-wa e mo phology as a po en ial po assium le el ma ke . Di e en T-wa e mo phology ma ke s ha e been p e iously epo ed o be co ela ed wi h [ K+ ] , such as he T-wa e igh slope13, he wid h o he T-wa e ( Tw )14, he T-wa e slope- o-ampli ude a io ( T S / A)15, and a mo - phology combina ion sco e, which in eg a es ea u es like T-wa e asymme y, la ness and no ching16. Howe e , hese ma ke s ely on speci ic local ea u es o he T-wa e a he han in he o e all T-wa e mo phology, which may ha e a s onge po en ial in ollowing [K+ ] han indices based on local ea u es. A ecen s udy epo ed a ime-wa ping based me hodology o quan i y changes in he o e all T-wa e mo phology17. Six indices we e p oposed, du w and d a , e lec ing mo phological a ia ions in ime and ampli ude, espec i ely, as well as hei non-linea e sion, dNL w and dNL a as epo ed in17 and wo no el ma ke s de i ed om du w and named d w and dw , c . The main goal o his s udy is o in es iga e he po en ial o hese ma ke s in moni- o ing bo h hypo- and hype kalemia e en s excluding he a iabili y due o he hea a e (HR) and o compa e hei pe o mance agains Tw and T S / A in s anda d single-lead app oach and by applying p incipal componen analysis (PCA) as mul ilead space educ ion echnique. Howe e , some o he abo e men ioned indices may no be obus enough o ou pu pose. I is he case o d w which does no p o ide in o ma ion abou he di ec ion o he T-wa e mo phological a ia ion (i.e. i he e is s e ching o sho ening) and has been ound o be co - ela ed wi h HR. The e o e, we ha e adap ed he o iginal me hodology17 o accoun o hypo- and hype kalemia, and we p opose a new ma ke ha is independen o HR, hus o e ing a mo e p ecise [ K+ ] moni o ing ool o a hy hmic isk s a i ica ion in ESRD-HD pa ien s. P elimina y esul s ex ac ed om a smalle subse o pa ien s ha e been p esen ed a Compu ing in Ca diology con e ence18,19 while he elec ophysiological basis was s udied in Bukha i e al.20. The no el ies o he p esen s udy wi h espec o he s a e-o - he-a a e: (1) he usage o T-wa e ime wa p- ing analysis o non-in asi e [ K+ ] moni o ing, oge he wi h he de elopmen o a HR co ec ion ool o he ime-wa ping ma ke , dw , c ; (2) he p oposal o a PCA spa ial ans o ma ion lead o ma ke ex ac ion and (3) he alida ion o he p oposed ma ke s in compa ison wi h p e iously published bioma ke s ( Tw and T S / A ) and wi h hei ex ac ion om s anda d leads.  Ǥ The s udy popula ion included 29 pa ien s om he Neph ology wa d om Hospi al Clínico Uni e si a io Lozano Blesa (Za agoza, Spain). Inclusion c i e ia we e (i) 18-yea -old (o olde ), (ii) ha - ing a diagnosed ESRD pa hology and (iii) unde going HD a leas h ee imes pe week (wi h enous o cannula access). Table1 shows he popula ion cha ac e is ics. The s udy p o ocol was app o ed by he A agon’s esea ch e hics commi ee (CEICA, e . PI18/003) and all pa ien s and/o hei legal gua dians signed in o med consen . All he p ocedu es and all he me hods we e pe o med in acco dance wi h he Helsinki Decla a ion. The da a- base collec ion is s ill ongoing, wi h he cu en size signi ican enough o a pilo s udy21,22. Ǥ Gene al in o ma ion. Sex, age, concomi an he apies (e.g. assump ion o an i-a hy h- mic d ugs), kidney disease e iology and HD ea men ela ed in o ma ion we e collec ed o each en olled pa ien , as de ailed in Table1. Blood sample analysis. Fo each pa ien , six blood samples we e aken and analysed du ing he HD session: he i s one a he HD onse and he nex h ee, e e y subsequen hou (Fig.1, h 0 o h 3 in ed). The 5- h blood sam- ple was collec ed a he end o he HD (minu e 215- h o 245- h, depending on he HD session du a ion) while he 6- h blood sample was aken a e 48 h, immedia ely be o e he nex HD session. Po assium, magnesium, calcium, u ea, c ea inine, bica bona e and pH we e measu ed om each blood es . Blood po assium concen a- ions alues o each blood es a e gi en in Table2. ECG measu emen s. A 48h, s anda d 12-lead ECG Hol e eco ding, (H12+, Mo a a Ins umen s, Milwaukee, WI, USA, sampling equency o 1 kHz, ampli ude esolu ion o 3.75 μ V), was ob ained o each en olled pa ien , s a ing he acquisi ion 5 min be o e he HD onse (Fig.1, blue line). The block diag am p esen ed in Fig.2a desc ibes he main s eps o he whole da a p ocessing implemen ed in his wo k. ǦǤ ECG il e ing. Hol e ECG signals con ain baseline d i and o he noises, such as powe -line and muscula ac i i y (Fig.2a). The e o e, an ini ial p e-p ocessing is needed o imp o e he signal- ͹ Vol.:(0123456789) Ƥ | (2021) 11:3883 | ǣȀȀǤȀͷͶǤͷͶ͹;ȀͺͷͻͿ;ǦͶ͸ͷǦ;͸Ϳ͹ͻǦͻ www.na u e.com/scien i ic epo s/ o-noise a io (SNR) and enable ECG wa e o m analysis. Fi s , baseline wande was emo ed wi h a high-pass, o wa d-backwa d 6- h o de Bu e wo h il e wi h 0.5 Hz cu -o equency23 (Fig.2a). Then, esidual noise ou o he T-wa e band was emo ed wi h a 6- h o de low-pass Bu e wo h il e wi h 40 Hz cu -o equency. ECG wa e o m de ec ion and delinea ion. A wa ele -based single-lead me hod24 was applied o de ec QRS complexes and hen delinea e T-wa e onse s and ends in each o he 12 leads. The wa ele ans o m (WT) decomposes he signal in he ime-scale domain, allowing i s ep esen a ion a di e en esolu ions. I is, he e- o e, a sui able ool o analyze ECG signals, which con ain pa e ns wi h di e en equency con en (QRS com- plexes, P and T-wa es). Single-lead delinea ion. The disc e e dyadic WT is implemen ed in such a way ha i keeps empo al esolu ion a di e en scales. The de ec ion o he iducial poin s is ca ied ou ac oss he adequa e WT scales, a ending o he dominan equency componen s o each ECG wa e: Q,R,S wa es co espond o a simul aneous e ec in scales 21–22 , while he T and P wa es a ec mainly scales 2 4 o 25 , see24 o de ails. ECG wa e peaks co espond o ze o c ossings in he WT, and ECG maximum slopes co espond o WT’s maxima and minima. Depending on he numbe and pola i y o he slopes ound, a wa e mo phology is assigned and bounda ies a e loca ed using h eshold-based c i e ia. The onse (end) o a wa e occu s be o e (a e ) he i s (las ) signi ican slope associ- a ed wi h he wa e24. Selec ion ules o mul i-lead delinea ion. To ob ain mul ilead peak loca ions, a median pos -p ocessing selec- ion ule o e he single-lead-based de ec ed loca ions is used. The pos -p ocessing ules o bounda ies consis o o de ing he single-lead anno a ions and selec ing as he onse (end) o a wa e he i s (las ) anno a ion whose k nea es neighbou s lay wi hin a δ ms in e al24,25. Single-lead analysis. Fi s , we pe o med he analysis using he single-lead ECG, aking he T-wa es om leads V3 o V6, as used in a p e ious s udy26 o [ K+ ] es ima ion, and lead II being he mos widely used in pa ien moni o ing27. These T wa es we e u he delinea ed by using he abo e mo ioned delinea o 24 and he bio- ma ke es ima ion is pe o med as desc ibed below in sec ion named “Time wa ping analysis”. Spa ial lead educ ion by p incipal componen analysis. Nex , a spa ial lead educ ion by P incipal Componen Analysis (PCA) was made since i was ound o be a obus spa ial ans o ma ion o emphasize wa e o m SNR28. In his wo k PCA was spa ially applied o he 8 independen leads, lea ned o e he T-wa e segmen o mainly emphasize his wa e o m, and esul ing in 8 p incipal componen s (PCs) o ans o med leads. The coe icien s de ining he PCA ans o ma ion we e ob ained om he eigen ec o s o he 8× 8 in e lead au o-co ela ion ma ix compu ed o e he T-wa es in a 10-min wide window a he end o he HD session. The co ec deline- a ion o T-wa es is c ucial o emphasize only T-wa e ene gy con en . The i s PCA, deno ed as PC1, was used o he subsequen ECG analysis, as i is he ans o med lead whe e he T-wa es ha e maximal ene gy, and hus, maximal SNR o mo phological cha ac e isa ion28,29. PC1 was u he delinea ed by applying again24, and each T-wa e was u he low-pass il e ed a 20 Hz using a 12- h o de Bu e wo h il e o es ic shape analysis o he dominan band o he T-wa e so emo ing emaining noisy componen s ha could s ill co up he T-wa e shape analysis. ǦǤ Two-minu e ECG segmen s, cen ed on he 5- h and 35- h minu es o each a ail- able hou , we e analysed. The window du a ion was sho enough o hold he assump ion o s abili y o bo h [ K+ ] and HR alues. Figu e5a shows he a e age RR in e al o each selec ed i- h 2-min segmen s o a gi en pa ien along he ECG eco ding. While he blood samples (pu ple diamonds) we e collec ed each hou du ing he HD, he wa ping pa ame e s we e compu ed e e y hal an hou o ge a mo e de ailed iew o e ime. Fo each i- h 2-min segmen , a mean wa ped T-wa e (MWTW) was compu ed. Fi s o all, he p edominan T-wa e pola i y (e.g. upwa d, downwa d e c) wi hin a gi en window, was de ined as ha ha ing he highes numbe o occu ences. This pola i y change can be physiological o induced by delinea o oscilla ion when by- phasic o egula T-wa es appea s almos indis inguishable. A T-wa e was conside ed o ha e in e ed pola i y i he magni ude o i s peak had nega i e sign and ice- e sa. Only hose T-wa es ha ing he same pola i y as ECG acquisi ion 0565 125 185 215 245 HD Pos HD 2880 ℎ1 ℎ0ℎ2ℎ3ℎ4ℎ5 Time (min) Figu e1. Diag am o he s udy p o ocol: h 0 o h 5 a e he ime poin s (in minu es) o blood sample ex ac ion. h 4 is aken a he end o he HD (minu e 215- h o 245- h, depending on he HD du a ion). ͺ Vol:.(1234567890) Ƥ | (2021) 11:3883 | ǣȀȀǤȀͷͶǤͷͶ͹;ȀͺͷͻͿ;ǦͶ͸ͷǦ;͸Ϳ͹ͻǦͻ www.na u e.com/scien i ic epo s/ O iginal ECG ECG il a ion PCA Time-wa ping analysisECG p e-p ocessing (a) (b) Figu e2. Analysis s ages pe o med in his s udy. In panel(a) is he low cha showing he ECG p ocessing s eps o T-wa e ime-wa ping ma ke s ex ac ion. The analysis s a s wi h he o iginal ECG, ollowed by a il e ing s ep be o e spa ial PCA analysis, o conclude wi h ma ke s compu a ion. Panel(b) shows an example o he linea and nonlinea ime-wa ping ma ke s o he same pa ien as in Fig.5a. In pa icula , subpanel (i) shows bo h he e e ence (blue) and he i- h MWTW ( ed) while subpanel (ii) shows he wa ping unc ion ( ed do ed line) ha op imally ela es he e e ence and s udied MWTWs. Subpanel (iii) shows he MWTWs a e wa ping and subpanel (i ) a e he no malized e e ence and wa ped MWTWs. ͻ Vol.:(0123456789) Ƥ | (2021) 11:3883 | ǣȀȀǤȀͷͶǤͷͶ͹;ȀͺͷͻͿ;ǦͶ͸ͷǦ;͸Ϳ͹ͻǦͻ www.na u e.com/scien i ic epo s/ he p edominan one we e conside ed in he ollowing s eps. Then, all hese selec ed T-wa es we e aligned wi h espec o hei g a i y cen e and used o compu e an ini ial MWTW 17. Finally, all he T-wa es we e checked o ind and disca d he ou lie s, de ined as ha ing T-wa e du a ion ou side he ange T dmi±1.5 ×σdi cen e ed a he i- h ensemble T-wa e mean, T dmi , and bounded unc ion o he T-wa e du a ion s anda d de ia ion σdi . Among he emaining, only hose T-wa es highly co ela ed (Pea son’s co ela ion coe icien > 0.98) wi h he p e ious ini ial MWTW we e used o ecalcula e he inal MWTW. The MWTW a he end o he HD ea men was aken as he e e ence, gi en ha i is he ime when he pa ien (a) is supposed o ha e eco e ed he no mal [ K+ ] le el and (b) was discha ged om hospi al, being an app op ia e e e ence o ou -o -hospi al ambula o y moni o ing. Since hype kalemia has been epo ed o cause T-wa e in e sions30, any MWTWs wi h nega i e-pola i y was in e ed be o e pe o ming he wa ping wi h he e e ence MWTW. P e ious o wa ping, he wo MWTWs we e aligned wi h espec o hei g a i y cen e , so ha only changes in he T-wa e mo phology, and no hose associa ed wi h hei ela i e delay, we e quan i ied by he wa ping algo i hm. Fo compa ison pu poses, bo h Tw 14 and T S / A15 we e ex ac ed om each MWTW and hei pe o mance, wi h espec o T-wa e ime-wa ping based bioma ke s in moni o ing [ K+ ] , was assessed. This wo k pe o m a clinical s udy ollowing p e ious analysis es ing he ma ke by elec ophysiological simula ions as epo ed in Bukha i e al.20. Table 1. Cha ac e is ics o he s udy popula ion. Values a e exp essed as numbe ( % ) o ca ego ical a iables, and median (IQR) o con inuous a iables. (N = 29) Age (yea s) 7 5 ( 12 ) Gende (male) 20 ( 70% ) An i-a hy hmic d ugs (yes) 9 ( 31% ) Implan ed pace-make (yes) 1 ( 3% ) Time unde HD ea men (mon hs) 15 ( 59 ) HD session du a ion 210 min 3 ( 10% ) 240 min 26 ( 90% ) Kidney disease e iology Diabe es melli us 17 ( 59% ) In e s i ial neph i is 2 ( 7% ) Glome uloneph i is 2 ( 7% ) Tube ous scle osis 1 ( 3% ) Polycys ic kidney 1 ( 3% ) Cance 1 ( 3% ) Unknown 5 ( 18% ) HD liquid composi ion Po assium (1.5 mmol/L) 21 ( 72% ) Po assium (3 mmol/L) 5 ( 17% ) Po assium (dec easing) 3 ( 11% ) Calcium (2.5 mg/dL) 21 ( 72% ) Calcium (3 mg/dL) 8 ( 28% ) HD echniques Con en ional 18 ( 62% ) Online 8 ( 28% ) Ace a e- ee bio il a ion wi h dec eas- ing in a-HD [K+]3 ( 10% ) Table 2. Blood po assium concen a ion [ K+ ] alues (in mmol/L) a each blood ex ac ion du ing he HD ( h 0 o h 4 ) and HR (bea s/min). Spea man’s ( ρ ) and Pea son’s ( ) in a-pa ien co ela ion coe icien s be ween [ K+ ] and RR. Values a e exp essed as median (IQR). h 0 h 1 h 2 h3h 4 ρ (K + )5.0 (1.4) 3.8 (1.1) 3.6 (0.8) 3.4 (0.7) 3.3 (0.6) 0.10 (1.35) 0.09 (1.45) HR 81 (28) 76 (28) 80 (23) 80 (17) 80 (25) ͼ Vol:.(1234567890) Ƥ | (2021) 11:3883 | ǣȀȀǤȀͷͶǤͷͶ͹;ȀͺͷͻͿ;ǦͶ͸ͷǦ;͸Ϳ͹ͻǦͻ www.na u e.com/scien i ic epo s/ T-wa e ime wa ping. The me hod he e applied was o iginally p oposed by Ramí ez e  al.17. Le i( i)=[ i( i(1)),..., i( i(Ni))] T be he MWTW o a gi en i- h segmen , and ( )=[ ( (1),..., ( (N ))] T he e e ence MWTW, whe e i=[ i(1),..., i(Ni)] T and =[ (1),..., (N )] T wi h N i and N being he o al T-wa e du a ion, in samples, o i and espec i ely. Figu e2b illus a es he wa ping me hod applied be ween one o he i- h MWTW ( ed) and he e e ence MWTW (blue). Le γ i( ) be he wa ping unc ion ha ela es and i , such ha he composi ion ( i◦ γ i)( ) deno es he e-pa ame iza ion o ime domain wa ping o i( i) using γ i( ) , i.e. ( i◦ γ i)( ) ep esen s he ampli ude alues o i( i) i i s empo al ec o was . The squa e- oo slope unc ion (SRSF) was p oposed ins ead o he o iginal T-wa es31,32 o ind he op imal wa ping unc ion. This was applied by pe o ming ime-wa ping on he SRSFs o he T-wa es, p e en ing he “pinching e ec ” in cases when T-wa e ampli udes di e 33. This ans o ma ion is de ined as: The op imal wa ping unc ion is he one ha minimizes he ampli ude di e ence be ween he SRSF o ( ) and i( γ i( ) ) 32: The dynamic p og amming algo i hm was used o ob ain he solu ion o his op imisa ion p oblem34. Fig- u e2b(ii) shows he op imal wa ping unc ion be ween he wo wa es in Fig.2b(i). The wa ped T-wa e, i(γ ∗ i ( ) ) is shown in Fig.2b(iii), oge he wi h he e e ence T-wa e, ( ) . Time wa ping bioma ke s. The index du w (co esponding o he index deno ed as d w in17), shown as he yellow a ea in Fig.2b(ii), quan i ies he amoun o wa ping needed o op imally align he wo T-wa es, and is de ined as he a e age o he absolu e di e ence alue be ween γ∗ i ( ) and : The o iginal de ini ion o du w(i ) 17 was modi ied he e o allow he ma ke o be signed, he e o e dis inguishing T-wa e widenings om na owings. This signed dw(i ) was de ined as: whe e sd ( i ) was used o accoun o he sign o he dw(i ) and i was compu ed as: wi h Nu being he se o T-wa e up-slope samples. A posi i e sign means ha he i( i) has o be widened o i he ( ) and ice- e sa o a nega i e sign. A e applying ime wa ping be ween bo h MWTWs, he ampli ude di e ence be ween ( ) and i(γ ∗ i ( ) ) is quan i ied as he a ea con ained be ween ( ) and i(γ ∗ i ( ) ) , no malized by he L2-no m o ( ) : whe e sa(i)= N n =1( i(γ ∗ i ( )) − ( ) ) is used o accoun o he da(i ) sign es ima ion. Bo h dw(i ) and da(i ) inco po a e in o ma ion om he linea and non-linea di e ences be ween bo h T-wa es in ime and ampli ude domain, espec i ely. The non-linea componen s can be quan i ied as in17: whe e γ ∗ i , l( ) (g een line in Fig.2b(ii)) is he bes linea i ing o γ ∗ i ( ) acco ding o he leas absolu e esidual c i e ion35. The pa ame e dNL w(i ) quan i ies he non-linea wa ping by compu ing he a ea o he dashed magen a egion be ween γ ∗( ) and γ ∗ i , l( ) (in Fig.2b(ii)). Finally, he ma ke dNL a(i ) quan i ies he esidual in o ma ion in ampli ude domain a e no malising MWTWs (Fig.2b(i )). (1) q ( )=sign˙ ( )   ˙ ( ) . (2) γ∗ i =a g min γi( )   q  −q[ i◦γi]     =a g min γ i( )  q  −q iγi ˙γi( )   . (3) d u w(i)= 1 N N  n=1 |γ∗ i( (n)) − (n)|. (4) dw(i)=sd(i) |sd(i)|1 N N  n=1 |γ∗ i (n)− (n)| . (5) sd(i)= n∈Nu (γ ∗ i (n)− (n))+ n/∈Nu ( (n)−γ∗ i (n)). (6) da(i)= sa(i)  sa(i)   i(γ ∗ i( )) − ( )  ( )  ×100 . (7) dNL w(i)=1 N N  n=1 |γ∗ i( (n)) −γ∗ i,l( (n))| . (8) dNL a(i)=     ( )  ( )− i(γ ∗ i( ))  i(γ ∗ i ( ))     ×100 . ͽ Vol.:(0123456789) Ƥ | (2021) 11:3883 | ǣȀȀǤȀͷͶǤͷͶ͹;ȀͺͷͻͿ;ǦͶ͸ͷǦ;͸Ϳ͹ͻǦͻ www.na u e.com/scien i ic epo s/ Hea - a e-co ec ed T-wa e wa ping. I is well known ha T-wa e du a ion and QT in e al a e s ongly dependen on HR36. Al hough aligning he T-wa es acco ding o hei g a i y cen e educes mos o he dependence o dw(i) on HR, he e may s ill be some esidual dependence in T-wa e mo phology ha should be compensa ed o (e.g. see Fig.5a a ound hou s h = 9, 12 and 43). We assume ha dw(i ) , as o iginally p oposed in (4), can be modelled as he sum o wo componen s: whe e dw , HR(i ) is he HR dependen componen and dw , c(i ) is he non-HR dependen componen accoun ing o ( K+ ) induced a ia ions and possibly o he s no HR ela ed. To es ima e he co ec ed componen dw , c(i ) we depa om he li e a u e, whe e se e al o mulae o HR- dependency co ec ion o epola iza ion ela ed ime in e als, like he QT in e al, ha e been de eloped37–40, including a a ie y o app oaches (e.g. linea , hype bolic, exponen ial models e c.) being in es iga ed and es ed in iew o he complex ela ionship be ween QT in e al and HR39. To de i e a co ec ion o mula and es ima e dw , c(i ) , we s a ed om a linea app oxima ion o a hype bolic model unde small RR changes, de i ed simila ly o he QT in e al co ec ion (QTc)38,39, Le ’s call R R he e e ence RR in e al associa ed o a e e ence hea bea and R R i he one o he i- h RR in e al om one bea a he i- h segmen , hen As he Q T i − Q T di e ence, also dw(i ) is a measu e o wid h change be ween he e e ence and he cu en i- h mean T-wa es om hei espec i e obse a ions ime windows, hen i is possible o ex end p e ious ela ion in (11) o dw(i ) ob aining he HR ela ed componen By subs i u ing (12) in (9) we ob ain The alue dw , c(i ) can be assumed o be non-ze o mean, and unco ela ed o HR, ha is: wi h dw , c(i ) ze o mean and unco ela ed o HR. Then, dw(i ) becomes: whe e he pa ame e s b, β and α , once join ly es ima ed (i.e. ˆ b , ˆ β and ˆ α ) can be used o de i e ˆ dw , c(i ) as: No e ha , ˆ β and ˆ α canno be assessed om (15) wi h a di ec ly leas squa e i ing, since he DC componen b in (15) la gely a ec s he esul s. Ra he , i is possible o join ly es ima e ˆ b, ˆ β and ˆ α , and hen use he esul s in (16). This es ima e can be u he app oxima ed linea ly o small RR changes. Deno ing RR ( i ) =RRi−RR , R R i can be exp essed as R Ri=RR +RR ( i ) and by eplacing his in he igh side o (12): Ope a ing on he e ms and unde he assump ion ha RR ( i ) RR , ( RR(i) RR ) 1 and by using he Taylo ’s se ies expansion, we ha e Subs i u ing (18) in (13): whe e b, α , β and ( RR ) ( α−1 ) a e cons an alues; hen placing: he ac ual dw(i ) dependency wi h RR will be: (9) dw(i)=dw , c(i)+dw , HR(i) . (10) QT =β(RR)α. (11) Q Ti−QT =β  (RRi)α−(RR )α . (12) d w,HR(i)=β  (RRi)α−(RR )α . (13) d w(i)=dw,c(i)+β  (RRi)α−(RR )α . (14) dw , c(i)=b+dw , c(i) , (15) dw(i)=b+dw,c(i)+β  (RRi)α−(RR )α , (16) ˆ d w,c(i)=dw(i)−ˆ β(RRi)ˆα−(RR )ˆα . (17) dw,HR(i)=β  (RR +RR(i))α−(RR )α . (18) (RR +RR(i))α−(RR )α≃αRR(i)(RR )(α−1). (19) dw(i)≃b+dw,c(i)+αβRR(i)(RR )(α−1), (20) αβ(RR )(α−1)=c , (21) dw(i)≃b+dw , c(i)+cRR(i) . ; Vol:.(1234567890) Ƥ | (2021) 11:3883 | ǣȀȀǤȀͷͶǤͷͶ͹;ȀͺͷͻͿ;ǦͶ͸ͷǦ;͸Ϳ͹ͻǦͻ www.na u e.com/scien i ic epo s/ F om he geome ical poin o iew, b and c can be es ima ed as he ze o-c ossing and he slope, espec i ely, o he leas -squa es line i o he dw(i ) alues (in a RR ( i ) s. dw(i ) g aph). Then, he dw(i ) componen ha does no dependen on he RR, meaning i is assumed no co ela ed, can assessed as: whe e ˆc is he es ima ed slope om he Hol e eco ding, see Fig.3, ˆ dw , c(i ) is hen he co ec ed es ima ed o dw , c(i ) , wi h R R i and R R he mean RR in e al om he i- h s udied segmen and he e e ence windows espec- i ely and ˆc pa ame e is es ima ed o e e y pa ien du ing he ime cou se o he Hol e eco ding. When he linea app oxima ion p esen ed abo e canno be assumed, ˆ b , ˆ β , and ˆ α can be join ly es ima ed om he model in (15), and use he (16) as he co ec ed es ima e. An example o he es ima ed ˆ dw , c(i ) is gi en in Fig.5a whe e bo h ˆ dw , c(i ) and dw(i ) whe e displayed. No ice how he p oposed co ec ion o mula emo ed he HR-dependency, o example a ound h = 12. Table3 p o ides an o e iew o he mo phology ma ke s s udied in his wo k.   [K+]Ǥ The p oposed bioma ke s ha e been compa ed wi h he ela i e a ia ions in [ K+ ] (deno ed as [K+](h ) ) wi h espec o a e e ence [ K+ ] ha was aken a he end o he HD: (22) ˆ d w , c(i)=dw(i)−ˆcRR(i)=dw(i)−ˆc(RRi−RR ) . Table 3. T-wa e mo phology ma ke s o [ K+ ] moni o ing. *du w co espond o he ma ke deno ed as d w in17, while he e. d w is ese ed o he newly in oduced signed e sion. Ma ke s Desc ip ion O iginal ma ke s om17 d u w *Time-domain changes be ween The e e ence and he i- h MWTW (ms). dN L w Nonlinea componen o he Time-domain changes be ween The e e ence and he i- h MWTW (ms) da Rela i e ampli ude changes be ween The e e ence and he i- h MWTW (%) dN L a Rela i e nonlinea ampli ude changes A e no malising he e e ence And he i- h MWTW (%) Speci ically p oposed in his wo k dw Signed e sion o he P e iously p oposed d u w * (ms) d w , cHea a e co ec ed e sion o dw (ms) (b)(a) Figu e3. Sca e plo showing he alues o bo h d w panel (a) and ˆ dw , c panel(b) wi h espec o  RR o a gi en pa ien in PCA app oach. Spea man’s co ela ion coe icien s ( ρ ) and p- alues o bo h d w and ˆ dw , c a e shown on op o each panel, while he leas -squa e i ing eg ession lines a e plo ed in ed. Ϳ Vol.:(0123456789) Ƥ | (2021) 11:3883 | ǣȀȀǤȀͷͶǤͷͶ͹;ȀͺͷͻͿ;ǦͶ͸ͷǦ;͸Ϳ͹ͻǦͻ www.na u e.com/scien i ic epo s/ being [ K+]h he concen a ion a he h- h hou du ing he HD and [ K+] he concen a ion a he end o he ea men . An example o he [K+](h ) e olu ion is shown in Fig.5a (pu ple diamonds). Ǥ Resul s a e p esen ed as median and in e qua ile ange (IQR). Spea man ank co - ela ion coe icien ( ρ ) and Pea son co ela ion ( ) we e used o co ela ion analysis be ween [K+ ] and he p oposed bioma ke , gi ing in o ma ion abou bo h he mono onic ela ion and he s eng h o he associa ion be ween he ime wa ping based bioma ke s and [ K+ ] changes and hen p o iding a mo e comple e cha ac e i- sa ion. The a e age du a ion o he ECG eco dings was 44 h mainly due o elec ode de achmen o ea ly ba - e y exhaus ion. Fo his eason, co ela ion coe icien s we e compu ed using he i s i e alues o [K+](h ) h oughou he HD and he wa ping ma ke s e alua ed a he co esponding i- h segmen poin s ( h=(i−1) /2 whe e i=1, 3, 5, 7, 9 o i=1, 3, 5, 7, 8 depending on he HD du a ion). All s a is ical analyses we e pe o med using MATLAB e sion R2018b.  In his s udy, ECG signals and [ K+ ] om 29 ESRD-HD pa ien s we e in es iga ed. An example o d w and ˆ dw , c ime e olu ion o a pa icula pa ien , in PCA app oach, was p o ided in Fig.3.  RR was ep esen ed on he x-axis in bo h panels, while d w and ˆ dw , c we e shown on he y-axis in panel (a) and panel (b), espec i ely. The leas -squa e i ing line ( ed line) was depic ed in bo h panels. Spea man’s co ela ion coe icien s ( ρ ) and p- alues we e also showed in each panel. High and signi ican co ela ion ( ρ=−0.9 0 and p- alue < 0.00 1 ) was ound be ween  RR and d w . Howe e , a e co ec ing o he HR-dependency, ρ=0.0 3 and p- alue =0.7 6 . Co ela ion be ween [ K+ ] and mean HR exp essed in bea s pe minu e (bpm) ha e also been compu ed and he esul s a e p esen ed in Table2, wi h a Spea man’s co ela ion coe icien median (IQR) alues o 0.10 (1.35), and a median p- alue o p=0.33. These alues we e 0.09 (1.45), p = 0.22 o Pea son’s co ela ion coe icien . Table4 shows he in a-pa ien Spea man’s ( ρ ) and Pea son’s ( ) co ela ion coe icien s compu ed be ween he ela i e a ia ions in [ K+ ] (deno ed as [K+ ] ) wi h espec o a e e ence [ K+ ] ha was aken a he end o he HD and he ime-wa ping pa ame e s. In bo h single-lead and PCA app oaches, he highes median Spea man’s and Pea son’s co ela ion coe icien s we e ound o du w , d w and dw , c being ρ≥0.8 2 and ≥0.8 6 o single-lead analysis and ρ≥0.8 2 and ≥0.8 9 in PCA. Boxplo s in Fig.4 show he dis ibu ions o [K+ ] and he p oposed PCA-based ime-wa ping desc ip o s du ing HD. Figu e5b shows he a e age ime e olu ion o PCA-based du w , d w , ˆ dw , c and dNL w in he s udied popula- ion along he moni o ing pe iod, while he e olu ion o d a and dNL a is shown Fig.5c.  Repola iza ion abno mali ies play a undamen al ole in he genesis o a hy hmic e en s and he isk inc eases in pa ien s a ESRD wi h imbalance in [ K+ ] 41. In his wo k, wo p e iously epo ed po assium es ima o s, Tw 14 and T S / A15, ou wa ping-based ECG-de i ed bioma ke s o [ K+ ] moni o ing p oposed in Ramí ez e al.17, du w , d a , dNL w , dNL a , and he he e p oposed modi ied e sions d w and dw , c we e es ed as bloodless indices o [ K+ ] a ia ions in ESRD-HD pa ien s compu ed om s anda d leads as well as in a PCA-de i ed lead. The mos p omising esul s in e ms o co ela ion we e ob ained o ma ke s du w , d w , and dw , c , leading o he highes median in a-pa ien ρ≥0.8 2 and ≥0.8 7 in single-lead and ρ≥0.8 2 and ≥0.8 9 in PCA lead espec i ely, e idencing high mono onic and linea associa ion wi h [ K+ ] and making hem a p omising non-in asi e indices o blood [ K+ ] moni o ing. The signed bioma ke d w ollowed a simila ime-cou se as he unsigned du w du ing he whole moni o ing pe iod, showing a simila dis ibu ion in Fig.5a, as a esul o he ac ha he sign compu ed as in (5) is posi- i e in oughly all he pa ien s. Tha can be explained by he ac ha he T-wa e mo phology in hype kalemia is usually mo e peaked and sho e in ime han a T-wa e om egula [ K+ ] concen a ions, as happens a he end o HD, whe e he e e ence has been aken42,43. The e o e, all he o he MWTWs needed o be sh unk in ampli ude and widened in ime du a ion du ing he wa ping p ocedu e o i he e e ence one, and his is gi en by a posi i e signed d w . Howe e , o he ex e nal ac o s, such as he po assium emo al a es44 o he dialysa e po assium le el45,46, migh also ha e played a ole in al e ing en icula epola iza ion ac i i y. The wa ping algo i hm is applied o e he MWTWs compu ed om di e en obse ing windows wi h di e - en HRs, as is e iden in Fig.5a. The e o e, a co ec ed e sion o he d w , de i ed simila ly o he QT co ec ion o mula38,39, was p oposed since he HR in luences his ma ke as poin ed ou in Ramí ez e al.17, and can be obse ed in Fig.5a as an example a ound hou s h = 9, 12 and 43. A la ge numbe o models ha e been p oposed o he compu a ion o QTc alues independen o HR37–40. Howe e , a p e ious s udy38 ound ha he linea eg ession model i s be e han any o he model o he ela ionship be ween QT and he RR in e als. Also, o small RR a ia ions, in sec ion “Hea - a e-co ec ed T-wa e wa ping” i is shown ha hype bolic QT o RR dependency becomes linea . The e o e, we used a linea model o de i e an HR-co ec ed index, dw , c . This app oach was used o es ima e he d w componen s ic ly ela ed o [ K+ ] emo ing i s ela ion wi h HR as showed in Fig.3, whe e he HR-dependency, clea ly isible in panel (a), was cancelled a e he co ec ion, panel (b). Compa ing he esul s o du w , d w and ˆ dw , c , all o hem ha e p o ed o be highly co ela ed wi h [ K+ ] a ia ions. Howe e , i is impo an o emembe ha du w (and so d w ) is biased by he HR e ec s as p e iously desc ibed17, while ˆ dw , c is no longe dependen on i , possibly being esponsible o he lowe IQR in he co ela ion, 0.25, as compa ed o 0.35 and 0.36 o d w and du w , espec i ely (see Table4, PCA column). I should also be no ed ha he small di e ences be ween he ρ and compu ed o ˆ dw , c and d w could be due o he low HR a ia ions (23) [K+] ( h ) = ( [K+] h −[K+] )