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 AcceptanceCriteriaForm(Workspace workspace) : base(workspace)
 {
     InitializeComponent();
     checkedListBoxAcceptableIntegrationNotes.Items.AddRange(IntegrationNote.Values().Cast <object>().ToArray());
     AcceptSamplesWithoutMs2Id = workspace.GetAcceptSamplesWithoutMs2Id();
     MinDeconvolutionScore     = workspace.GetAcceptMinDeconvolutionScore();
     MinAuc           = workspace.GetAcceptMinAreaUnderChromatogramCurve();
     IntegrationNotes = workspace.GetAcceptIntegrationNotes();
     MinTurnoverScore = workspace.GetAcceptMinTurnoverScore();
 }
Beispiel #3
0
 public PeakSet(DbPeptideFileAnalysis dbPeptideFileAnalysis, IEnumerable <Peak> peaks) : this()
 {
     TracerPercent       = dbPeptideFileAnalysis.TracerPercent;
     DeconvolutionScore  = dbPeptideFileAnalysis.DeconvolutionScore;
     PrecursorEnrichment = dbPeptideFileAnalysis.PrecursorEnrichment;
     if (dbPeptideFileAnalysis.PrecursorEnrichmentFormula != null)
     {
         PrecursorEnrichmentFormula = TracerPercentFormula.Parse(dbPeptideFileAnalysis.PrecursorEnrichmentFormula);
     }
     Turnover        = dbPeptideFileAnalysis.Turnover;
     TurnoverScore   = dbPeptideFileAnalysis.TurnoverScore;
     IntegrationNote = IntegrationNote.Parse(dbPeptideFileAnalysis.IntegrationNote);
     if (peaks != null)
     {
         _peaks = ImmutableList.ValueOf(peaks);
     }
 }
Beispiel #4
0
 public void SetAcceptIntegrationNotes(IEnumerable <IntegrationNote> integrationNotes)
 {
     Settings.SetSetting(SettingEnum.accept_integration_notes, IntegrationNote.ToString(integrationNotes));
 }
Beispiel #5
0
 public IEnumerable <IntegrationNote> GetAcceptIntegrationNotes()
 {
     return(IntegrationNote.ParseCollection(Settings.GetSetting(SettingEnum.accept_integration_notes,
                                                                IntegrationNote.ToString(new[] { IntegrationNote.Manual, IntegrationNote.Success, }))));
 }