public void getTheorIsotopicProfileXYDataTest1()
        {
            MassTag mt = new MassTag();

            mt.ID = 56488;
            mt.MonoIsotopicMass = 2275.1694779;
            mt.PeptideSequence  = "TTPSIIAYTDDETIVGQPAKR";
            mt.NETVal           = 0.3520239f;
            mt.CreatePeptideObject();
            mt.ChargeState = 2;

            Run run = new XCaliburRun();

            ResultCollection rc = new ResultCollection(run);

            rc.Run.CurrentMassTag = mt;

            Task theorGen = new TomTheorFeatureGenerator();

            theorGen.Execute(rc);

            mt.CalculateMassesForIsotopicProfile(mt.ChargeState);

            TestUtilities.DisplayIsotopicProfileData(mt.IsotopicProfile);

            XYData xydata = TheorXYDataCalculationUtilities.Get_Theoretical_IsotopicProfileXYData(mt.IsotopicProfile, 0.02);


            TestUtilities.DisplayXYValues(xydata);
        }
Exemple #2
0
        public void test1()
        {
            Run     run = new XCaliburRun(xcaliburTestfile);
            MassTag mt  = TestUtilities.GetMassTagStandard(1);

            PeakImporterFromText peakImporter = new DeconTools.Backend.Data.PeakImporterFromText(xcaliburPeakDataFile);

            peakImporter.ImportPeaks(run.ResultCollection.MSPeakResultList);

            run.CurrentMassTag = mt;

            Task theorFeatureGen = new TomTheorFeatureGenerator();

            theorFeatureGen.Execute(run.ResultCollection);


            int numPeaksForExtractingChrom = 3;
            int toleranceInPPM             = 25;

            IsotopicProfileMultiChromatogramExtractor multiChromExtractor = new IsotopicProfileMultiChromatogramExtractor(
                numPeaksForExtractingChrom, toleranceInPPM);

            List <int> ms1Levels = run.GetMSLevelScanValues();

            Dictionary <MSPeak, XYData> chromDataForIsotopicProfile = multiChromExtractor.GetChromatogramsForIsotopicProfilePeaks(run.ResultCollection.MSPeakResultList, run.CurrentMassTag.IsotopicProfile, true, ms1Levels);

            multiChromExtractor.SmoothChromatograms(chromDataForIsotopicProfile, new DeconTools.Backend.ProcessingTasks.Smoothers.DeconToolsSavitzkyGolaySmoother(11, 11, 2));
            XYData xydata1 = chromDataForIsotopicProfile.Values.First();
            XYData xydata2 = chromDataForIsotopicProfile.Values.ElementAt(1);
            XYData xydata3 = chromDataForIsotopicProfile.Values.ElementAt(2);



            TestUtilities.DisplayXYValues(xydata3);
        }
Exemple #3
0
        private clsMassTag convertDeconToolsMassTagToMultialignMassTag(MassTag mt)
        {
            clsMassTag multialignMassTag = new clsMassTag();

            multialignMassTag.Id              = mt.ID;
            multialignMassTag.Charge1FScore   = 0;
            multialignMassTag.Charge2FScore   = 0;
            multialignMassTag.Charge3FScore   = 0;
            multialignMassTag.ChargeState     = mt.ChargeState;
            multialignMassTag.CleavageState   = -1;
            multialignMassTag.DiscriminantMax = 0;
            //multialignMassTag.DriftTime = 0;
            multialignMassTag.HighPeptideProphetProbability = 0;
            multialignMassTag.Mass                 = mt.MonoIsotopicMass;
            multialignMassTag.ModCount             = -1;
            multialignMassTag.Modifications        = String.Empty;
            multialignMassTag.MSGFSpecProbMax      = 0;
            multialignMassTag.MSMSObserved         = mt.ObsCount;
            multialignMassTag.NetAverage           = mt.NETVal;
            multialignMassTag.NetPredicted         = -1;
            multialignMassTag.NetStandardDeviation = 0;
            multialignMassTag.Peptide              = mt.PeptideSequence;
            multialignMassTag.PeptideEx            = String.Empty;
            multialignMassTag.XCorr                = -1;

            return(multialignMassTag);
        }
