コード例 #1
0
        public void GetEmpiricalFormulaForPeptideSequenceTest1()
        {
            var utils = new PeptideUtils();

            var testSequence1 = "SAMPLER";
            var testSequence2 = "GRDIESLYSR";
            var testSequence3 = "ANKYLSRRH";
            var testSequence4 = "ARNDCEQGHILKMFPSTWYV";

            Assert.AreEqual("C33H58N10O11S", utils.GetEmpiricalFormulaForPeptideSequence(testSequence1));
            Assert.AreEqual(802.40071m, (decimal)Math.Round(utils.GetMonoIsotopicMassForPeptideSequence(testSequence1), 5));
            Assert.AreEqual(1194.59929m, (decimal)Math.Round(utils.GetMonoIsotopicMassForPeptideSequence(testSequence2), 5));

            Assert.AreEqual("C107H159N29O30S2", utils.GetEmpiricalFormulaForPeptideSequence(testSequence4));


            Console.WriteLine(utils.GetEmpiricalFormulaForPeptideSequence(testSequence3));

            //note: masses were also confirmed at MacCoss's site: http://proteome.gs.washington.edu/cgi-bin/aa_calc.pl
        }
コード例 #2
0
        public void GetEmpiricalFormulaForPeptideSequenceTest2()
        {
            var utils = new PeptideUtils();

            var testSequence1 = "IPNFWVTTFVNHPQVSALLGEEDEEALHYLTR";

            var testSequence2 = "K.IPNFWVTTFVNHPQVSALLGEEDEEALHYLTR*.V";


            var empiricalFormula1 = utils.GetEmpiricalFormulaForPeptideSequence(testSequence1);

            var empiricalFormula2 = utils.GetEmpiricalFormulaForPeptideSequence(testSequence2);


            Assert.AreEqual(empiricalFormula1, empiricalFormula2);
            Assert.AreEqual((decimal)Math.Round(utils.GetMonoIsotopicMassForPeptideSequence(testSequence1), 5), (decimal)Math.Round(utils.GetMonoIsotopicMassForPeptideSequence(testSequence2), 5));
        }
コード例 #3
0
        public void TempTest1()
        {
            var code = "FEQDGENYTGTIDGNMGAYAR";

            var peptideUtils = new PeptideUtils();

            var empiricalFormula = peptideUtils.GetEmpiricalFormulaForPeptideSequence(code);

            var monomass = peptideUtils.GetMonoIsotopicMassForPeptideSequence(code);

            var mztheo = monomass / 2 + DeconTools.Backend.Globals.PROTON_MASS;

            Console.WriteLine(monomass + "\t" + mztheo);


            var formula = EmpiricalFormulaUtilities.ParseEmpiricalFormulaString("H(3) C(2) N O");

            var revisedFormula = EmpiricalFormulaUtilities.GetEmpiricalFormulaFromElementTable(formula);


            var iodoMass = EmpiricalFormulaUtilities.GetMonoisotopicMassFromEmpiricalFormula(revisedFormula);

            Console.WriteLine("iodomass= " + iodoMass);
        }