コード例 #1
0
 public void Match(IIdentifiedPeptideResult sr)
 {
     foreach (IMatcher matcher in matchers)
     {
         matcher.Match(sr);
     }
 }
コード例 #2
0
        public void Match(IIdentifiedPeptideResult sr)
        {
            List <MatchedPeak> expPeaks = sr.ExperimentalPeakList;

            double minIntensity = sr.ExperimentalPeakList.FindMaxIntensityPeak().Intensity *minIntensityScale;

            MatchedPeakUtils.Match(expPeaks, sr.GetIonSeries()[ionType], mzTolerance, minIntensity);
        }
コード例 #3
0
        public void Draw(Graphics g2, Rectangle rec, IIdentifiedPeptideResult sr)
        {
            g2.CompositingQuality = CompositingQuality.HighQuality;
            g2.SmoothingMode      = SmoothingMode.AntiAlias;
            g2.TextRenderingHint  = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit;

            Rectangle newRec = new Rectangle(rec.Left + 60, rec.Top, rec.Width - 80, rec.Height - 50 - bigFont.Height);

            Pen blackPen = new Pen(Color.Black, 1);

            Rectangle spectrumRec = GetSpectrumRectangle(g2, sr.ExperimentalPeakList, newRec);

            var maxMz =
                (from peak in sr.ExperimentalPeakList
                 orderby peak.Mz descending
                 select peak.Mz).FirstOrDefault();

            double maxMzWidth = ((int)maxMz / 100 + 1) * 100.0;

            int yFontShift = (int)(g2.MeasureString("M", bigFont).Height / 2);

            RectangleTransform rt = new RectangleTransform(spectrumRec, maxMzWidth, sr.ExperimentalPeakList.FindMaxIntensityPeak().Intensity);

            DrawXScale(g2, blackPen, spectrumRec, rt);

            DrawYScale(g2, blackPen, spectrumRec);

            foreach (MatchedPeak peak in sr.ExperimentalPeakList)
            {
                Brush brush;
                Pen   pen;
                if (peak.Matched)
                {
                    Color color = IonColorMap[peak.PeakType];
                    brush = new SolidBrush(color);
                    pen   = new Pen(brush);
                }
                else
                {
                    brush = Brushes.Black;
                    pen   = blackPen;
                }

                int x = rt.GetTransformX(peak.Mz);

                int y = rt.GetTransformY(peak.Intensity);

                g2.DrawLine(pen, new Point(x, spectrumRec.Bottom), new Point(x, y));

                if (peak.Matched)
                {
                    DrawVerticalIonName(g2, brush, x - yFontShift, y, peak.Information);
                }
            }
        }
コード例 #4
0
        public override void Match(IIdentifiedPeptideResult sr)
        {
            PeakList <MatchedPeak> peaks = sr.ExperimentalPeakList;

            double minBYNeutralLossIntensity = peaks.FindMaxIntensityPeak().Intensity *minBYNeutralLossIntensityScale;

            NeutralLossCandidates candidates = new NeutralLossCandidates(sr.Peptide);

            List <MatchedPeak> byNeutralLossPeaks = GetNeutralLossPeaks(sr.GetIonSeries(), sr.ExperimentalPeakList.PrecursorCharge, candidates);

            MatchedPeakUtils.Match(peaks, byNeutralLossPeaks, PeakMzTolerance, minBYNeutralLossIntensity);
        }
        public override void Match(IIdentifiedPeptideResult sr)
        {
            PeakList <MatchedPeak> peaks = sr.ExperimentalPeakList;

            double minBYNeutralLossIntensity = peaks.FindMaxIntensityPeak().Intensity *minBYNeutralLossIntensityScale;

            NeutralLossCandidates candidates = new NeutralLossCandidates(sr.Peptide);

            List <MatchedPeak> byPhosphoNeutralLossPeaks = GetPhosphoNeutralLossPeaks(sr, candidates);

            //byPhosphoNeutralLossPeaks.ForEach(m => Console.WriteLine(m.DisplayName + "," + m.Mz));

            MatchedPeakUtils.Match(peaks, byPhosphoNeutralLossPeaks, PeakMzTolerance, minBYNeutralLossIntensity);
        }
コード例 #6
0
        public override void Match(IIdentifiedPeptideResult sr)
        {
            NeutralLossCandidates candidates = new NeutralLossCandidates(sr.Peptide);

            List <INeutralLossType> nlTypes = GetNeutralLossTypes(candidates.CanLossWater, candidates.CanLossAmmonia);

            PeakList <MatchedPeak> expPeaks = sr.ExperimentalPeakList;

            List <MatchedPeak> nlPeaks = GetNeutralLossPeaks(IonType.PRECURSOR_NEUTRAL_LOSS, new MatchedPeak(expPeaks.PrecursorMZ, 0.0, expPeaks.PrecursorCharge), nlTypes, (m => true));

            //nlPeaks.ForEach(m => Console.WriteLine(m.DisplayName + "," + m.Mz));

            double minNeutralLossIntensity = expPeaks.FindMaxIntensityPeak().Intensity *minPrecursorNeutralLossIntensityScale;

            MatchedPeakUtils.Match(expPeaks, nlPeaks, PeakMzTolerance, minNeutralLossIntensity);
        }
        public List <MatchedPeak> GetPhosphoNeutralLossPeaks(IIdentifiedPeptideResult sr, NeutralLossCandidates candidates)
        {
            List <MatchedPeak> result = new List <MatchedPeak>();

            Dictionary <int, string> bModifiedPosition = GetPhosphoModificationPositionMapB(sr.Peptide);
            Dictionary <int, string> yModifiedPosition = GetPhosphoModificationPositionMapY(sr.Peptide);

            result.AddRange(GetPhosphoNeutralLossPeaks(sr.GetIonSeries()[IonType.B], IonType.B_NEUTRAL_LOSS_PHOSPHO, 1, bModifiedPosition, candidates.BLossWater, candidates.BLossAmmonia));
            result.AddRange(GetPhosphoNeutralLossPeaks(sr.GetIonSeries()[IonType.Y], IonType.B_NEUTRAL_LOSS_PHOSPHO, 1, yModifiedPosition, candidates.YLossWater, candidates.YLossAmmonia));

            if (sr.ExperimentalPeakList.PrecursorCharge > 1)
            {
                result.AddRange(GetPhosphoNeutralLossPeaks(sr.GetIonSeries()[IonType.B2], IonType.B_NEUTRAL_LOSS_PHOSPHO, 2, bModifiedPosition, candidates.BLossWater, candidates.BLossAmmonia));
                result.AddRange(GetPhosphoNeutralLossPeaks(sr.GetIonSeries()[IonType.Y2], IonType.B_NEUTRAL_LOSS_PHOSPHO, 2, yModifiedPosition, candidates.YLossWater, candidates.YLossAmmonia));
            }

            return(result);
        }
 public abstract void Match(IIdentifiedPeptideResult sr);