VEGA: Variational segmentation for copy number detection