Exemple #1
0
        private CorrelationItem ParseItem(List <IIdentifiedPeptide> list, string[] keys)
        {
            CorrelationItem result = new CorrelationItem();

            result.Values = new double[ClassificationSet.Count];
            for (int i = 0; i < result.Values.Length; i++)
            {
                result.Values[i] = 0;
            }

            for (int i = 0; i < keys.Length; i++)
            {
                var key    = keys[i];
                var values = ClassificationSet[key];
                foreach (var pep in list)
                {
                    if (values.Contains(pep.Spectrum.Query.FileScan.Experimental))
                    {
                        result.Values[i] += 1;
                    }
                }
            }

            return(result);
        }
Exemple #2
0
 private static void PrintCorrelationItem(StreamWriter sw, CorrelationItem vv)
 {
     sw.Write(vv.Name);
     foreach (var v in vv.Values)
     {
         sw.Write("\t{0}", v);
     }
     sw.WriteLine("\t{0:0.0000}", vv.Correlation);
 }