Exemple #4
0
        public void test2()
        {
            MassTag massTag = new MassTag();

            massTag.ID = 56488;
            massTag.MonoIsotopicMass = 2275.1694779;
            massTag.ChargeState      = 3;
            massTag.MZ = massTag.MonoIsotopicMass / massTag.ChargeState + 1.00727649;


            Run run = new XCaliburRun(xcaliburTestfile);

            PeakImporterFromText peakImporter = new DeconTools.Backend.Data.PeakImporterFromText(xcaliburPeakDataFile);

            peakImporter.ImportPeaks(run.ResultCollection.MSPeakResultList);


            run.CurrentMassTag = massTag;

            Task peakChromGen = new PeakChromatogramGenerator(10);

            Task smoother = new DeconTools.Backend.ProcessingTasks.Smoothers.DeconToolsSavitzkyGolaySmoother(2, 2, 2);
            Task peakDet  = new DeconTools.Backend.ProcessingTasks.PeakDetectors.ChromPeakDetector();


            peakChromGen.Execute(run.ResultCollection);
            smoother.Execute(run.ResultCollection);
            peakDet.Execute(run.ResultCollection);

            TestUtilities.DisplayPeaks(run.PeakList);
            TestUtilities.DisplayXYValues(run.ResultCollection);
        }
        public void test1()
        {
            Run run = new XCaliburRun(xcaliburTestfile);

            List <MassTag> mass_tagList = TestUtilities.CreateTestMassTagList();
            MassTag        mt           = mass_tagList[0];

            run.CurrentScanSet = new ScanSet(9017, new int[] { 9010, 9017, 9024 });
            run.CurrentMassTag = mt;


            MSGeneratorFactory msgenFactory = new MSGeneratorFactory();
            Task msgen = msgenFactory.CreateMSGenerator(run.MSFileType);

            DeconToolsV2.Peaks.clsPeakProcessorParameters peakParams = new DeconToolsV2.Peaks.clsPeakProcessorParameters(2, 1.3, true, DeconToolsV2.Peaks.PEAK_FIT_TYPE.QUADRATIC);
            Task mspeakDet = new DeconToolsPeakDetector(peakParams);

            Task theorFeatureGen       = new TomTheorFeatureGenerator();
            Task targetedFeatureFinder = new BasicTFF(0.01);

            IsotopicProfileFitScoreCalculator fitScoreCalc = new IsotopicProfileFitScoreCalculator();

            msgen.Execute(run.ResultCollection);

            //run.XYData.Display();

            mspeakDet.Execute(run.ResultCollection);
            theorFeatureGen.Execute(run.ResultCollection);
            targetedFeatureFinder.Execute(run.ResultCollection);
            fitScoreCalc.Execute(run.ResultCollection);

            MassTagResultBase result = run.ResultCollection.GetMassTagResult(mt);

            TestUtilities.DisplayIsotopicProfileData(result.IsotopicProfile);
            Console.WriteLine("Fit val = " + result.IsotopicProfile.Score);

            /*
             *
             *
             * ------------------- MassTag = 24769---------------------------
             * monoMass = 2086.0595; monoMZ = 1044.0370; ChargeState = 2; NET = 0.452; Sequence = DFNEALVHQVVVAYAANAR
             *
             ****** Match ******
             ******NET =    0.452
             ******ChromPeak ScanNum = 9016.48992535631
             ******ChromPeak NETVal = 0.453
             ******ScanSet = { 9010, 9017, 9024, }
             ******Observed MZ and intensity = 1044.03290771556	1.269842E+07
             ******------------------------------ end --------------------------
             *
             *
             *
             *
             *
             */
        }
