예제 #1
0
        protected IsobaricPeptideStatisticBuilderOptions GetStatisticOption()
        {
            var option = new IsobaricPeptideStatisticBuilderOptions();

            option.PeptideFile          = peptideFile.FullName;
            option.DesignFile           = designFile.FullName;
            option.Mode                 = modes.SelectedItem;
            option.ModifiedAminoacids   = modifiedAminoacids.Text;
            option.PerformNormalizition = normalize.Checked;
            if (option.Mode == QuantifyMode.qmModificationSite)
            {
                option.MinimumSiteProbability = minimumSiteProbability.Value;
            }

            return(option);
        }
        public void TestFilterSpectraByQuantifyMode()
        {
            var options = new IsobaricPeptideStatisticBuilderOptions()
            {
                ModifiedAminoacids     = "STY",
                MinimumSiteProbability = 0.8
            };

            //For all spectra, nothing will be filtered
            options.Mode = QuantifyMode.qmAll;
            var isoSpectra = InitializeSpectra();

            new IsobaricPeptideStatisticBuilder(options).FilterSpectraByQuantifyMode(isoSpectra);
            Assert.AreEqual(3, isoSpectra.Count);

            //Unmodified spectra
            options.Mode = QuantifyMode.qmUnmodifiedPeptide;
            isoSpectra   = InitializeSpectra();
            new IsobaricPeptideStatisticBuilder(options).FilterSpectraByQuantifyMode(isoSpectra);
            Assert.AreEqual(1, isoSpectra.Count);
            Assert.AreEqual("^AAAQLLQSQAQQSGAQQTK@", isoSpectra[0].Sequence);

            //modified spectra, not filter site probability
            options.Mode = QuantifyMode.qmModificationSite;
            options.MinimumSiteProbability = -0.1;
            isoSpectra = InitializeSpectra();
            new IsobaricPeptideStatisticBuilder(options).FilterSpectraByQuantifyMode(isoSpectra);
            Assert.AreEqual(2, isoSpectra.Count);
            Assert.IsTrue(isoSpectra.All(m => !m.Sequence.Equals("^AAAQLLQSQAQQSGAQQTK@")));

            //modified spectra, filter site probability
            options.MinimumSiteProbability = 0.8;
            isoSpectra = InitializeSpectra();
            new IsobaricPeptideStatisticBuilder(options).FilterSpectraByQuantifyMode(isoSpectra);
            Assert.AreEqual(1, isoSpectra.Count);
            Assert.AreEqual("^AAADTGAS*PR", isoSpectra[0].Sequence);
        }
 public IsobaricPeptideStatisticBuilder(IsobaricPeptideStatisticBuilderOptions options)
 {
     this.options = options;
 }