CanvasBin.CanvasBin.MeanFragmentSize C# (CSharp) Method

MeanFragmentSize() static private method

Estimate mean fragment length of read pairs.
static private MeanFragmentSize ( Int16[]>.Dictionary fragmentLengths ) : Int16
fragmentLengths Int16[]>.Dictionary
return System.Int16
        static Int16 MeanFragmentSize(Dictionary<string, Int16[]> fragmentLengths)
        {
            List<Int16> fragmentMeanLengths = new List<Int16>();

            foreach (KeyValuePair<string, Int16[]> kvp in fragmentLengths)
            {
                fragmentMeanLengths.Add(CanvasCommon.Utilities.NonZeroMean(kvp.Value));
            }
            return CanvasCommon.Utilities.NonZeroMean(fragmentMeanLengths.ToArray());
        }