Exemple #6
0
        public void test3()
        {
            MassTag massTag = new MassTag();

            massTag.ID = 56488;
            massTag.MonoIsotopicMass = 2275.1694779;
            massTag.ChargeState      = 3;
            massTag.MZ     = massTag.MonoIsotopicMass / massTag.ChargeState + 1.00727649;
            massTag.NETVal = 0.3520239f;


            Run run = new XCaliburRun(xcaliburTestfile);
            ChromAlignerUsingVIPERInfo chromAligner = new ChromAlignerUsingVIPERInfo();

            chromAligner.Execute(run);


            PeakImporterFromText peakImporter = new DeconTools.Backend.Data.PeakImporterFromText(xcaliburPeakDataFile);

            peakImporter.ImportPeaks(run.ResultCollection.MSPeakResultList);


            run.CurrentMassTag = massTag;

            Task peakChromGen = new PeakChromatogramGenerator(20);

            Task smoother     = new DeconTools.Backend.ProcessingTasks.Smoothers.DeconToolsSavitzkyGolaySmoother(2, 2, 2);
            Task peakDet      = new DeconTools.Backend.ProcessingTasks.PeakDetectors.ChromPeakDetector();
            Task chromPeakSel = new DeconTools.Backend.ProcessingTasks.ChromPeakSelector(1, 0.1);

            MSGeneratorFactory msgenFactory = new MSGeneratorFactory();
            Task msgen = msgenFactory.CreateMSGenerator(run.MSFileType);



            peakChromGen.Execute(run.ResultCollection);
            smoother.Execute(run.ResultCollection);
            peakDet.Execute(run.ResultCollection);
            chromPeakSel.Execute(run.ResultCollection);


            Console.WriteLine("Now generating MS....");
            msgen.Execute(run.ResultCollection);
            Console.WriteLine("----------- RESULTS ----------------------\n");
            TestUtilities.DisplayPeaks(run.PeakList);


            MassTagResultBase massTagResult = run.ResultCollection.MassTagResultList[massTag];

            massTagResult.DisplayToConsole();
            Assert.AreEqual(5512, massTagResult.ScanSet.PrimaryScanNumber);
        }
        public void createPeptideObjectTest1()
        {
            MassTag mt = new MassTag();

            mt.ID = 56488;
            mt.MonoIsotopicMass = 2275.1694779;
            mt.PeptideSequence  = "TTPSIIAYTDDETIVGQPAKR";
            mt.NETVal           = 0.3520239f;

            mt.CreatePeptideObject();
            Assert.AreNotEqual(null, mt.Peptide);
            Assert.AreEqual(2275.16959115176m, (decimal)mt.Peptide.MonoIsotopicMass);
        }
        public MassTag createMassTag1()
        {
            MassTag mt = new MassTag();

            mt.ID = 24769;
            mt.MonoIsotopicMass = 2086.0595;
            mt.ChargeState      = 2;
            mt.MZ = mt.MonoIsotopicMass / mt.ChargeState + Globals.PROTON_MASS;
            mt.PeptideSequence = "DFNEALVHQVVVAYAANAR";
            mt.CreatePeptideObject();

            return(mt);
        }
        public static MassTag GetMassTagStandard(int standardNum)
        {
            MassTag mt = new MassTag();

            mt.ID = 86963986;
            mt.MonoIsotopicMass = 1516.791851;
            mt.PeptideSequence  = "AAKEGISCEIIDLR";
            mt.NETVal           = 0.2284955f;
            mt.CreatePeptideObject();
            mt.ChargeState = 2;
            mt.MZ          = mt.MonoIsotopicMass / mt.ChargeState + Globals.PROTON_MASS;

            return(mt);
        }
Exemple #10
0
        public static List <MassTag> CreateO16O18TestMassTagList1()
        {
            List <MassTag> mtList = new List <MassTag>();

            MassTag mt = new MassTag();

            mt.ID = 1142;
            mt.MonoIsotopicMass = 921.4807035;
            mt.ChargeState      = 2;
            mt.MZ = mt.MonoIsotopicMass / mt.ChargeState + Globals.PROTON_MASS;
            mt.PeptideSequence = "AEFVEVTK";
            mt.CreatePeptideObject();

            mtList.Add(mt);
            return(mtList);
        }
Exemple #11
0
        public static List <MassTag> CreateTestMassTagList()
        {
            List <MassTag> mtList = new List <MassTag>();

            MassTag mt = new MassTag();

            mt.ID = 24769;
            mt.MonoIsotopicMass = 2086.0595;
            mt.ChargeState      = 2;
            mt.MZ = mt.MonoIsotopicMass / mt.ChargeState + Globals.PROTON_MASS;
            mt.PeptideSequence = "DFNEALVHQVVVAYAANAR";
            mt.CreatePeptideObject();

            mtList.Add(mt);
            return(mtList);
        }
