Example #1
0
        public void ClearListsTablesFigures(bool clear_following_forms)
        {
            Sweet.lollipop.raw_experimental_components.Clear();
            Sweet.lollipop.raw_quantification_components.Clear();
            foreach (InputFile f in Sweet.lollipop.input_files)
            {
                f.reader.Clear();
            }

            if (clear_following_forms)
            {
                ProteoformSweet parMDI = ((MainWindow)MDIHelpers.getParentWindow(this)).MDIParentControl;
                for (int i = parMDI.forms.IndexOf(this) + 1; i < (parMDI).forms.Count; i++)
                {
                    ISweetForm sweet = (parMDI).forms[i];
                    if (sweet as TopDown == null)
                    {
                        sweet.ClearListsTablesFigures(false);
                    }
                }
            }

            dgv_fileList.Rows.Clear();
            dgv_rawComponents.Rows.Clear();
            dgv_chargeStates.Rows.Clear();

            dgv_fileList.DataSource      = null;
            dgv_rawComponents.DataSource = null;
            dgv_chargeStates.DataSource  = null;
        }
Example #2
0
        public void FillTablesAndCharts()
        {
            DisplayUtility.FillDataGridView(dgv_fileList, Sweet.lollipop.get_files(Sweet.lollipop.input_files, new Purpose[] { Purpose.Identification, Purpose.Quantification }).Select(c => new DisplayInputFile(c)));
            DisplayInputFile.FormatInputFileTable(dgv_fileList, new Purpose[] { Purpose.Identification, Purpose.Quantification });
            dgv_fileList.ReadOnly = true;

            if ((bool)rb_displayIdentificationComponents.IsChecked && Sweet.lollipop.raw_experimental_components.Count > 0)
            {
                DisplayUtility.FillDataGridView(dgv_rawComponents, Sweet.lollipop.raw_experimental_components.Select(c => new DisplayComponent(c)));
            }

            if ((bool)rb_displayQuantificationComponents.IsChecked && Sweet.lollipop.raw_quantification_components.Count > 0)
            {
                DisplayUtility.FillDataGridView(dgv_rawComponents, Sweet.lollipop.raw_quantification_components.Select(c => new DisplayComponent(c)));
            }

            DisplayComponent.FormatComponentsTable(dgv_rawComponents);

            rtb_raw_components_counts.Text = ResultsSummaryGenerator.raw_components_report();

            ProteoformSweet parMDI     = ((MainWindow)MDIHelpers.getParentWindow(this)).MDIParentControl;
            NeuCodePairs    pairs_form = parMDI.neuCodePairs;

            if (Sweet.lollipop.neucode_labeled && pairs_form.ReadyToRunTheGamut())
            {
                pairs_form.RunTheGamut(false);
            }
        }
Example #3
0
        private void bt_stepthru_Click(object sender, RoutedEventArgs e)
        {
            ProteoformSweet parMDI = ((MainWindow)MDIHelpers.getParentWindow(this)).MDIParentControl; //get the parent control of the form;

            ///parMDI.resultsToolStripMenuItem.ShowDropDown();
            MessageBox.Show("Use the Results menu to step through processing results.\n\n" +
                            "Load results and databases in this panel, and then proceed to Raw Experimental Components.", "Step Through Introduction.");
        }
Example #4
0
 private void btn_fullRun_Click(object sender, RoutedEventArgs e)
 {
     ProteoformSweet parMDI = ((MainWindow)MDIHelpers.getParentWindow(this)).MDIParentControl; //get the parent control of the form;
     ///Stopwatch successful_run = parMDI.full_run();
     ///if (successful_run != null) MessageBox.Show("Successfully ran method in "
     ///    + String.Format("{0:00}:{1:00}:{2:00}.{3:00}", successful_run.Elapsed.Hours, successful_run.Elapsed.Minutes, successful_run.Elapsed.Seconds, successful_run.Elapsed.Milliseconds / 10)
     ///    + ". Feel free to explore using the Results menu.", "Full Run");
     ///else MessageBox.Show("Method did not successfully run.", "Full Run");
 }
Example #5
0
 public void InitializeParameterSet()
 {
     //tb_resultsFolder.Text = Sweet.lollipop.results_folder;
     rb_neucode.IsChecked             = Sweet.lollipop.neucode_labeled;
     rb_unlabeled.IsChecked           = !rb_neucode.IsChecked;
     cb_calibrate_td_files.IsChecked  = Sweet.lollipop.calibrate_td_files;
     cb_calibrate_raw_files.IsChecked = Sweet.lollipop.calibrate_raw_files;
     ProteoformSweet parMDI = ((MainWindow)MDIHelpers.getParentWindow(this)).MDIParentControl; //get the parent control of the form;
     ///parMDI.enable_neuCodeProteoformPairsToolStripMenuItem(Sweet.lollipop.neucode_labeled);
     ///parMDI.enable_quantificationToolStripMenuItem(Sweet.lollipop.input_files.Any(f => f.purpose == Purpose.Quantification));
     ///parMDI.enable_topDownToolStripMenuItem(Sweet.lollipop.input_files.Any(f => f.purpose == Purpose.TopDown));
 }
Example #6
0
        public testWin()
        {
            InitializeComponent();
            ProteoformSweet ctn = new ProteoformSweet();
            Window          wdo = new Window
            {
                Title     = "Proteo Display",
                Content   = new ProteoformSweet(),
                MinHeight = 450,
                MinWidth  = 800
            };

            wdo.Show();
        }
Example #7
0
        public void ClearListsTablesFigures(bool clear_following)
        {
            Sweet.lollipop.input_files.Clear();
            Sweet.save_actions.Clear();
            Sweet.loaded_actions.Clear();
            Sweet.lollipop.results_folder = "";
            //tb_resultsFolder.Text = "";

            ProteoformSweet parMDI = ((MainWindow)MDIHelpers.getParentWindow(this)).MDIParentControl; //get the parent control of the form;

            if (clear_following)
            {
                for (int i = parMDI.forms.IndexOf(this) + 1; i < parMDI.forms.Count; i++)
                {
                    ISweetForm sweet = parMDI.forms[i];
                    sweet.ClearListsTablesFigures(false);
                    sweet.FillTablesAndCharts();
                }
            }
            FillTablesAndCharts();
        }
Example #8
0
        public void RunTheGamut(bool full_run)
        {
            ClearListsTablesFigures(true);
            Sweet.lollipop.getConditionBiorepFractionLabels(Sweet.lollipop.neucode_labeled, Sweet.lollipop.input_files); //examines the conditions and bioreps to determine the maximum number of observations to require for quantification

            ProteoformSweet parMDI = ((MainWindow)MDIHelpers.getParentWindow(this)).MDIParentControl;

            parMDI.quantification.InitializeConditionsParameters();
            parMDI.aggregatedProteoforms.InitializeParameterSet();
            Parallel.Invoke
            (
                () => Sweet.lollipop.process_raw_components(Sweet.lollipop.input_files, Sweet.lollipop.raw_experimental_components, Purpose.Identification, true),
                () => Sweet.lollipop.process_raw_components(Sweet.lollipop.input_files, Sweet.lollipop.raw_quantification_components, Purpose.Quantification, true)
            );
            if (ComponentReader.components_with_errors.Count > 0)
            {
                MessageBox.Show("Error in Deconvolution Results File: " + string.Join(", ", ComponentReader.components_with_errors));
                ClearListsTablesFigures(true);
                return;
            }

            FillTablesAndCharts();
        }