コード例 #1
0
        public override void Run()
        {
            IAccumulatedMSNGlycanCreator glyRunner = new AccumulatedMSBruteForceNGlycanCreator();
            List <GlycanType>            types     = new List <GlycanType>();

            types.Add(GlycanType.Complex);
            types.Add(GlycanType.Hybrid);
            types.Add(GlycanType.Oligomannose);
            CreateInitNGlycan.Creator.SetGeneratedTypes(types);
            List <IAccumulatedGlycanMassProxy> glycans = glyRunner.GenerateSpecific();

            foreach (IAccumulatedGlycanMassProxy g in glycans)
            {
                Console.WriteLine(g.GetName());
            }
        }
コード例 #2
0
        public void Run()
        {
            var watch = new System.Diagnostics.Stopwatch();

            watch.Start();

            FastaSearchRunPeptides pepRunner = new FastaSearchRunPeptides();

            pepRunner.SetPeptideCreator(new NGlycosylationPeptideCreator(new GeneralPeptideCreator()));
            List <IPeptide> peptides = pepRunner.Run(@"C:\Users\iruiz\Downloads\ms_fasta.fasta");

            //List<IPeptide> peptides = pepRunner.Run(@"C:\Users\rz20\Downloads\ms_fasta.fasta");
            Console.WriteLine(peptides.Count);

            IAccumulatedMSNGlycanCreator       glyRunner = new AccumulatedMSBruteForceNGlycanCreator();
            List <IAccumulatedGlycanMassProxy> glycans   = glyRunner.GenerateSpecific();
            //IGlycanGenerator glyRunner = new SimpleGlycanGenerator();
            //List<IGlycan> glycans = glyRunner.Generate();

            ThermoRawSearchRunSpectrum specRunner = new ThermoRawSearchRunSpectrum();

            specRunner.Run(@"C:\Users\iruiz\Downloads\ZC_20171218_H95_R1.raw");
            //specRunner.Run(@"C:\Users\rz20\Downloads\ZC_20171218_H95_R1.raw");
            ISpectrumMSn spectrum = specRunner.GetSpectrum(7861) as ISpectrumMSn;

            List <IGlycan> glycanSet = new List <IGlycan>();

            glycanSet.AddRange(glycans);

            //IAccumulatedPrecursorMatcher matcher = new AccumulatedNGlycoPeptidePrecursorMatcher(peptides, glycanSet, 20);
            //List<IAccumulatedGlycoPeptideMassProxy> glycoPeptides =  matcher.Match(spectrum);


            IPrecursorMatcher    matcher       = new GlycoPeptidePrecursorMatcher(peptides, glycanSet, 20);
            List <IGlycoPeptide> glycoPeptides = matcher.Match(spectrum);


            //int last = specRunner.GetLastScan();
            //for (int i = 0; i <= last; i++)
            //{
            //    specRunner.GetSpectrum(i);
            //}
            //specRunner.Run(@"C:\Users\iruiz\Downloads\2.raw");
            //last = specRunner.GetLastScan();
            //for (int i = 0; i <= last; i++)
            //{
            //    specRunner.GetSpectrum(i);
            //}
            //specRunner.Exit();

            watch.Stop();
            Console.WriteLine(glycans.Count);
            Console.WriteLine(glycoPeptides.Count);
            foreach (IGlycoPeptide gly in glycoPeptides)
            {
                Console.WriteLine(gly.GetPeptide().GetSequence());
                Console.WriteLine(gly.GetGlycan().GetName());
            }

            Console.WriteLine($"Execution Time: {watch.ElapsedMilliseconds} ms");
            Console.Read();
        }
