Beispiel #1
0
        public void Save(ISession session)
        {
            var dbPeptideFileAnalysis = session.Get <DbPeptideFileAnalysis>(PeptideFileAnalysis.Id);

            DeleteResults(session, dbPeptideFileAnalysis);
            dbPeptideFileAnalysis.PrecursorEnrichment        = PrecursorEnrichment;
            dbPeptideFileAnalysis.PrecursorEnrichmentFormula = PrecursorEnrichmentFormula == null ? null : PrecursorEnrichmentFormula.ToString();
            dbPeptideFileAnalysis.TracerPercent      = TracerPercent;
            dbPeptideFileAnalysis.Turnover           = Turnover;
            dbPeptideFileAnalysis.TurnoverScore      = TurnoverScore;
            dbPeptideFileAnalysis.DeconvolutionScore = DeconvolutionScore;
            dbPeptideFileAnalysis.IntegrationNote    = IntegrationNote.ToString();
            dbPeptideFileAnalysis.PeakCount          = Peaks.Count;
            session.Update(dbPeptideFileAnalysis);
            var tracerFormulae = PeptideFileAnalysis.TurnoverCalculator.ListTracerFormulas();

            for (int i = 0; i < tracerFormulae.Count; i++)
            {
                var peak   = _peaks[tracerFormulae[i]];
                var dbPeak = new DbPeak
                {
                    PeptideFileAnalysis = dbPeptideFileAnalysis,
                    PeakIndex           = i,
                    Area      = peak.Area,
                    StartTime = peak.StartTime,
                    EndTime   = peak.EndTime,
                };
                session.Save(dbPeak);
            }
        }
Beispiel #2
0
 public void SetAcceptIntegrationNotes(IEnumerable <IntegrationNote> integrationNotes)
 {
     Settings.SetSetting(SettingEnum.accept_integration_notes, IntegrationNote.ToString(integrationNotes));
 }
Beispiel #3
0
 public IEnumerable <IntegrationNote> GetAcceptIntegrationNotes()
 {
     return(IntegrationNote.ParseCollection(Settings.GetSetting(SettingEnum.accept_integration_notes,
                                                                IntegrationNote.ToString(new[] { IntegrationNote.Manual, IntegrationNote.Success, }))));
 }