public void Initialize(ImportPeptideSearchDlg.Workflow workflow) { if (workflow != ImportPeptideSearchDlg.Workflow.dia) { int offset = lblTolerance.Top - cbExclusionUseDIAWindow.Top; Array.ForEach(new Control[] { lblTolerance, txtTolerance, lblToleranceUnits, lblIonCount, txtIonCount, lblIonCountUnits }, c => c.Top -= offset); cbExclusionUseDIAWindow.Hide(); } // If these are just the document defaults, use something more appropriate for DIA else { var settingsCurrent = _documentContainer.Document.Settings.TransitionSettings; var settings = settingsCurrent; var defSettings = SrmSettingsList.GetDefault().TransitionSettings; if (Equals(settings.Filter, defSettings.Filter)) { settings = settings.ChangeFilter(settings.Filter .ChangePeptidePrecursorCharges(new[] { Adduct.DOUBLY_PROTONATED, Adduct.TRIPLY_PROTONATED }) .ChangePeptideProductCharges(new[] { Adduct.SINGLY_PROTONATED, Adduct.DOUBLY_PROTONATED }) .ChangePeptideIonTypes(new[] { IonType.y, IonType.b, IonType.precursor })); } if (Equals(settings.Libraries, defSettings.Libraries)) { settings = settings.ChangeLibraries(settings.Libraries.ChangeIonMatchTolerance(0.05) .ChangeIonCount(6) .ChangeMinIonCount(6)); } if (!ReferenceEquals(settings, settingsCurrent)) { SetFields(settings); } } }
public void Initialize(ImportPeptideSearchDlg.Workflow workflow) { if (workflow != ImportPeptideSearchDlg.Workflow.dia) { int offset = lblTolerance.Top - cbExclusionUseDIAWindow.Top; Array.ForEach(new Control[] { lblTolerance, txtTolerance, lblToleranceUnits, lblIonCount, txtIonCount, lblIonCountUnits }, c => c.Top -= offset); cbExclusionUseDIAWindow.Hide(); } }
public void ForceWorkflow(ImportPeptideSearchDlg.Workflow workflowType) { WorkflowType = workflowType; grpWorkflow.Hide(); int offset = grpWorkflow.Height + (cbFilterForDocumentPeptides.Top - listSearchFiles.Bottom); listSearchFiles.Height += offset; cbFilterForDocumentPeptides.Top += offset; cbIncludeAmbiguousMatches.Top += offset; }
public BuildPeptideSearchLibrarySettings(double cutoffScore, IList <string> searchFileNames, IrtStandard standard, bool includeAmbiguousMatches, bool filterForDocumentPeptides, ImportPeptideSearchDlg.Workflow workFlow) { CutoffScore = cutoffScore; SearchFileNames = searchFileNames == null ? new List <AuditLogPath>() : searchFileNames.Select(AuditLogPath.Create).ToList(); Standard = standard; IncludeAmbiguousMatches = includeAmbiguousMatches; FilterForDocumentPeptides = filterForDocumentPeptides; WorkFlow = workFlow; }
public void Initialize(ImportPeptideSearchDlg.Workflow workflow) { if (workflow != ImportPeptideSearchDlg.Workflow.dia) { var nextTop = Controls.Cast <Control>().Select(c => c.Top).Where(t => t > cbExclusionUseDIAWindow.Top).Min(); int offset = nextTop - cbExclusionUseDIAWindow.Top; foreach (var control in Controls.Cast <Control>().Where(c => c.Top > cbExclusionUseDIAWindow.Top)) { control.Top -= offset; } cbExclusionUseDIAWindow.Hide(); } switch (workflow) { case ImportPeptideSearchDlg.Workflow.dia: case ImportPeptideSearchDlg.Workflow.prm: // If these are just the document defaults, use something more appropriate for DIA var settingsCurrent = _documentContainer.Document.Settings.TransitionSettings; var settings = settingsCurrent; var defSettings = SrmSettingsList.GetDefault().TransitionSettings; if (Equals(settings.Filter, defSettings.Filter)) { settings = settings.ChangeFilter(settings.Filter .ChangePeptidePrecursorCharges(new[] { Adduct.DOUBLY_PROTONATED, Adduct.TRIPLY_PROTONATED }) .ChangePeptideProductCharges(new[] { Adduct.SINGLY_PROTONATED, Adduct.DOUBLY_PROTONATED }) .ChangePeptideIonTypes(new[] { IonType.y, IonType.b, IonType.precursor }) .ChangeFragmentRangeFirstName(TransitionFilter.StartFragmentFinder.ION_3.GetKey()) .ChangeFragmentRangeLastName(TransitionFilter.EndFragmentFinder.LAST_ION.GetKey())); } if (Equals(settings.Libraries, defSettings.Libraries)) { settings = settings.ChangeLibraries(settings.Libraries.ChangeIonMatchTolerance(0.05) .ChangeIonCount(6) .ChangeMinIonCount(6)); } if (Equals(settings.Instrument, defSettings.Instrument)) { settings = settings.ChangeInstrument(settings.Instrument .ChangeMinMz(50) .ChangeMaxMz(2000)); } if (!ReferenceEquals(settings, settingsCurrent)) { SetFields(settings); } break; } }
public void ModifyOptionsForImportPeptideSearchWizard(ImportPeptideSearchDlg.Workflow workflow) { var settings = _documentContainer.Document.Settings; // Reduce MS1 filtering groupbox int sepMS1FromMS2 = groupBoxMS2.Top - groupBoxMS1.Bottom; int sepMS2FromRT = groupBoxRetentionTimeToKeep.Top - groupBoxMS2.Bottom; int sepMS2FromSel = cbHighSelectivity.Top - groupBoxMS2.Bottom; labelEnrichments.Visible = false; comboEnrichments.Visible = false; groupBoxMS1.Height -= comboEnrichments.Bottom - textPrecursorIsotopeFilter.Bottom; if (workflow == ImportPeptideSearchDlg.Workflow.dda) { // Set up precursor charges input textPrecursorCharges.Text = settings.TransitionSettings.Filter.PeptidePrecursorCharges.ToArray().ToString(", "); // Not L10N int precursorChargesTopDifference = lblPrecursorCharges.Top - groupBoxMS1.Top; lblPrecursorCharges.Top = groupBoxMS1.Top; textPrecursorCharges.Top -= precursorChargesTopDifference; textPrecursorCharges.Visible = true; lblPrecursorCharges.Visible = true; // Reposition MS1 filtering groupbox groupBoxMS1.Top = textPrecursorCharges.Bottom + sepMS1FromMS2; } if (workflow != ImportPeptideSearchDlg.Workflow.dia) { int newRadioTimeAroundTop = radioUseSchedulingWindow.Top; int radioTimeAroundTopDifference = radioKeepAllTime.Top - newRadioTimeAroundTop; radioUseSchedulingWindow.Visible = false; flowLayoutPanelUseSchedulingWindow.Visible = false; radioKeepAllTime.Top = newRadioTimeAroundTop; groupBoxRetentionTimeToKeep.Height -= radioTimeAroundTopDifference; } // Select defaults PrecursorIsotopesCurrent = FullScanPrecursorIsotopes.Count; if (workflow == ImportPeptideSearchDlg.Workflow.dia && settings.PeptideSettings.Prediction.RetentionTime != null && settings.PeptideSettings.Prediction.RetentionTime.Calculator is RCalcIrt) { radioUseSchedulingWindow.Checked = true; } else { radioTimeAroundMs2Ids.Checked = true; } if (workflow != ImportPeptideSearchDlg.Workflow.dda) { groupBoxMS2.Top = groupBoxMS1.Bottom + sepMS1FromMS2; cbHighSelectivity.Top = groupBoxMS2.Bottom + sepMS2FromSel; groupBoxRetentionTimeToKeep.Top = groupBoxMS2.Bottom + sepMS2FromRT; AcquisitionMethod = (workflow == ImportPeptideSearchDlg.Workflow.dia) ? FullScanAcquisitionMethod.DIA : FullScanAcquisitionMethod.Targeted; ProductMassAnalyzer = PrecursorMassAnalyzer; if (workflow == ImportPeptideSearchDlg.Workflow.dia && Settings.Default.IsolationSchemeList.Count > 1) { comboIsolationScheme.SelectedIndex = 1; } } else { // Hide MS/MS filtering groupbox entirely. groupBoxMS2.Visible = false; // Reposition selectivity checkbox and retention time filtering groupbox. cbHighSelectivity.Top = groupBoxMS1.Bottom + sepMS2FromSel; groupBoxRetentionTimeToKeep.Top = groupBoxMS1.Bottom + sepMS2FromRT; } }
public void ModifyOptionsForImportPeptideSearchWizard(ImportPeptideSearchDlg.Workflow workflow, Library lib) { var settings = _documentContainer.Document.Settings; // Reduce MS1 filtering groupbox int sepMS1FromMS2 = groupBoxMS2.Top - groupBoxMS1.Bottom; int sepMS2FromRT = groupBoxRetentionTimeToKeep.Top - groupBoxMS2.Bottom; int sepMS2FromSel = cbHighSelectivity.Top - groupBoxMS2.Bottom; labelEnrichments.Visible = false; comboEnrichments.Visible = false; groupBoxMS1.Height -= comboEnrichments.Bottom - textPrecursorIsotopeFilter.Bottom; if (workflow == ImportPeptideSearchDlg.Workflow.dda) { // Set up precursor charges input textPrecursorCharges.Text = settings.TransitionSettings.Filter.PeptidePrecursorCharges.ToArray().ToString(@", "); int precursorChargesTopDifference = lblPrecursorCharges.Top - groupBoxMS1.Top; lblPrecursorCharges.Top = groupBoxMS1.Top; textPrecursorCharges.Top -= precursorChargesTopDifference; textPrecursorCharges.Visible = true; lblPrecursorCharges.Visible = true; // Reposition MS1 filtering groupbox groupBoxMS1.Top = textPrecursorCharges.Bottom + sepMS1FromMS2; } if (workflow != ImportPeptideSearchDlg.Workflow.dia) { int newRadioTimeAroundTop = radioUseSchedulingWindow.Top; int radioTimeAroundTopDifference = radioKeepAllTime.Top - newRadioTimeAroundTop; radioUseSchedulingWindow.Visible = false; flowLayoutPanelUseSchedulingWindow.Visible = false; radioKeepAllTime.Top = newRadioTimeAroundTop; groupBoxRetentionTimeToKeep.Height -= radioTimeAroundTopDifference; } // Select defaults PrecursorIsotopesCurrent = FullScanPrecursorIsotopes.Count; if (workflow == ImportPeptideSearchDlg.Workflow.dia && settings.PeptideSettings.Prediction.RetentionTime != null && settings.PeptideSettings.Prediction.RetentionTime.Calculator is RCalcIrt) { radioUseSchedulingWindow.Checked = true; } else { radioTimeAroundMs2Ids.Checked = true; } if (workflow != ImportPeptideSearchDlg.Workflow.dda) { groupBoxMS2.Top = groupBoxMS1.Bottom + sepMS1FromMS2; cbHighSelectivity.Top = groupBoxMS2.Bottom + sepMS2FromSel; groupBoxRetentionTimeToKeep.Top = groupBoxMS2.Bottom + sepMS2FromRT; AcquisitionMethod = (workflow == ImportPeptideSearchDlg.Workflow.dia) ? FullScanAcquisitionMethod.DIA : FullScanAcquisitionMethod.Targeted; ProductMassAnalyzer = PrecursorMassAnalyzer; if (workflow == ImportPeptideSearchDlg.Workflow.dia && Settings.Default.IsolationSchemeList.Count > 1) { comboIsolationScheme.SelectedIndex = 1; } } else { // Hide MS/MS filtering groupbox entirely. groupBoxMS2.Visible = false; // Reposition selectivity checkbox and retention time filtering groupbox. cbHighSelectivity.Top = groupBoxMS1.Bottom + sepMS2FromSel; groupBoxRetentionTimeToKeep.Top = groupBoxMS1.Bottom + sepMS2FromRT; } // Ask about ion mobility filtering if any IM values in library if (lib != null && PeptideLibraries.HasIonMobilities(lib, null)) { useSpectralLibraryIonMobilityValuesControl.Top = groupBoxRetentionTimeToKeep.Bottom + sepMS1FromMS2; useSpectralLibraryIonMobilityValuesControl.InitializeSettings(_documentContainer, true); useSpectralLibraryIonMobilityValuesControl.Width = groupBoxMS1.Width; useSpectralLibraryIonMobilityValuesControl.HideControls(); var adjustedHeight = useSpectralLibraryIonMobilityValuesControl.Bottom + label1.Height; // Add control height plus a margin MinimumSize = new Size(MinimumSize.Width, adjustedHeight); Height = adjustedHeight; } else { useSpectralLibraryIonMobilityValuesControl.Visible = false; } }
public void ForceWorkflow(ImportPeptideSearchDlg.Workflow workflowType) { WorkflowType = workflowType; grpWorkflow.Hide(); }
public void ModifyOptionsForImportPeptideSearchWizard(ImportPeptideSearchDlg.Workflow workflow) { // Reduce MS1 filtering groupbox int precursorChargesShift = groupBoxMS2.Top - groupBoxMS1.Bottom; labelEnrichments.Hide(); comboEnrichments.Hide(); groupBoxMS1.Height = textPrecursorIsotopeFilter.Bottom + groupBoxMS1.Height - comboEnrichments.Bottom; if (workflow == ImportPeptideSearchDlg.Workflow.dda) { // Set up precursor charges input textPrecursorCharges.Text = SkylineWindow.Document.Settings.TransitionSettings.Filter.PrecursorCharges.ToArray().ToString(", "); // Not L10N int precursorChargesTopDifference = lblPrecursorCharges.Top - groupBoxMS1.Top; lblPrecursorCharges.Top = groupBoxMS1.Top; textPrecursorCharges.Top -= precursorChargesTopDifference; textPrecursorCharges.Show(); lblPrecursorCharges.Show(); // Reposition MS1 filtering groupbox groupBoxMS1.Top = textPrecursorCharges.Bottom + precursorChargesShift; } int newRadioTimeAroundTop = radioUseSchedulingWindow.Top; int radioTimeAroundTopDifference = radioKeepAllTime.Top - newRadioTimeAroundTop; radioUseSchedulingWindow.Hide(); flowLayoutPanelUseSchedulingWindow.Hide(); radioKeepAllTime.Top = newRadioTimeAroundTop; groupBoxRetentionTimeToKeep.Height -= radioTimeAroundTopDifference; // Select defaults PrecursorIsotopesCurrent = FullScanPrecursorIsotopes.Count; radioTimeAroundMs2Ids.Checked = true; int nextGroupBoxTop = groupBoxMS1.Bottom + precursorChargesShift; if (workflow != ImportPeptideSearchDlg.Workflow.dda) { groupBoxMS2.Top = nextGroupBoxTop; groupBoxRetentionTimeToKeep.Top = groupBoxMS2.Bottom + precursorChargesShift; AcquisitionMethod = (workflow == ImportPeptideSearchDlg.Workflow.dia) ? FullScanAcquisitionMethod.DIA : FullScanAcquisitionMethod.Targeted; ProductMassAnalyzer = PrecursorMassAnalyzer; if (workflow == ImportPeptideSearchDlg.Workflow.dia && Settings.Default.IsolationSchemeList.Count > 1) { comboIsolationScheme.SelectedIndex = 1; } } else { // Hide MS/MS filtering groupbox entirely. groupBoxMS2.Hide(); // Reduce and reposition Retention time filtering groupbox. groupBoxRetentionTimeToKeep.Top = nextGroupBoxTop; } }