private bool IsIncluded(HalfLifeSettings halfLifeSettings, PeptideFileAnalysis peptideFileAnalysis) { if (!string.IsNullOrEmpty(Cohort)) { if (Cohort != HalfLifeCalculator.GetCohort(peptideFileAnalysis.MsDataFile, GetHalfLifeSettings().BySample)) { return(false); } } if (peptideFileAnalysis.MsDataFile.TimePoint == null) { return(false); } if (IsTimePointExcluded(peptideFileAnalysis.MsDataFile.TimePoint.Value)) { return(false); } if (halfLifeSettings.PrecursorPoolCalculation == PrecursorPoolCalculation.Individual) { if (null == peptideFileAnalysis.CalculatedPeaks || !peptideFileAnalysis.CalculatedPeaks.Turnover.HasValue) { return(false); } } return(true); }
private void UpdateCohortCombo() { var cohortSet = new HashSet <String> { "" }; foreach (var msDataFile in Workspace.MsDataFiles) { cohortSet.Add(HalfLifeCalculator.GetCohort(msDataFile, GetHalfLifeSettings().BySample)); } var selectedCohort = (string)comboCohort.SelectedItem; var cohorts = new List <String>(cohortSet); cohorts.Sort(); if (Lists.EqualsDeep(cohorts, comboCohort.Items)) { return; } comboCohort.Items.Clear(); foreach (var cohort in cohorts) { comboCohort.Items.Add(cohort); } comboCohort.SelectedIndex = Math.Max(0, cohorts.IndexOf(selectedCohort)); }