public static void GetRatio(SilacEvidence[] silacEvidence, bool[] invertSil, IsotopeMsmsEvidence[] isoEvidence,
                                    bool[] invertIso, RatioType type, out double ratio, out double normalizedRatio,
                                    out int count, out double dev, out int nOutliers, out double pval, int minRatioCount)
        {
            ratio           = 0;
            normalizedRatio = 0;
            count           = 0;
            pval            = 1;
            List <double> lra  = new List <double>();
            List <double> lnra = new List <double>();

            for (int i = 0; i < silacEvidence.Length; i++)
            {
                SilacEvidence se = silacEvidence[i];
                double        r  = se.GetRatio(type);
                if (r > 0 && !double.IsInfinity(r) && !double.IsNaN(r))
                {
                    lra.Add(invertSil[i] ? -Math.Log(r) : Math.Log(r));
                    lnra.Add(invertSil[i] ? -Math.Log(se.GetNormalizedRatio(type)) : Math.Log(se.GetNormalizedRatio(type)));
                    count++;
                }
            }
            for (int i = 0; i < isoEvidence.Length; i++)
            {
                IsotopeMsmsEvidence se = isoEvidence[i];
                double r = se.GetRatio(type);
                if (r > 0 && !double.IsInfinity(r) && !double.IsNaN(r))
                {
                    lra.Add(invertIso[i] ? -Math.Log(r) : Math.Log(r));
                    lnra.Add(invertIso[i] ? -Math.Log(se.GetNormalizedRatio(type)) : Math.Log(se.GetNormalizedRatio(type)));
                    count++;
                }
            }
            if (lra.Count >= minRatioCount)
            {
                ratio = ArrayUtil.Median(lra.ToArray());
            }
            if (lra.Count > 1 && lra.Count >= minRatioCount)
            {
                double dummy;
                new OneSampleTTest().Test(lnra.ToArray(), 0, out dummy, out pval, out dummy, out dummy);
            }
            if (lnra.Count > 0 && lnra.Count >= minRatioCount)
            {
                normalizedRatio = ArrayUtil.Median((lnra.ToArray()));
            }
            if (count < minRatioCount)
            {
                ratio           = double.NaN;
                normalizedRatio = double.NaN;
                dev             = double.NaN;
                nOutliers       = 0;
                pval            = double.NaN;
                return;
            }
            if (count > 1 && count >= minRatioCount)
            {
                List <double> lnvals = new List <double>();
                for (int i = 0; i < silacEvidence.Length; i++)
                {
                    SilacEvidence se = silacEvidence[i];
                    double        nr = se.GetNormalizedRatio(type);
                    if (nr > 0 && !double.IsInfinity(nr) && !double.IsNaN(nr))
                    {
                        double lnr = Math.Log(nr);
                        lnvals.Add(invertSil[i] ? -lnr : lnr);
                    }
                }
                for (int i = 0; i < isoEvidence.Length; i++)
                {
                    IsotopeMsmsEvidence se = isoEvidence[i];
                    double nr = se.GetNormalizedRatio(type);
                    if (nr > 0 && !double.IsInfinity(nr) && !double.IsNaN(nr))
                    {
                        double lnr = Math.Log(nr);
                        lnvals.Add(invertIso[i] ? -lnr : lnr);
                    }
                }
                NumUtil.CountOutliers(lnvals.ToArray(), out nOutliers);
                dev = 100 * Math.Sqrt(ArrayUtil.Variance(lnvals.ToArray()));
            }
            else
            {
                dev       = double.NaN;
                nOutliers = 0;
            }
            ratio           = Math.Exp(ratio);
            normalizedRatio = Math.Exp(normalizedRatio);
        }