OSA-weigher: an automated computational framework for identifying obstructive sleep apnea based on event phase segmentation