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); }
/// <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); }
public PeptideChromDataPeak(ChromDataSet data, ChromDataPeakList peakGroup) { Data = data; PeakGroup = peakGroup; }