A detailed description of an application of the pNNx algorithm can be found in:
Mietus JE, Peng C-K, Henry I, Goldsmith RL, Goldberger AL. The pNNx files: re-examining a widely used heart rate variability measure. Heart 88:378-380; 2002.
Please cite this publication when referencing this material, and also include the standard citation for PhysioNet:
Goldberger AL, Amaral LAN, Glass L, Hausdorff JM, Ivanov PCh, Mark RG, Mietus JE, Moody GB, Peng C-K, Stanley HE. PhysioBank, PhysioToolkit, and PhysioNet: Components of a New Research Resource for Complex Physiologic Signals. Circulation 101(23):e215-e220 [Circulation Electronic Pages; http://circ.ahajournals.org/cgi/content/full/101/23/e215]; 2000 (June 13).
The pNN50 statistic is a time domain measure of heart rate variability (HRV) derived from a study by Ewing and colleagues , who introduced the NN50 count, defined as the mean number of times per hour in which the change in consecutive normal sinus (NN) intervals exceeds 50 milliseconds. The authors proposed this measure to help assess parasympathetic (vagal) activity from 24 hour ECG recordings.
Subsequently, Bigger and colleagues  introduced
The pNN50 statistic, however, is only one member of a family of statistics, designated here as pNNx, where x > 0 ms. Computing pNNx with x < 50 ms in both long and short term recordings may provide more robust discrimination between groups than the standard pNN50 statistic.
In , we applied the pNNx method to previously acquired RR interval data for 155 subjects. Comparisons were made between:
The results of these comparisons, as described in , showed better discrimination between groups when using values of x significantly less than the traditional 50 milliseconds.
The original data used for this study are available here (as a 17 MB tarball, pnnx-rr-orig.tar.gz). These data can be analyzed with either the original or current versions of the software used for this study to replicate the results reported in . The original data include over 10 million beat labels; as errors are found, they are corrected in the on-line copies of the data. In comparison with the original software, the current version incorporates additional input checking, a user interface that more closely matches that of other PhysioToolkit software, dynamic rather than static input array allocation (so that input series of any length can be accommodated, up to the limit of available system memory), and a faster and more robust sorting algorithm.
The pNNx software package expands the analysis capabilities of
the widely used pNN50 measure, providing researchers with the flexibility
to test various thresholds for optimal discrimination of HRV in populations
Obtaining the pNNx software
The pNNx software package consists of a Makefile,
the pNNx shell script, and the pnnlist.c source code.
The pnnlist code is also separately available as prebuilt binaries for
GNU/Linux, Mac OS/X, MS-Windows and Solaris.
The pNNx software is written in portable C and can be compiled on any modern platform.
tar xfvz pNNx.src.tar.gzIf your version of tar doesn't support the z option, unpack the package in two steps:
gzip -d pNNx.src.tar.gz tar xfv pNNx.src.tar(You may also view or download the individual files.)
Precompiled binaries are available for several popular platforms:
The pNNx shell script reads a beat annotation file (either from a local copy or directly from the PhysioNet web server). It uses ann2rr (included in the WFDB Software Package) to create an annotation interval list, which is then passed to pnnlist for analysis.
The pnnlist program reads an annotation interval list, identifies the
consecutive NN intervals, and calculates the pNNx distribution from them.
This program prints each unique normal sinus to normal sinus (NN) interval
increment and the percentage of NN interval increments greater than that value.
Beat annotation files
Annotation files are the standard way of storing information about the locations (times of occurrence) and types of events that occur during the recordings available in PhysioBank. Beat annotation files are available for most of the PhysioBank records that include ECGs.
Annotation interval lists as used by pnnlist are in text format, consisting of two columns (intervals in seconds and annotations). Interval lists in this format can be prepared from beat annotation files using ann2rr. For example, the command
ann2rr -r nsrdb/16265 -a atr -A -i s8 -wcreates an interval list from the atr (reference) annotations for record 16265 of the MIT-BIH Normal Sinus Rhythm Database. (For details on this command, see ann2rr in the WFDB Applications Guide.) The first few lines of output from this command are:
0.00781250 | 0.39843750 N 0.60156250 N 0.60937500 N 0.60156250 N 0.62500000 N 0.60937500 N 0.62500000 N 0.59375000 N 0.60156250 N 0.61718750 N 0.61718750 N . . .Each N in the interval list indicates that a normal sinus beat occurs at the end of the corresponding interval. (The initial "|" marks a QRS-like artifact at the beginning of the recording. The first two intervals shown above are not used in the calculation of pNNx since they do not begin and end with N annotations.)
Both pNNx and pnnlist are text mode applications that must be run in a terminal window (under MS-Windows, a Command or Cygwin window). Read about how to use them below, or in Unix man page format here (also in man page source format here).
To run pNNx, type a command such as
pNNx -r nsrdb/16265 -a atrwhere nsrdb/16265 is the record name and atr is the annotator name of the beat annotation file you wish to study. (If you have not previously downloaded the annotation file into a local nsrdb directory, pNNx (via ann2rr) obtains the annotations directly from PhysioNet.)
To run pnnlist, open a terminal window (under MS-Windows, a Command window), and type a command such as
ann2rr -r nsrdb/16265 -a atr -A -i s8 -w | pnnlistAlternatively, you can save the output of ann2rr in a file, and then read the file with pnnlist, using commands such as:
ann2rr -r nsrdb/16265 -a atr -A -i s8 -w >16265.intervals pnnlist <16265.intervalsThis method can also be used if you have obtained an interval list from another source.
These commands will then print each unique NN interval increment in milliseconds along with the percentage of intervals greater than that value. All three of the examples above produce the same output; the first few lines are shown at left below, and plotted at right below:
0 89.2738 7.8125 69.4564 15.625 53.3662 23.4375 40.8539 31.25 31.4265 39.0625 24.1817 46.875 18.4763 54.6875 14.1261 62.5 10.7312 70.3125 8.06025 78.125 6.09401 85.9375 4.56975 93.75 3.47841 101.562 2.66896 . . .
pNNx -r nsrdb/16265 -a atr >16265.pNNx
In addition to the standard definition of pNNx given above, several variants
can also be obtained using pNNx and pnnlist.
Percent pNNx (ppNNx)
In this variant, each NN interval increment is expressed as a percentage of the first of the two intervals. This can be obtained by using the -p option with pNNx or pnnlist. For example,
pNNx -r nsrdb/16265 -a atr -pyields:
0 89.2738 0.564972 89.2728 0.574713 89.2718 0.581395 89.2708 0.584795 89.2698 0.588235 89.2688 0.591716 89.2658 0.598802 89.2637 0.60241 89.2617 0.606061 89.2577 . . .
In this variant, the positive and negative increment distributions are calculated separately. Specify this variant using the -s option with pNNx or pnnlist. For example,
pNNx -r nsrdb/16265 -a atr -syields:
-492.188 0 -390.625 0.00352566 -382.812 0.00528849 -359.375 0.00705132 -351.562 0.00881414 -343.75 0.010577 -328.125 0.0123398 -312.5 0.0141026 -304.688 0.0193911 -296.875 0.0229168 . . . 460.938 0.0187779 468.75 0.0150223 484.375 0.0131446 492.188 0.0112668 500 0.00938897 523.438 0.00751117 546.875 0.00563338 562.5 0.00375559 625 0.00187779 679.688 0
In addition to listing pNNx at each distinct NN increment value, pNNx and pnnlist can output results at specified increments using the -i option followed by the desired increment (in milliseconds). For example,
pNNx -r nsrdb/16265 -a atr -i 10yields:
0 89.2738 10 69.4564 20 53.3662 30 40.8539 40 24.1817 50 18.4763 60 14.1261 70 10.7312 80 6.09401 90 4.56975 . . .
When using pNNx, you may select a segment of the annotation file to be analyzed, using the -f (from) and -t (to) options, as in:
pNNx -r nsrdb/16265 -a atr -f 1:30:00 -t 4:30:00where the times following these options specify the start and end of the segment (in hours, minutes, and seconds from the beginning of the recording). These options are also accepted by ann2rr.
The sequence of steps involved in the computation of pNNx, as implemented by pnnlist, is as follows:
pNNx = 1 - NNx/NN0where NN0 is the total number of NN interval increments.
We gratefully acknowledge Dr. Phyllis Stein for her generous contribution of data.