コード例 #3
0
        public override void Run()
        {
            var watch = new System.Diagnostics.Stopwatch();

            watch.Start();

            FastaSearchRunPeptides pepRunner = new FastaSearchRunPeptides();

            pepRunner.SetPeptideCreator(new NGlycosylationPeptideCreator(new GeneralPeptideCreator()));
            List <IPeptide> peptides = pepRunner.Run(@"C:\Users\iruiz\Downloads\ms_fasta.fasta");

            //List<IPeptide> peptides = pepRunner.Run(@"C:\Users\rz20\Downloads\ms_fasta.fasta");
            Console.WriteLine(peptides.Count);

            IAccumulatedMSNGlycanCreator       glyRunner = new AccumulatedMSBruteForceNGlycanCreator();
            List <IAccumulatedGlycanMassProxy> glycans   = glyRunner.GenerateSpecific();

            IAccumulatedStructNGlycanCreator        glyRunner2 = new AccumulatedStructBruteForceNGlycanCreator();
            List <IAccumulatedGlycanStructureProxy> glycans2   = glyRunner2.GenerateSpecific();

            ThermoRawSearchRunSpectrum specRunner = new ThermoRawSearchRunSpectrum();

            specRunner.Run(@"C:\Users\iruiz\Downloads\1.raw");
            //specRunner.Run(@"C:\Users\rz20\Downloads\1.raw");

            //for (int i = 1; i < specRunner.GetLastScan(); i++)
            //{

            ISpectrum spectrum = specRunner.GetSpectrum(3361);

            //if (spectrum.GetMSnOrder() == 1) continue;
            //if ((spectrum as ISpectrumMSn).GetActivation() != TypeOfMSActivation.ETD) continue;

            List <IGlycan> glycanSet = new List <IGlycan>();

            glycanSet.AddRange(glycans);

            ISpectrumProcessing processor = new GeneralPeakPickingSpectrumProcessing();

            processor.Process(spectrum);

            double pretol = 20;
            IAccumulatedPrecursorMatcher precursorMatcher = new AccumulatedMSNGlycoPeptidePrecursorMatcher(peptides, glycanSet, pretol);

            List <IGlycoPeptide> glycoPeptides = precursorMatcher.Match(spectrum);

            IGlycoPeptideScoreFactory searchRunner = new BinSearchSpectrumEThcD();


            searchRunner.Search(spectrum, glycoPeptides);
            IGlycoPeptideScoreResultProduct result = searchRunner.GetResult();

            List <IGlycoPeptideScore> results   = result.GetResults();
            IAnnotatedPeakFactory     annotator = new BinSearchAnnotatedSpectrumEThcD(glycans2, 20);

            foreach (IGlycoPeptideScore r in results)
            {
                annotator.Annotate(spectrum, r);
                IAnnotatedPeakResultProduct peaks = annotator.GetResult();
                peaks.Report("test.txt");
            }
            watch.Stop();
            Console.WriteLine($"Execution Time: {watch.ElapsedMilliseconds} ms");
        }
コード例 #4
0
        public override void Run()
        {
            var watch = new System.Diagnostics.Stopwatch();

            watch.Start();

            IDoubleDigestionPeptidesSearchRun pepRunner = new DoubleDigestionFastaSearchRunPeptides();

            pepRunner.SetPeptideCreator(new NGlycosylationPeptideCreator(new DoubleDigestionPeptideCreator()));
            IPeptideCreatorParameter parameter = new GeneralPeptideCreatorParameter(Proteases.Trypsin, 2, 7);;

            pepRunner.AddPeptideParameter(parameter);
            parameter = new GeneralPeptideCreatorParameter(Proteases.GluC, 2, 7);
            pepRunner.AddPeptideParameter(parameter);

            List <IPeptide> peptides = pepRunner.Run(@"C:\Users\iruiz\Downloads\HP.fasta");

            IAccumulatedMSNGlycanCreator       glyRunner = new AccumulatedMSBruteForceNGlycanCreator();
            List <IAccumulatedGlycanMassProxy> glycans   = glyRunner.GenerateSpecific();
            //IGlycanGenerator glyRunner = new SimpleGlycanGenerator();
            //List<IGlycan> glycans = glyRunner.Generate();

            ThermoRawSearchRunSpectrum specRunner = new ThermoRawSearchRunSpectrum();

            specRunner.Run(@"C:\Users\iruiz\Downloads\ZC_20171218_H95_R1.raw");
            //specRunner.Run(@"C:\Users\rz20\Downloads\1.raw");
            Console.Write("scan, ");
            Console.Write("peptide, ");
            Console.Write("glycan, ");
            Console.Write("score, ");
            Console.Write("mz, ");
            Console.WriteLine("charge");
            for (int i = 7861; i < 7862; i++)
            {
                ISpectrum spectrum = specRunner.GetSpectrum(i);

                if (spectrum.GetMSnOrder() == 1)
                {
                    continue;
                }
                if ((spectrum as ISpectrumMSn).GetActivation() != TypeOfMSActivation.ETD)
                {
                    continue;
                }

                List <IGlycan> glycanSet = new List <IGlycan>();
                glycanSet.AddRange(glycans);

                ISpectrumProcessing processor = new GeneralPeakPickingSpectrumProcessing();
                processor.Process(spectrum);

                double pretol = 20;
                IAccumulatedPrecursorMatcher precursorMatcher = new AccumulatedMSNGlycoPeptidePrecursorMatcher(peptides, glycanSet, pretol);

                List <IGlycoPeptide> glycoPeptides = precursorMatcher.Match(spectrum);


                IGlycoPeptideScoreFactory searchRunner = new BinSearchSpectrumEThcD();
                searchRunner.Search(spectrum, glycoPeptides);
                IGlycoPeptideScoreResultProduct result = searchRunner.GetResult();
                result.MaxScore();


                result.Report("test.txt");
            }
            watch.Stop();
            Console.WriteLine($"Execution Time: {watch.ElapsedMilliseconds} ms");
        }