Beispiel #1
0
        public void SelectTargetsAndDecoys(out ScoredGroupPeaksSet targetScoredGroupPeaksSet, out ScoredGroupPeaksSet decoyScoredGroupPeaksSet)
        {
            targetScoredGroupPeaksSet = new ScoredGroupPeaksSet();
            decoyScoredGroupPeaksSet  = new ScoredGroupPeaksSet();
            foreach (var scoredGroupPeaks in _scoredGroupPeaksList)
            {
                var secondHighestPeak = scoredGroupPeaks.SecondHighestPeak;
                if (!secondHighestPeak.IsEmpty)
                {
                    var decoyScoredGroupPeaks = new ScoredGroupPeaks();
                    decoyScoredGroupPeaks.Add(secondHighestPeak);
                    decoyScoredGroupPeaksSet.Add(decoyScoredGroupPeaks);
                }

                // Copy all other peaks to target.
                var targetScoredGroupPeaks = new ScoredGroupPeaks();
                foreach (var peak in scoredGroupPeaks.ScoredPeaks)
                {
                    if (!ReferenceEquals(peak.Features, secondHighestPeak.Features))
                    {
                        targetScoredGroupPeaks.Add(peak);
                    }
                }
                targetScoredGroupPeaksSet.Add(targetScoredGroupPeaks);
            }
        }
Beispiel #2
0
        public void SelectTargetsAndDecoys(out ScoredGroupPeaksSet targetScoredGroupPeaksSet, out ScoredGroupPeaksSet decoyScoredGroupPeaksSet)
        {
            targetScoredGroupPeaksSet = new ScoredGroupPeaksSet();
            decoyScoredGroupPeaksSet  = new ScoredGroupPeaksSet();
            foreach (var scoredGroupPeaks in _scoredGroupPeaksList)
            {
                var secondHighestPeak = scoredGroupPeaks.SecondHighestPeak;
                if (secondHighestPeak != null)
                {
                    var decoyScoredGroupPeaks = new ScoredGroupPeaks();
                    decoyScoredGroupPeaks.Add(secondHighestPeak);
                    decoyScoredGroupPeaksSet.Add(decoyScoredGroupPeaks);
                }

                // Copy all other peaks to target.
                var targetScoredGroupPeaks = new ScoredGroupPeaks();
                foreach (var peak in scoredGroupPeaks.ScoredPeaks)
                {
                    if (peak != secondHighestPeak)
                    {
                        targetScoredGroupPeaks.Add(peak);
                    }
                }
                targetScoredGroupPeaksSet.Add(targetScoredGroupPeaks);
            }
        }
Beispiel #3
0
 public ScoredGroupPeaksSet(IEnumerable <IList <float[]> > groupList)
 {
     foreach (var group in groupList)
     {
         var scoredGroupPeaks = new ScoredGroupPeaks();
         foreach (var features in group)
         {
             scoredGroupPeaks.Add(new ScoredPeak(features));
         }
         _scoredGroupPeaksList.Add(scoredGroupPeaks);
     }
 }
Beispiel #4
0
 public ScoredGroupPeaksSet(IEnumerable <IList <float[]> > groupList, int capacity)
 {
     _scoredGroupPeaksList = new List <ScoredGroupPeaks>(capacity);
     foreach (var group in groupList)
     {
         var scoredGroupPeaks = new ScoredGroupPeaks(group.Count);
         foreach (var features in group)
         {
             scoredGroupPeaks.Add(new ScoredPeak(features));
         }
         _scoredGroupPeaksList.Add(scoredGroupPeaks);
     }
 }