public PermuteIsotopeModificationsDlg(SkylineWindow skylineWindow) { InitializeComponent(); SkylineWindow = skylineWindow; _driverIsotopeModification = new SettingsListComboDriver <StaticMod>(comboIsotopeModification, Settings.Default.HeavyModList); _driverIsotopeModification.LoadList(null); }
public EditDriftTimePredictorDlg(IEnumerable <IonMobilityPredictor> existing) { _existing = existing; _showRegressions = true; InitializeComponent(); foreach (eIonMobilityUnits units in Enum.GetValues(typeof(eIonMobilityUnits))) { if (units != eIonMobilityUnits.none) // Don't present "none" as an option { comboBoxIonMobilityUnits.Items.Add(IonMobilityFilter.IonMobilityUnitsL10NString(units)); } } _smallMoleculeUI = Program.MainWindow.Document.HasSmallMolecules || Program.MainWindow.ModeUI != SrmDocument.DOCUMENT_TYPE.proteomic; if (_smallMoleculeUI) { gridMeasuredDriftTimes.Columns[COLUMN_SEQUENCE].HeaderText = Resources.EditDriftTimePredictorDlg_EditDriftTimePredictorDlg_Molecule; gridMeasuredDriftTimes.Columns[COLUMN_CHARGE].HeaderText = Resources.EditDriftTimePredictorDlg_EditDriftTimePredictorDlg_Adduct; } var targetResolver = TargetResolver.MakeTargetResolver(Program.ActiveDocumentUI); MeasuredDriftTimeSequence.TargetResolver = targetResolver; // TODO: ion mobility libraries are more complex than initially thought - leave these conversions to the mass spec vendors for now labelIonMobilityLibrary.Visible = comboLibrary.Visible = false; Icon = Resources.Skyline; _driverIonMobilityLibraryListComboDriver = new SettingsListComboDriver <IonMobilityLibrarySpec>(comboLibrary, Settings.Default.IonMobilityLibraryList); _driverIonMobilityLibraryListComboDriver.LoadList(null); UpdateControls(); }
public ReintegrateDlg(SrmDocument document) { InitializeComponent(); Icon = Resources.Skyline; Document = document; _scoreAnnotation = false; _driverPeakScoringModel = new SettingsListComboDriver<PeakScoringModelSpec>(comboBoxScoringModel, Settings.Default.PeakScoringModelList); var peakScoringModel = document.Settings.PeptideSettings.Integration.PeakScoringModel; _driverPeakScoringModel.LoadList(peakScoringModel != null ? peakScoringModel.Name : null); }
public ReintegrateDlg(SrmDocument document) { InitializeComponent(); Icon = Resources.Skyline; Document = document; _scoreAnnotation = false; _driverPeakScoringModel = new SettingsListComboDriver <PeakScoringModelSpec>(comboBoxScoringModel, Settings.Default.PeakScoringModelList); var peakScoringModel = document.Settings.PeptideSettings.Integration.PeakScoringModel; _driverPeakScoringModel.LoadList(peakScoringModel != null ? peakScoringModel.Name : null); }
public AddPeakCompareDlg(SrmDocument document, IEnumerable <ComparePeakBoundaries> existing) { InitializeComponent(); Document = document; _existing = existing; _driverPeakScoringModel = new SettingsListComboDriver <PeakScoringModelSpec>(comboBoxModel, Settings.Default.PeakScoringModelList); var peakScoringModel = document.Settings.PeptideSettings.Integration.PeakScoringModel; _driverPeakScoringModel.LoadList(peakScoringModel != null ? peakScoringModel.Name : null); UpdateSelection(true); }
public ComboBoxDriverWrapper(IContainer container, ComboBox comboBox) { container.Add(this); Settings.Default.PersistedViews.Changed += ViewSettingsOnSettingsChange; // Initialize the report comboBox. // CONSIDER: Settings list editing is currently disabled, because // it had problems with the empty element added to the list. // Also, for live reports, would need to add code to take the // modified list and persist it in ViewSettings. // Might be nice to allow report spec editing in this form // some day, though. _liveReportDriver = new SettingsListComboDriver <ReportOrViewSpec>(comboBox, new ReportOrViewSpecList(), false); RepopulateLiveReportList(); }
public ImportFastaControl(SkylineWindow skylineWindow) { SkylineWindow = skylineWindow; InitializeComponent(); ImportFastaHelper = new ImportFastaHelper(tbxFasta, tbxError, panelError); tbxFastaHeightDifference = Height - tbxFasta.Height; _driverEnzyme = new SettingsListComboDriver<Enzyme>(comboEnzyme, Settings.Default.EnzymeList); _driverEnzyme.LoadList(SkylineWindow.Document.Settings.PeptideSettings.Enzyme.GetKey()); MaxMissedCleavages = skylineWindow.Document.Settings.PeptideSettings.DigestSettings.MaxMissedCleavages; }
public ImportFastaControl(SkylineWindow skylineWindow) { SkylineWindow = skylineWindow; InitializeComponent(); ImportFastaHelper = new ImportFastaHelper(tbxFasta, tbxError, panelError); tbxFastaHeightDifference = Height - tbxFasta.Height; _driverEnzyme = new SettingsListComboDriver <Enzyme>(comboEnzyme, Settings.Default.EnzymeList); _driverEnzyme.LoadList(SkylineWindow.Document.Settings.PeptideSettings.Enzyme.GetKey()); MaxMissedCleavages = skylineWindow.Document.Settings.PeptideSettings.DigestSettings.MaxMissedCleavages; }
public EditDriftTimePredictorDlg(IEnumerable <DriftTimePredictor> existing) { _existing = existing; _showRegressions = true; InitializeComponent(); // TODO: ion mobility libraries are more complex than initially thought - put this off until after summer 2014 release labelIonMobilityLibrary.Visible = comboLibrary.Visible = false; Icon = Resources.Skyline; _driverIonMobilityLibraryListComboDriver = new SettingsListComboDriver <IonMobilityLibrarySpec>(comboLibrary, Settings.Default.IonMobilityLibraryList); _driverIonMobilityLibraryListComboDriver.LoadList(null); UpdateControls(); }
public BuildPeptideSearchLibraryControl(IModifyDocumentContainer documentContainer, ImportPeptideSearch importPeptideSearch, LibraryManager libraryManager) { DocumentContainer = documentContainer; ImportPeptideSearch = importPeptideSearch; LibraryManager = libraryManager; InitializeComponent(); textCutoff.Text = ImportPeptideSearch.CutoffScore.ToString(LocalizationHelper.CurrentCulture); if (DocumentContainer.Document.PeptideCount == 0) { cbFilterForDocumentPeptides.Hide(); } _driverStandards = new SettingsListComboDriver <IrtStandard>(comboStandards, Settings.Default.IrtStandardList); _driverStandards.LoadList(IrtStandard.EMPTY.GetKey()); }
public ImportFastaControl(SkylineWindow skylineWindow) { SkylineWindow = skylineWindow; InitializeComponent(); ImportFastaHelper = new ImportFastaHelper(tbxFasta, tbxError, panelError, helpTipFasta); tbxFastaHeightDifference = Height - tbxFasta.Height; _driverEnzyme = new SettingsListComboDriver <Enzyme>(comboEnzyme, Settings.Default.EnzymeList); _driverEnzyme.LoadList(SkylineWindow.Document.Settings.PeptideSettings.Enzyme.GetKey()); MaxMissedCleavages = skylineWindow.Document.Settings.PeptideSettings.DigestSettings.MaxMissedCleavages; cbDecoyMethod.Items.Add(string.Empty); cbDecoyMethod.Items.Add(DecoyGeneration.SHUFFLE_SEQUENCE); cbDecoyMethod.Items.Add(DecoyGeneration.REVERSE_SEQUENCE); cbDecoyMethod.SelectedIndex = 0; }
public void InitializeSettings(IModifyDocumentContainer documentContainer, bool?defaultState = null) { _ionMobilityFiltering = documentContainer.Document.Settings.TransitionSettings.IonMobilityFiltering; var imsWindowCalc = _ionMobilityFiltering.FilterWindowWidthCalculator; var hasLibIMS = _ionMobilityFiltering.IonMobilityLibrary != null && !_ionMobilityFiltering.IonMobilityLibrary.IsNone; var useSpectralLibraryIonMobilityValues = defaultState ?? _ionMobilityFiltering.UseSpectralLibraryIonMobilityValues; var hasIonMobilityFiltering = useSpectralLibraryIonMobilityValues || hasLibIMS; // Resolving power is most commonly used window size type, give that a reasonable starting value if none provided var resolvingPower = imsWindowCalc?.ResolvingPower ?? 0; if (hasIonMobilityFiltering && resolvingPower == 0) { resolvingPower = 30; // Arbitrarily chosen non-zero value } if (imsWindowCalc != null) { comboBoxWindowType.SelectedIndex = (int)imsWindowCalc.WindowWidthMode; textIonMobilityFilterResolvingPower.Text = resolvingPower.ToString(LocalizationHelper.CurrentCulture); textIonMobilityFilterWidthAtMobility0.Text = imsWindowCalc.PeakWidthAtIonMobilityValueZero.ToString(LocalizationHelper.CurrentCulture); textIonMobilityFilterWidthAtMobilityMax.Text = imsWindowCalc.PeakWidthAtIonMobilityValueMax.ToString(LocalizationHelper.CurrentCulture); textIonMobilityFilterFixedWidth.Text = imsWindowCalc.FixedWindowWidth.ToString(LocalizationHelper.CurrentCulture); } else { comboBoxWindowType.SelectedIndex = (int)IonMobilityWindowWidthCalculator.IonMobilityWindowWidthType.none; } UpdateIonMobilityFilterWindowWidthControls(); _driverIonMobilityLib = new SettingsListComboDriver <IonMobilityLibrary>(comboIonMobilityLibrary, Settings.Default.IonMobilityLibraryList); var libName = (_ionMobilityFiltering.IonMobilityLibrary == null ? null : _ionMobilityFiltering.IonMobilityLibrary.Name); _driverIonMobilityLib.LoadList(libName); cbUseSpectralLibraryIonMobilities.Checked = useSpectralLibraryIonMobilityValues; }
public ToolOptionsUI() { InitializeComponent(); checkBoxShowWizard.Checked = Settings.Default.ShowStartupForm; powerOfTenCheckBox.Checked = Settings.Default.UsePowerOfTen; Icon = Resources.Skyline; _driverServers = new SettingsListBoxDriver <Server>(listboxServers, Settings.Default.ServerList); _driverServers.LoadList(); _driverChorusAccounts = new SettingsListBoxDriver <RemoteAccount>(listBoxRemoteAccounts, Settings.Default.RemoteAccountList); _driverChorusAccounts.LoadList(); _driverColorSchemes = new SettingsListComboDriver <ColorScheme>(comboColorScheme, Settings.Default.ColorSchemes, true); _driverColorSchemes.LoadList(Settings.Default.CurrentColorScheme); // Hide ability to turn off live reports //tabControl.TabPages.Remove(tabMisc); // Populate the languages list with the languages that Skyline has been localized to string defaultDisplayName = string.Format(Resources.ToolOptionsUI_ToolOptionsUI_Default___0__, CultureUtil.GetDisplayLanguage(CultureInfo.InstalledUICulture).DisplayName); listBoxLanguages.Items.Add(new DisplayLanguageItem(string.Empty, defaultDisplayName)); foreach (var culture in CultureUtil.AvailableDisplayLanguages()) { listBoxLanguages.Items.Add(new DisplayLanguageItem(culture.Name, culture.DisplayName)); } for (int i = 0; i < listBoxLanguages.Items.Count; i++) { var displayLanguageItem = (DisplayLanguageItem)listBoxLanguages.Items[i]; if (Equals(displayLanguageItem.Key, Settings.Default.DisplayLanguage)) { listBoxLanguages.SelectedIndex = i; } } comboCompactFormatOption.Items.AddRange(CompactFormatOption.ALL_VALUES.ToArray()); comboCompactFormatOption.SelectedItem = CompactFormatOption.FromSettings(); }
public EditDriftTimePredictorDlg(IEnumerable <IonMobilityPredictor> existing) { _existing = existing; _showRegressions = true; InitializeComponent(); foreach (MsDataFileImpl.eIonMobilityUnits units in Enum.GetValues(typeof(MsDataFileImpl.eIonMobilityUnits))) { if (units != MsDataFileImpl.eIonMobilityUnits.none) // Don't present "none" as an option { comboBoxIonMobilityUnits.Items.Add(IonMobilityFilter.IonMobilityUnitsL10NString(units)); } } // TODO: ion mobility libraries are more complex than initially thought - leave these conversions to the mass spec vendors for now labelIonMobilityLibrary.Visible = comboLibrary.Visible = false; Icon = Resources.Skyline; _driverIonMobilityLibraryListComboDriver = new SettingsListComboDriver <IonMobilityLibrarySpec>(comboLibrary, Settings.Default.IonMobilityLibraryList); _driverIonMobilityLibraryListComboDriver.LoadList(null); UpdateControls(); }
public ComboBoxDriverWrapper(IContainer container, ComboBox comboBox) { container.Add(this); Settings.Default.PersistedViews.Changed += ViewSettingsOnSettingsChange; // Initialize the report comboBox. // CONSIDER: Settings list editing is currently disabled, because // it had problems with the empty element added to the list. // Also, for live reports, would need to add code to take the // modified list and persist it in ViewSettings. // Might be nice to allow report spec editing in this form // some day, though. _liveReportDriver = new SettingsListComboDriver<ReportOrViewSpec>(comboBox, new ReportOrViewSpecList(), false); RepopulateLiveReportList(); }
private void InitializeMs1FilterUI() { _driverEnrichments = new SettingsListComboDriver<IsotopeEnrichments>(comboEnrichments, Settings.Default.IsotopeEnrichmentsList); var sel = (FullScan.IsotopeEnrichments != null ? FullScan.IsotopeEnrichments.Name : null); _driverEnrichments.LoadList(sel); comboPrecursorIsotopes.Items.AddRange( new object[] { FullScanPrecursorIsotopes.None.GetLocalizedString(), FullScanPrecursorIsotopes.Count.GetLocalizedString(), FullScanPrecursorIsotopes.Percent.GetLocalizedString() }); comboPrecursorAnalyzerType.Items.AddRange(TransitionFullScan.MASS_ANALYZERS.Cast<object>().ToArray()); comboPrecursorIsotopes.SelectedItem = FullScan.PrecursorIsotopes.GetLocalizedString(); // Update the precursor analyzer type in case the SelectedIndex is still -1 UpdatePrecursorAnalyzerType(); }
private void InitializeMsMsFilterUI() { _driverIsolationScheme = new SettingsListComboDriver<IsolationScheme>(comboIsolationScheme, Settings.Default.IsolationSchemeList); string sel = (FullScan.IsolationScheme != null ? FullScan.IsolationScheme.Name : null); _driverIsolationScheme.LoadList(sel); comboAcquisitionMethod.Items.AddRange( new object[] { FullScanAcquisitionMethod.None.GetLocalizedString(), FullScanAcquisitionMethod.Targeted.GetLocalizedString(), FullScanAcquisitionMethod.DIA.GetLocalizedString() }); comboProductAnalyzerType.Items.AddRange(TransitionFullScan.MASS_ANALYZERS.Cast<object>().ToArray()); comboAcquisitionMethod.SelectedItem = FullScan.AcquisitionMethod.GetLocalizedString(); // Update the product analyzer type in case the SelectedIndex is still -1 UpdateProductAnalyzerType(); }
public ToolOptionsUI(SrmSettings settings) { InitializeComponent(); checkBoxShowWizard.Checked = Settings.Default.ShowStartupForm; powerOfTenCheckBox.Checked = Settings.Default.UsePowerOfTen; Icon = Resources.Skyline; _driverServers = new SettingsListBoxDriver <Server>(listboxServers, Settings.Default.ServerList); _driverServers.LoadList(); _driverRemoteAccounts = new SettingsListBoxDriver <RemoteAccount>(listBoxRemoteAccounts, Settings.Default.RemoteAccountList); _driverRemoteAccounts.LoadList(); _driverColorSchemes = new SettingsListComboDriver <ColorScheme>(comboColorScheme, Settings.Default.ColorSchemes, true); _driverColorSchemes.LoadList(Settings.Default.CurrentColorScheme); var pingPep = new Peptide(@"PING"); var peptide = new PeptideDocNode(pingPep); var precursor = new TransitionGroupDocNode(new TransitionGroup(pingPep, Adduct.SINGLY_PROTONATED, IsotopeLabelType.light), new TransitionDocNode[0]); _pingInput = new PrositIntensityModel.PeptidePrecursorNCE(peptide, precursor, IsotopeLabelType.light, 32); _settingsNoMod = settings.ChangePeptideModifications( pm => new PeptideModifications(new StaticMod[0], new TypedModifications[0])); // Hide ability to turn off live reports //tabControl.TabPages.Remove(tabMisc); // Populate the languages list with the languages that Skyline has been localized to string defaultDisplayName = string.Format(Resources.ToolOptionsUI_ToolOptionsUI_Default___0__, CultureUtil.GetDisplayLanguage(CultureInfo.InstalledUICulture).DisplayName); listBoxLanguages.Items.Add(new DisplayLanguageItem(string.Empty, defaultDisplayName)); foreach (var culture in CultureUtil.AvailableDisplayLanguages()) { listBoxLanguages.Items.Add(new DisplayLanguageItem(culture.Name, culture.DisplayName)); } for (int i = 0; i < listBoxLanguages.Items.Count; i++) { var displayLanguageItem = (DisplayLanguageItem)listBoxLanguages.Items[i]; if (Equals(displayLanguageItem.Key, Settings.Default.DisplayLanguage)) { listBoxLanguages.SelectedIndex = i; } } comboCompactFormatOption.Items.AddRange(CompactFormatOption.ALL_VALUES.ToArray()); comboCompactFormatOption.SelectedItem = CompactFormatOption.FromSettings(); var iModels = PrositIntensityModel.Models.ToList(); iModels.Insert(0, string.Empty); var rtModels = PrositRetentionTimeModel.Models.ToList(); rtModels.Insert(0, string.Empty); tbxPrositServer.Text = PrositConfig.GetPrositConfig().Server; intensityModelCombo.Items.AddRange(iModels.ToArray()); iRTModelCombo.Items.AddRange(rtModels.ToArray()); prositServerStatusLabel.Text = string.Empty; if (iModels.Contains(Settings.Default.PrositIntensityModel)) { intensityModelCombo.SelectedItem = Settings.Default.PrositIntensityModel; } if (rtModels.Contains(Settings.Default.PrositRetentionTimeModel)) { iRTModelCombo.SelectedItem = Settings.Default.PrositRetentionTimeModel; } ceCombo.Items.AddRange( Enumerable.Range(PrositConstants.MIN_NCE, PrositConstants.MAX_NCE - PrositConstants.MIN_NCE + 1).Select(c => (object)c) .ToArray()); ceCombo.SelectedItem = Settings.Default.PrositNCE; }
private void comboBoxScoringModel_EditItem(object sender, SettingsListComboDriver <PeakScoringModelSpec> .EditItemEventArgs e) { e.Tag = this; }
public TransitionSettingsUI(SkylineWindow parent) { InitializeComponent(); // Populate the fragment finder combo boxes foreach (string item in TransitionFilter.GetStartFragmentFinderLabels()) comboRangeFrom.Items.Add(item); foreach (string item in TransitionFilter.GetEndFragmentFinderLabels()) comboRangeTo.Items.Add(item); _parent = parent; _transitionSettings = _parent.DocumentUI.Settings.TransitionSettings; // Initialize prediction settings comboPrecursorMass.SelectedItem = Prediction.PrecursorMassType.GetLocalizedString(); comboIonMass.SelectedItem = Prediction.FragmentMassType.GetLocalizedString(); _driverCE = new SettingsListComboDriver<CollisionEnergyRegression>(comboCollisionEnergy, Settings.Default.CollisionEnergyList); string sel = (Prediction.CollisionEnergy == null ? null : Prediction.CollisionEnergy.Name); _driverCE.LoadList(sel); _driverDP = new SettingsListComboDriver<DeclusteringPotentialRegression>(comboDeclusterPotential, Settings.Default.DeclusterPotentialList); sel = (Prediction.DeclusteringPotential == null ? null : Prediction.DeclusteringPotential.Name); _driverDP.LoadList(sel); _driverCoV = new SettingsListComboDriver<CompensationVoltageParameters>(comboCompensationVoltage, Settings.Default.CompensationVoltageList); _driverCoV.LoadList(Prediction.CompensationVoltage == null ? null : Prediction.CompensationVoltage.Name); _driverOptimizationLibrary = new SettingsListComboDriver<OptimizationLibrary>(comboOptimizationLibrary, Settings.Default.OptimizationLibraryList); _driverOptimizationLibrary.LoadList(Prediction.OptimizedLibrary == null ? null : Prediction.OptimizedLibrary.Name); if (Prediction.OptimizedMethodType == OptimizedMethodType.None) comboOptimizeType.SelectedIndex = 0; else { cbUseOptimized.Checked = true; comboOptimizeType.SelectedItem = Prediction.OptimizedMethodType.GetLocalizedString(); } // Initialize filter settings textPrecursorCharges.Text = Filter.PrecursorCharges.ToArray().ToString(", "); // Not L10N? Internationalization of comma? textIonCharges.Text = Filter.ProductCharges.ToArray().ToString(", "); // Not L10N? Internationalization of comma? textIonTypes.Text = TransitionFilter.ToStringIonTypes(Filter.IonTypes, true); comboRangeFrom.SelectedItem = Filter.FragmentRangeFirst.Label; comboRangeTo.SelectedItem = Filter.FragmentRangeLast.Label; textExclusionWindow.Text = Filter.PrecursorMzWindow != 0 ? Filter.PrecursorMzWindow.ToString(LocalizationHelper.CurrentCulture) : string.Empty; cbExclusionUseDIAWindow.Checked = Filter.ExclusionUseDIAWindow; cbAutoSelect.Checked = Filter.AutoSelect; _driverIons = new MeasuredIonListBoxDriver(listAlwaysAdd, Settings.Default.MeasuredIonList); _driverIons.LoadList(Filter.MeasuredIons); // Initialize library settings cbLibraryPick.Checked = (Libraries.Pick != TransitionLibraryPick.none); panelPick.Visible = cbLibraryPick.Checked; textTolerance.Text = Libraries.IonMatchTolerance.ToString(LocalizationHelper.CurrentCulture); textIonCount.Text = Libraries.IonCount.ToString(LocalizationHelper.CurrentCulture); if (Libraries.Pick == TransitionLibraryPick.filter) radioFiltered.Checked = true; else if (Libraries.Pick == TransitionLibraryPick.all_plus) radioAllAndFiltered.Checked = true; // Initialize instrument settings textMinMz.Text = Instrument.MinMz.ToString(LocalizationHelper.CurrentCulture); textMaxMz.Text = Instrument.MaxMz.ToString(LocalizationHelper.CurrentCulture); cbDynamicMinimum.Checked = Instrument.IsDynamicMin; textMzMatchTolerance.Text = Instrument.MzMatchTolerance.ToString(LocalizationHelper.CurrentCulture); if (Instrument.MaxTransitions.HasValue) textMaxTrans.Text = Instrument.MaxTransitions.Value.ToString(LocalizationHelper.CurrentCulture); if (Instrument.MaxInclusions.HasValue) textMaxInclusions.Text = Instrument.MaxInclusions.Value.ToString(LocalizationHelper.CurrentCulture); if (Instrument.MinTime.HasValue) textMinTime.Text = Instrument.MinTime.Value.ToString(LocalizationHelper.CurrentCulture); if (Instrument.MaxTime.HasValue) textMaxTime.Text = Instrument.MaxTime.Value.ToString(LocalizationHelper.CurrentCulture); // Initialize full-scan settings FullScanSettingsControl = new FullScanSettingsControl(_parent) { Anchor = (AnchorStyles.Top | AnchorStyles.Left), Location = new Point(0, 0), Size = new Size(363, 491) }; FullScanSettingsControl.IsolationSchemeChangedEvent += IsolationSchemeChanged; tabFullScan.Controls.Add(FullScanSettingsControl); // VISUAL: // - Store the distance between the cbExclusionDIAWindow and the lower end of the box (to use as margin later) // - Shift the cbExclusionDIAWindow down (it is only higher in the designer for better manipulation) _lower_margin = groupBox1.Height - textExclusionWindow.Location.Y - textExclusionWindow.Height; int pixelShift = cbExclusionUseDIAWindow.Location.Y - lbPrecursorMzWindow.Location.Y; cbExclusionUseDIAWindow.Location = new Point(cbExclusionUseDIAWindow.Location.X, cbExclusionUseDIAWindow.Location.Y - pixelShift); DoIsolationSchemeChanged(); }
public PeptideSettingsUI(SkylineWindow parent, LibraryManager libraryManager) { InitializeComponent(); btnUpdateIonMobilityLibraries.Visible = false; // TODO: ion mobility libraries are more complex than initially thought - put this off until after summer 2014 release _parent = parent; _libraryManager = libraryManager; _peptideSettings = parent.DocumentUI.Settings.PeptideSettings; // Initialize digestion settings _driverEnzyme = new SettingsListComboDriver<Enzyme>(comboEnzyme, Settings.Default.EnzymeList); _driverEnzyme.LoadList(_peptideSettings.Enzyme.GetKey()); for (int i = DigestSettings.MIN_MISSED_CLEAVAGES; i <= DigestSettings.MAX_MISSED_CLEAVAGES; i++) comboMissedCleavages.Items.Add(i.ToString(CultureInfo.InvariantCulture)); comboMissedCleavages.SelectedItem = Digest.MaxMissedCleavages.ToString(LocalizationHelper.CurrentCulture); if (comboMissedCleavages.SelectedIndex < 0) comboMissedCleavages.SelectedIndex = 0; cbRaggedEnds.Checked = Digest.ExcludeRaggedEnds; // Initialize prediction settings _driverRT = new SettingsListComboDriver<RetentionTimeRegression>(comboRetentionTime, Settings.Default.RetentionTimeList); string sel = (Prediction.RetentionTime == null ? null : Prediction.RetentionTime.Name); _driverRT.LoadList(sel); cbUseMeasuredRT.Checked = textMeasureRTWindow.Enabled = Prediction.UseMeasuredRTs; if (Prediction.MeasuredRTWindow.HasValue) textMeasureRTWindow.Text = Prediction.MeasuredRTWindow.Value.ToString(LocalizationHelper.CurrentCulture); _driverDT = new SettingsListComboDriver<DriftTimePredictor>(comboDriftTimePredictor, Settings.Default.DriftTimePredictorList); string selDT = (Prediction.DriftTimePredictor == null ? null : Prediction.DriftTimePredictor.Name); _driverDT.LoadList(selDT); cbUseSpectralLibraryDriftTimes.Checked = textSpectralLibraryDriftTimesResolvingPower.Enabled = Prediction.UseLibraryDriftTimes; if (Prediction.LibraryDriftTimesResolvingPower.HasValue) textSpectralLibraryDriftTimesResolvingPower.Text = Prediction.LibraryDriftTimesResolvingPower.Value.ToString(LocalizationHelper.CurrentCulture); // Initialize filter settings _driverExclusion = new SettingsListBoxDriver<PeptideExcludeRegex>(listboxExclusions, Settings.Default.PeptideExcludeList); _driverExclusion.LoadList(null, Filter.Exclusions); textExcludeAAs.Text = Filter.ExcludeNTermAAs.ToString(LocalizationHelper.CurrentCulture); textMaxLength.Text = Filter.MaxPeptideLength.ToString(LocalizationHelper.CurrentCulture); textMinLength.Text = Filter.MinPeptideLength.ToString(LocalizationHelper.CurrentCulture); cbAutoSelect.Checked = Filter.AutoSelect; // Initialize spectral library settings _driverLibrary = new SettingsListBoxDriver<LibrarySpec>(listLibraries, Settings.Default.SpectralLibraryList); IList<LibrarySpec> listLibrarySpecs = Libraries.LibrarySpecs; _driverLibrary.LoadList(null, listLibrarySpecs); _driverBackgroundProteome = new SettingsListComboDriver<BackgroundProteomeSpec>(comboBackgroundProteome, Settings.Default.BackgroundProteomeList); _driverBackgroundProteome.LoadList(_peptideSettings.BackgroundProteome.Name); panelPick.Visible = listLibrarySpecs.Count > 0; btnExplore.Enabled = listLibraries.Items.Count > 0; comboMatching.SelectedIndex = (int) Libraries.Pick; _lastRankId = Libraries.RankId; _lastPeptideCount = Libraries.PeptideCount.HasValue ? Libraries.PeptideCount.Value.ToString(LocalizationHelper.CurrentCulture) : null; UpdateRanks(null); // Initialize modification settings _driverStaticMod = new SettingsListBoxDriver<StaticMod>(listStaticMods, Settings.Default.StaticModList); _driverStaticMod.LoadList(null, Modifications.StaticModifications); _driverHeavyMod = new SettingsListBoxDriver<StaticMod>(listHeavyMods, Settings.Default.HeavyModList); _driverLabelType = new LabelTypeComboDriver(comboLabelType, Modifications, _driverHeavyMod, labelStandardType, comboStandardType, listStandardTypes); textMaxVariableMods.Text = Modifications.MaxVariableMods.ToString(LocalizationHelper.CurrentCulture); textMaxNeutralLosses.Text = Modifications.MaxNeutralLosses.ToString(LocalizationHelper.CurrentCulture); // Initialize peak scoring settings. _driverPeakScoringModel = new SettingsListComboDriver<PeakScoringModelSpec>(comboPeakScoringModel, Settings.Default.PeakScoringModelList); var peakScoringModel = _peptideSettings.Integration.PeakScoringModel; _driverPeakScoringModel.LoadList(peakScoringModel != null ? peakScoringModel.Name : null); IsShowLibraryExplorer = false; tabControl1.TabPages.Remove(tabIntegration); comboNormalizationMethod.Items.AddRange( NormalizationMethod.ListNormalizationMethods(parent.DocumentUI).ToArray()); comboNormalizationMethod.SelectedItem = _peptideSettings.Quantification.NormalizationMethod; comboWeighting.Items.AddRange(RegressionWeighting.All.Cast<object>().ToArray()); comboWeighting.SelectedItem = _peptideSettings.Quantification.RegressionWeighting; comboRegressionFit.Items.AddRange(RegressionFit.All.Cast<object>().ToArray()); comboRegressionFit.SelectedItem = _peptideSettings.Quantification.RegressionFit; comboQuantMsLevel.SelectedIndex = Math.Max(0, _quantMsLevels.IndexOf(_peptideSettings.Quantification.MsLevel)); tbxQuantUnits.Text = _peptideSettings.Quantification.Units; }