예제 #1
0
        public void getN15IsotopicProfileTest1()
        {
            var isIt = isotopicDistributionCalculator.IsSetToLabeled;


            var utils = new PeptideUtils();
            //string formula = utils.GetEmpiricalFormulaForPeptideSequence("SAMPLERPAMPLERSAMPLERPAMPLERSAMPLERPAMPLERSAMPLERPAMPLER");
            var formula = utils.GetEmpiricalFormulaForPeptideSequence("SAMPLERPAMPLERSAMPLERPAMPLER");



            var numNitrogens = utils.GetNumAtomsForElement("N", formula);


            var iso1 = isotopicDistributionCalculator.GetIsotopePattern(formula);

            PeakUtilities.TrimIsotopicProfile(iso1, 0.001);

            TestUtilities.DisplayIsotopicProfileData(iso1);

            isotopicDistributionCalculator.SetLabeling("N", 14, 0.02, 15, 0.98);

            var iso2 = isotopicDistributionCalculator.GetIsotopePattern(formula);

            //PeakUtilities.TrimIsotopicProfile(iso2, 0.001);

            isotopicDistributionCalculator.ResetToUnlabeled();
            var iso3 = isotopicDistributionCalculator.GetIsotopePattern(formula);

            PeakUtilities.TrimIsotopicProfile(iso3, 0.001);


            Console.WriteLine();
            TestUtilities.DisplayIsotopicProfileData(iso2);


            for (var i = 0; i < iso1.Peaklist.Count; i++)
            {
                Assert.AreEqual((decimal)Math.Round(iso1.Peaklist[i].Height, 4), (decimal)Math.Round(iso3.Peaklist[i].Height, 4));
            }

            Console.WriteLine();
            TestUtilities.DisplayIsotopicProfileData(iso3);

            Console.WriteLine("Num nitrogens= " + numNitrogens);
        }
예제 #2
0
        public IsotopicProfile GetN15IsotopicProfile2(TargetBase mt, double lowPeakCutoff)
        {
            Check.Require(mt != null, "Mass tag not defined");
            Check.Require(mt.IsotopicProfile != null, "Mass tag's theor isotopic profile not defined");
            Check.Require(mt.ChargeState != 0, "Can't have a charge state of '0'");

            var nitrogenCount = mt.GetAtomCountForElement("N");

            _isotopicDistributionCalculator.SetLabeling("N", N14ISOTOPE_NUMBER, this.N14LabelingAmount, N15ISOTOPE_NUMBER, this.N15LabelingAmount);
            var labeledTheorProfile = _isotopicDistributionCalculator.GetIsotopePattern(mt.EmpiricalFormula);

            addMZInfoToTheorProfile(mt.IsotopicProfile, labeledTheorProfile, nitrogenCount, mt.ChargeState);

            _isotopicDistributionCalculator.ResetToUnlabeled();

            PeakUtilities.TrimIsotopicProfile(labeledTheorProfile, lowPeakCutoff);

            labeledTheorProfile.ChargeState = mt.ChargeState;

            return(labeledTheorProfile);
        }