public static int GetPloidy(PloidyInfo referencePloidy, string chrom, int start, int end, int defaultPloidy = 2)
        {
            if (referencePloidy == null)
            {
                return(defaultPloidy);
            }

            CanvasSegment segment = new CanvasSegment(chrom, start, end, new List <float>());

            return(referencePloidy.GetReferenceCopyNumber(segment));
        }
        private bool IsPassVariant(CanvasSegment segment, PloidyInfo ploidyInfo)
        {
            if (!segment.Filter.IsPass)
            {
                return(false);
            }
            var referenceCopyNumber = ploidyInfo?.GetReferenceCopyNumber(segment) ?? 2;

            if (segment.CopyNumber != referenceCopyNumber)
            {
                return(true);
            }
            if (segment.CopyNumber == 2 && segment.MajorChromosomeCount == 2)
            {
                return(true);                                                              //LOH
            }
            return(false);
        }