예제 #1
0
        public void Validate(IEnumerable <IsobaricItem> items)
        {
            List <double> logratio = new List <double>();

            foreach (var item in items)
            {
                var r1 = refFunc1.GetValue(item);
                var r2 = refFunc2.GetValue(item);

                item.Valid = r1 > ITraqConsts.NULL_INTENSITY && r2 > ITraqConsts.NULL_INTENSITY;
                if (item.Valid)
                {
                    logratio.Add(Math.Log(r1 / r2));
                }
            }

            if (logratio.Count > 1)
            {
                MeanStandardDeviation acc = new MeanStandardDeviation(logratio);
                var nd = new Normal(acc.Mean, acc.StdDev);
                foreach (var item in items)
                {
                    if (item.Valid)
                    {
                        var r1   = refFunc1.GetValue(item);
                        var r2   = refFunc2.GetValue(item);
                        var logr = Math.Log(r1 / r2);
                        item.ValidProbability = nd.TwoTailProbability(logr);
                        item.Valid            = item.ValidProbability >= minProbability;
                    }
                }
            }
        }
 public void Validate(IEnumerable <IsobaricItem> items)
 {
     foreach (var item in items)
     {
         item.Valid = refFunc.GetValue(item) > ITraqConsts.NULL_INTENSITY;
     }
 }