Extracting clinically relevant information from pulse oximetry traces