The problem is about how to calculate AHI using the annotation files of PSG in SHHS.
The definition of AHI should be (the total number of Apnea events and Hypopnean events)/total sleep time*60.
Using No.200155 in SHHS1 as an example, the total number of Apnea events and Hypopnean events is 172 (none occurs at the wake stage), and the total sleep time (slpprdp) shown in the file is 128min. 172/128*60=80.625>>ahi_a0h3=36.5 given by the dataset.
In my understanding, the Hypopnean events scored in the profusion file is at a SpO2 desaturation>=2%, and I know ahi_a0h3 is at a SpO2 desaturation>=3%. How can I classify the SpO2 desaturation of Hypopnean events in the profusion file? Is the line of "Desaturation" show the % of SpO2 desaturation? and is the row of SpO2 desaturation under the Hypopnean events show the corresponding SpO2 desaturation?
If so, I removed all the Hypopnean events with SpO2 desaturation lower than 2%, then there still 132 events remained. 132/128*60=62.8 still >> 36.5.
I really confused about this problem. I hope anyone could help me to solve it.
This is a challenge, especially in SHHS. There are noteworthy issues with the XML annotation files as described on this documentation page. Particularly, the SpO2 desaturation annotations and linking with respiratory events were affected due to version changes in the Profusion scoring and exporting software over time.
The line "Desaturation" is supposed to tell you the level of the associated desaturation, though this indication will be unreliable in SHHS (due to known issues).
There is another variable in the dataset, "rdi0p", which should give you a total event (i.e. all apneas and all hypopneas) index. The value for subject 200155 is 77.8, which is 166 total events. Some events may not be counted by the scoring software due to starting or ending in wake.
If you want to pursue this further our suggestion is to implement your own desaturation detection algorithm to recreate the SHHS SpO2 desaturation events and linking with respiratory events. We have done some work on this ourselves, though we aren't actively preparing those data for release.
Thanks for checking out the resource.
We're trying to sync respiratory events, O2 desats and HR data from the SHHS and having a similar issue, so I was wondering if you could help with a couple of questions.
Firstly, I saw in another forum thread (https://sleepdata.org/forum/ahi-definition-in-shhs/1#comment-677) that ahi_ah03a was created at a later date with hypopneas only being counted at a 3% desaturation threshold. How did the software calculate this if the O2 desaturation annotations are incorrect? It seems from your comments that there's no way to get a list of hypopneas with a 3% or 4% desat (only the overall AHI for each)?
Secondly, I see above that "SpO2 desaturation annotations and linking with respiratory events were affected". Do you know if they were shifted in a linear fashion? i.e. SpO2 desats are all 30s later. Or were they randomly affected/unlinked to the events? (if shifted in a linear fashion, would be fairly easy for us to correct the times).
Finally, although the O2 desat in the XML files may be incorrect, are the respiratory events in the XML annotations correct? Or more specifically, do their start times match up correctly with the EDF files? Or were the respiratory event times also affected by the software changes over time?
Essentially we want to see if respiratory events (our definition of RE = any apneas + hypopneas resulting in a 4% desaturation or arousal) result in HR changes. If I am understanding the known issues correctly, we would have to: 1) create an O2 desaturation algorithm from the EDF data to accurately link to respiratory events, thus allowing us to remove "false" hypopneas (i.e. <4% desat), 2) then use our program to see if respiratory events result in HR changes. However, if the respiratory event times are also desynchronized from the EDF files (and thus HR) this would make the analysis incorrect and would require us to re-score the EDFs.
Any insight into the above would be greatly appreciated! Thanks for your time.
Joel (Research Assistant working for Dr Sankari)
Thanks for your inquiry. Your course of action is exactly what I would recommend. We believe the respiratory event annotations and timestamps are generally correct.
The "ahi_a0h3a" variable was computed from a set of component variables that were output soon after the original scoring of the study (i.e. between 1995-2005 for SHHS1/SHHS2). These component variables should be more intact than the XML annotation exports, which were done many years after in a different version of the Profusion software. Hence, we have a component variable that tells us "# of hypopneas with >=4% desaturation", instead of having to try and recompute this tally from the underlying XML file, which we know for certain has degraded SpO2 information, so to speak.
I seem to recall discussion about the SpO2 desaturations being shifted 30 seconds, though I can't say for certain. Regardless, our suggestion is to "re-detect" the SpO2 desaturations and align/link them with the scored respiratory events for analyses like the one you describe.
Good luck and stay well!
Thank you so much~