예제 #1
0
        public void GetMinAndMaxScanLCAndDriftTimeAndMSFeatureRep(
            out int scanLCMinimum, out int scanLCMaximum,
            out double driftTimeMinimum, out double driftTimeMaximum, out MSFeature msFeatureRep)
        {
            var msFeatureList = new List <MSFeature>();

            foreach (var imsMsFeature in imsMsFeatureList)
            {
                msFeatureList.AddRange(imsMsFeature.MSFeatureList);
            }

            var sortByScanLCQuery = (from msFeature in msFeatureList
                                     orderby msFeature.ScanLC
                                     select msFeature).ToList();

            scanLCMinimum = sortByScanLCQuery.First().ScanLC;
            scanLCMaximum = sortByScanLCQuery.Last().ScanLC;

            var sortByScanIMSQuery = (from msFeature in msFeatureList
                                      orderby msFeature.DriftTime
                                      select msFeature).ToList();

            driftTimeMinimum = sortByScanIMSQuery.First().DriftTime;
            driftTimeMaximum = sortByScanIMSQuery.Last().DriftTime;

            var sortByAbundanceQuery = from msFeature in msFeatureList
                                       orderby msFeature.Abundance descending
                                       select msFeature;

            msFeatureRep = sortByAbundanceQuery.First();
        }
예제 #2
0
 private void Recalculate(MSFeature msFeature)
 {
     if (msFeature.ScanLC < m_scanLCMinimum)
     {
         m_scanLCMinimum = msFeature.ScanLC;
     }
     if (msFeature.ScanLC > m_scanLCMaximum)
     {
         m_scanLCMaximum = msFeature.ScanLC;
     }
     if (msFeature.MassMonoisotopic < m_massMinimum)
     {
         m_massMinimum = msFeature.MassMonoisotopic;
     }
     if (msFeature.MassMonoisotopic > m_massMaximum)
     {
         m_massMaximum = msFeature.MassMonoisotopic;
     }
 }
예제 #3
0
 public void AddMSFeature(MSFeature msFeature)
 {
     MSFeatureList.Add(msFeature);
 }
예제 #4
0
 public void AddMSFeature(MSFeature msFeature)
 {
     // m_msFeatureList.Add(msFeature);
     Recalculate(msFeature);
 }