Exemple #12
0
        public static List <MassTag> CreateN14N15TestMassTagList()
        {
            List <MassTag> mtList = new List <MassTag>();

            MassTag mt = new MassTag();

            mt.ID               = 23085473;
            mt.NETVal           = 0.3807834F;
            mt.MonoIsotopicMass = 2538.33284203802;
            mt.ChargeState      = 3;
            mt.MZ               = mt.MonoIsotopicMass / mt.ChargeState + Globals.PROTON_MASS;
            mt.PeptideSequence  = "AIHQPAPTFAEQSTTSEILVTGIK";
            mt.CreatePeptideObject();

            mtList.Add(mt);
            return(mtList);
        }
        public void test1()
        {
            Run run = new XCaliburRun(xcaliburTestfile);

            List <MassTag> mass_tagList = TestUtilities.CreateTestMassTagList();
            MassTag        mt           = mass_tagList[0];

            run.CurrentScanSet = new ScanSet(9017, new int[] { 9010, 9017, 9024 });
            run.CurrentMassTag = mt;


            MSGeneratorFactory msgenFactory = new MSGeneratorFactory();
            Task msgen = msgenFactory.CreateMSGenerator(run.MSFileType);

            DeconToolsV2.Peaks.clsPeakProcessorParameters peakParams = new DeconToolsV2.Peaks.clsPeakProcessorParameters(2, 1.3, true, DeconToolsV2.Peaks.PEAK_FIT_TYPE.QUADRATIC);
            Task mspeakDet = new DeconToolsPeakDetector(peakParams);

            Task theorFeatureGen       = new TomTheorFeatureGenerator();
            Task targetedFeatureFinder = new BasicTFF(0.01);

            IsotopicProfileFitScoreCalculator fitScoreCalc = new IsotopicProfileFitScoreCalculator();
            Task exporter = new BasicMTResultSQLiteExporter(exporterOutputFile1);



            msgen.Execute(run.ResultCollection);

            //run.XYData.Display();

            mspeakDet.Execute(run.ResultCollection);
            theorFeatureGen.Execute(run.ResultCollection);
            targetedFeatureFinder.Execute(run.ResultCollection);
            fitScoreCalc.Execute(run.ResultCollection);
            exporter.Execute(run.ResultCollection);
            exporter.Cleanup();

            MassTagResultBase result = run.ResultCollection.GetMassTagResult(mt);

            TestUtilities.DisplayIsotopicProfileData(result.IsotopicProfile);
        }
        public void test1()
        {
            MassTag mt = new MassTag();

            mt.ID = 56488;
            mt.MonoIsotopicMass = 2275.1694779;
            mt.PeptideSequence  = "TTPSIIAYTDDETIVGQPAKR";
            mt.NETVal           = 0.3520239f;
            mt.CreatePeptideObject();
            mt.ChargeState = 2;

            Run run = new XCaliburRun();

            ResultCollection rc = new ResultCollection(run);

            rc.Run.CurrentMassTag = mt;

            Task theorGen = new TomTheorFeatureGenerator();

            theorGen.Execute(rc);

            mt.CalculateMassesForIsotopicProfile(mt.ChargeState);

            MercuryDistributionCreator distcreator = new MercuryDistributionCreator();

            distcreator.CreateDistribution(mt.MonoIsotopicMass, mt.ChargeState, 40000);
            distcreator.getIsotopicProfile();


            TestUtilities.DisplayIsotopicProfileData(mt.IsotopicProfile);
            //TestUtilities.DisplayIsotopicProfileData(distcreator.IsotopicProfile);
            Assert.AreEqual(7, mt.IsotopicProfile.Peaklist.Count);

            Assert.AreEqual(1138.59201544m, (decimal)mt.IsotopicProfile.Peaklist[0].XValue);
            Assert.AreEqual((1138.59201544m + 1.00235m / 2m), (decimal)mt.IsotopicProfile.Peaklist[1].XValue);
        }