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); } }
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(); }
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); } }
public void SetAcceptIntegrationNotes(IEnumerable <IntegrationNote> integrationNotes) { Settings.SetSetting(SettingEnum.accept_integration_notes, IntegrationNote.ToString(integrationNotes)); }
public IEnumerable <IntegrationNote> GetAcceptIntegrationNotes() { return(IntegrationNote.ParseCollection(Settings.GetSetting(SettingEnum.accept_integration_notes, IntegrationNote.ToString(new[] { IntegrationNote.Manual, IntegrationNote.Success, })))); }