Ejemplo n.º 1
0
        public IResult Match(IGlycanPeak glycan, SortedDictionary <int, List <IPeak> > cluster)
        {
            List <SortedDictionary <int, IPeak> > clustered = Combinator(cluster);
            List <double> distr     = glycan.GetDistrib();
            double        maxScore  = -1;
            List <IPeak>  bestPeaks = new List <IPeak>();

            foreach (SortedDictionary <int, IPeak> sequence in clustered)
            {
                double score = Fit(distr, sequence);
                if (score >= maxScore)
                {
                    maxScore  = score;
                    bestPeaks = sequence.Select(s => s.Value).ToList();
                }
            }
            return(factory.Produce(glycan, maxScore, bestPeaks));
        }
Ejemplo n.º 2
0
 public IResult Produce(IGlycanPeak glycan, double score, List <IPeak> peaks)
 {
     return(new NGlycanResult(glycan, score, peaks));
 }
Ejemplo n.º 3
0
 public void SetGlycan(IGlycanPeak glycan)
 {
     this.glycan = glycan;
 }
Ejemplo n.º 4
0
 public NGlycanResult(IGlycanPeak glycan, double score, List <IPeak> peaks)
 {
     this.glycan = glycan;
     this.score  = score;
     this.peaks  = peaks;
 }