コード例 #1
0
        public ChromDataPeakList FilterToIndices(ISet <int> indexes)
        {
            if (indexes.Count == 0)
            {
                return(EMPTY);
            }
            var newPeaks = this.Cast <ChromDataPeak>().Select((peak, index) => Tuple.Create(peak, index))
                           .Where(tuple => indexes.Contains(tuple.Item2))
                           .ToArray();
            var chromDataPeakList = new ChromDataPeakList(newPeaks[0].Item1);

            for (int i = 1; i < newPeaks.Length; i++)
            {
                chromDataPeakList.Add(newPeaks[i].Item1);
            }
            return(chromDataPeakList);
        }
コード例 #2
0
 /// <summary>
 /// Set this peak based on another best peak for a peak group
 /// </summary>
 public void SetBestPeak(PeptideChromDataPeak peakBest, int indexSet)
 {
     PeakGroup = Data.SetBestPeak(PeakGroup, peakBest, indexSet);
 }
コード例 #3
0
 public PeptideChromDataPeak(ChromDataSet data, ChromDataPeakList peakGroup)
 {
     Data      = data;
     PeakGroup = peakGroup;
 }