public static float[] AggregateCounts(ref List<CanvasSegment> segments)
{
List<float> diploidCounts = new List<float>();
foreach (CanvasSegment segment in segments)
{
foreach (float count in segment.Counts)
diploidCounts.Add(count);
}
return diploidCounts.ToArray();
}