Exemplo n.º 1
0
        public static (bool UseSettings, bool AskAgain) Show(string title, string caption)
        {
            MsgBox = new ProteaseSpecificMsgBox(title, caption);
            MsgBox.ShowDialog();

            return(UseSettings, AskAgain);
        }
Exemplo n.º 2
0
        public static bool UseNonSpecificRecommendedSettings()
        {
            bool useRecommendedSettings = false;

            //check with the user to update params
            if (Params.AskAboutNonSpecificParams)
            {
                var results = ProteaseSpecificMsgBox.Show("Use Non-Specific Recommendations?",
                                                          "We recommend using the following parameters for non-specific searches:\n" +
                                                          "\t-Check 'Non-Specific Search' (Search Task Only)\n" +
                                                          "\t-Use '25' for 'Max Peptide Length'.\n\n" +
                                                          "Would you like to use these recommended settings?");

                if (results.UseSettings)
                {
                    useRecommendedSettings = true;
                }
                //else do nothing

                //if they don't want to see this again, save the answer
                if (!results.AskAgain)
                {
                    Params.AskAboutNonSpecificParams = false;
                    Params.UseNonSpecificParams      = results.UseSettings;

                    Toml.WriteFile(Params, Path.Combine(GlobalVariables.DataDir, @"GUIsettings.toml"), MetaMorpheusTask.tomlConfig);
                }
            }
            else if (Params.UseNonSpecificParams) //user didn't want to check in, but wanted to update last time
            {
                useRecommendedSettings = true;
            }
            //else do nothing
            return(useRecommendedSettings);
        }
Exemplo n.º 3
0
        public static bool UseTopDownRecommendedSettings()
        {
            bool useRecommendedSettings = false;

            //check with the user to update params
            if (Params.AskAboutTopDownParams)
            {
                var results = ProteaseSpecificMsgBox.Show("Use Top-Down Recommendations?",
                                                          "We recommend using the following parameters for top-down searches:\n" +
                                                          "\t-Uncheck 'Use Provided Precursor'\n" +
                                                          "\t-Use '60' for 'Deconvolution Max Assumed Charge State'\n" +
                                                          "\t-Uncheck 'Trim MS2 Peaks'\n" +
                                                          "\t-Uncheck all variable mods (Please use a GPTMD database instead)\n" +
                                                          "\t-SEARCH TASK ONLY: Check 'No Quantification'\n" +
                                                          "\t-SEARCH TASK ONLY: Check '1, 2, or 3 Missed Monoisotopic Peaks'\n" +
                                                          "\t-GPTMD TASK ONLY: Search for only acetylation, phosphorylation, and oxidation of M\n\n" +
                                                          "Would you like to use these recommended settings?");

                if (results.UseSettings)
                {
                    useRecommendedSettings = true;
                }
                //else do nothing

                //if they don't want to see this again, save the answer
                if (!results.AskAgain)
                {
                    Params.AskAboutTopDownParams = false;
                    Params.UseTopDownParams      = results.UseSettings;

                    Toml.WriteFile(Params, Path.Combine(GlobalVariables.DataDir, @"GUIsettings.toml"), MetaMorpheusTask.tomlConfig);
                }
            }
            else if (Params.UseTopDownParams) //user didn't want to check in, but wanted to update last time
            {
                useRecommendedSettings = true;
            }
            //else do nothing
            return(useRecommendedSettings);
        }