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;
 }
示例#2
0
        public void ShowImportPeptideSearchDlg(ImportPeptideSearchDlg.Workflow? workflowType)
        {
            if (!CheckDocumentExists(Resources.SkylineWindow_ShowImportPeptideSearchDlg_You_must_save_this_document_before_importing_a_peptide_search_))
            {
                return;
            }

            using (var dlg = !workflowType.HasValue
                   ? new ImportPeptideSearchDlg(this, _libraryManager)
                   : new ImportPeptideSearchDlg(this, _libraryManager, workflowType.Value))
            {
                if (dlg.ShowDialog(this) == DialogResult.OK)
                {
                    // Nothing to do; the dialog does all the work.
                }
            }
        }
        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;
            }
        }
 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();
     }
 }