Пример #1
0
        /// <summary>
        /// Scan No,Charge,Peptide Seq, MaxMz,Y1Mz,Y1Intensity,Y2Mz,Y2Intensity,Y3Mz,Y3Intensity,Y4Mz,Y4Intensity
        /// </summary>
        /// <returns></returns>
        public List<string> Process(int argMissCleavage)
        {
            List<string> result = new List<string>();
            AminoAcidMass AAMW = new AminoAcidMass();
            foreach (ProteinInfo p in _pInfo)
            {
                p.CreateCleavage(argMissCleavage);
                List<string> Glycopeptide = p.Glycopeptide(0);
                foreach (string Pep in Glycopeptide)
                {
                    for (int i = 0; i <= 2; i++)
                    {
                        float PeptideMass = AAMW.GetMonoMW(Pep, true);
                        List<float> Peakmz = GetPeakCluster(PeptideMass, _scan.ParentCharge - i);
                        List<int> ClosePeakIdx = new List<int>();
                        int foundpeak = 0;
                        double MaxIntensity = 0.0;
                        double MaxMz = 0.0;
                        foreach (float peak in Peakmz)
                        {
                            int closepeakidx = MassUtility.GetClosestMassIdx(_scan.MSPeaks,peak);
                            ClosePeakIdx.Add(closepeakidx);
                            if (MassUtility.GetMassPPM(peak, _scan.MSPeaks[closepeakidx].MonoMass) < _torelance)
                            {
                                if (_scan.MSPeaks[closepeakidx].MonoIntensity > MaxIntensity)
                                {
                                    MaxIntensity = _scan.MSPeaks[closepeakidx].MonoIntensity;
                                    MaxMz = _scan.MSPeaks[closepeakidx].MonoMass;
                                }
                                foundpeak++;
                            }
                        }
                        if (foundpeak >= 3)
                        {
                            string tmp = _scan.ScanNo + "," + Convert.ToString(_scan.ParentCharge - i) + "," + Pep + "," + MaxMz.ToString() + ",";
                            for (int j = 0; j < 4; j++)
                            {
                                if (MassUtility.GetMassPPM(_scan.MSPeaks[ClosePeakIdx[j]].MonoMass, Peakmz[j]) < _torelance)
                                {
                                    tmp = tmp + _scan.MSPeaks[ClosePeakIdx[j]].MonoMass + "," + (_scan.MSPeaks[ClosePeakIdx[j]].MonoIntensity / MaxIntensity) + ",";
                                }
                                else
                                {
                                    tmp = tmp + ",,";
                                }
                            }
                            result.Add(tmp);
                        }
                    }

                }
            }
            return result;
        }
Пример #2
0
 private void btnGetPeptideMass_Click(object sender, EventArgs e)
 {
     AminoAcidMass AAMS = new AminoAcidMass();
     lblPeptideMass.Text = "       Mass:" + AAMS.GetMonoMW(txtPeptideSeq.Text, chkCYS_CAM.Checked) + "\nAvg Mass:" +
                           AAMS.GetAVGMonoMW(txtPeptideSeq.Text, chkCYS_CAM.Checked);
 }