Exemplo n.º 1
0
        private void dgv_ET_Peak_List_CellClick(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            int clickedRow = dgv_ET_Peak_List.HitTest(e.X, e.Y).RowIndex;
            int clickedCol = dgv_ET_Peak_List.HitTest(e.X, e.Y).ColumnIndex;

            if (clickedRow < Sweet.lollipop.et_relations.Count && clickedRow >= 0 && clickedCol >= 0 && clickedCol < dgv_ET_Peak_List.ColumnCount)
            {
                if (e.Button == System.Windows.Forms.MouseButtons.Left)
                {
                    ct_ET_peakList.ChartAreas[0].AxisX.StripLines.Clear();
                    DeltaMassPeak selected_peak = (dgv_ET_Peak_List.Rows[clickedRow].DataBoundItem as DisplayObject).display_object as DeltaMassPeak;
                    DisplayUtility.GraphSelectedDeltaMassPeak(ct_ET_peakList, selected_peak, Sweet.lollipop.et_relations);
                }
                else
                {
                    if (e.Button == System.Windows.Forms.MouseButtons.Right && clickedRow >= 0 && clickedRow < Sweet.lollipop.et_relations.Count)
                    {
                        System.Windows.Forms.ContextMenuStrip ET_peak_List_Menu = new System.Windows.Forms.ContextMenuStrip();
                        int position_xy_mouse_row = dgv_ET_Peak_List.HitTest(e.X, e.Y).RowIndex;

                        DisplayDeltaMassPeak selected_peak = dgv_ET_Peak_List.Rows[clickedRow].DataBoundItem as DisplayDeltaMassPeak;

                        if (position_xy_mouse_row > 0)
                        {
                            ET_peak_List_Menu.Items.Add("Increase Experimental Mass " + Lollipop.MONOISOTOPIC_UNIT_MASS + " Da").Name = "IncreaseMass";
                            ET_peak_List_Menu.Items.Add("Decrease Experimental Mass " + Lollipop.MONOISOTOPIC_UNIT_MASS + " Da").Name = "DecreaseMass";
                        }
                        ET_peak_List_Menu.Show(dgv_ET_Peak_List, new System.Drawing.Point(e.X, e.Y));

                        //event menu click
                        ET_peak_List_Menu.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler((s, ev) => ET_peak_List_Menu_ItemClicked(s, ev, selected_peak));
                    }
                }
            }
        }
Exemplo n.º 2
0
 private void ct_ET_peakList_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if (e.Button == System.Windows.Forms.MouseButtons.Left)
     {
         DisplayUtility.tooltip_graph_display(ct_ET_peakList_tt, e, ct_ET_peakList, ct_ET_peakList_prevPosition);
     }
 }
Exemplo n.º 3
0
        private void tb_filter1_TextChanged(object sender, TextChangedEventArgs e)
        {
            int selected_index = Lollipop.file_lists.ToList().IndexOf(cmb_loadTable1.SelectedItem.ToString());

            DisplayUtility.FillDataGridView(dgv_loadFiles1, ExtensionMethods.filter(Sweet.lollipop.get_files(Sweet.lollipop.input_files, Lollipop.file_types[selected_index]), tb_filter1.Text).OfType <InputFile>().Select(f => new DisplayInputFile(f)));
            DisplayInputFile.FormatInputFileTable(dgv_loadFiles1, Lollipop.file_types[selected_index]);
        }
Exemplo n.º 4
0
        private void add_files(ComboBox cmb, System.Windows.Forms.DataGridView dgv)
        {
            int selected_index = Lollipop.file_lists.ToList().IndexOf(cmb.Text);

            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.Title       = cmb.SelectedItem.ToString();
            openFileDialog.Filter      = Lollipop.file_filters[selected_index];
            openFileDialog.Multiselect = true;

            bool dr = (bool)openFileDialog.ShowDialog();

            if (dr)
            {
                if (DisplayUtility.CheckForProteinFastas(cmb, openFileDialog.FileNames))
                {
                    return;                                                                      // todo: implement protein fasta usage
                }
                Sweet.lollipop.enter_input_files(openFileDialog.FileNames, Lollipop.acceptable_extensions[selected_index], Lollipop.file_types[selected_index], Sweet.lollipop.input_files, true);
                refresh_dgvs();
                if (openFileDialog.FileNames.Any(f => Path.GetExtension(f) == ".raw"))
                {
                    ValidateThermoMsFileReaderVersion();
                }
            }

            DisplayUtility.FillDataGridView(dgv, Sweet.lollipop.get_files(Sweet.lollipop.input_files, Lollipop.file_types[selected_index]).Select(f => new DisplayInputFile(f)));
            DisplayInputFile.FormatInputFileTable(dgv, Lollipop.file_types[selected_index]);
        }
Exemplo n.º 5
0
        private void display_light_proteoforms()
        {
            List <IAggregatable> components = (selected_pf == null) ? new List <IAggregatable>() :
                                              ((bool)ra ?
                                               selected_pf.aggregated : (
                                                   (bool)rb ?
                                                   selected_pf.lt_quant_components.ToList <IAggregatable>() :
                                                   selected_pf.hv_quant_components.ToList <IAggregatable>()));

            if (Sweet.lollipop.neucode_labeled && (bool)ra)
            {
                DisplayUtility.FillDataGridView(dgv_AcceptNeuCdLtProteoforms, components.Select(c => new DisplayNeuCodePair(c as NeuCodePair)));
            }
            else if ((bool)ra && selected_pf != null && selected_pf.topdown_id)
            {
                DisplayUtility.FillDataGridView(dgv_AcceptNeuCdLtProteoforms, (selected_pf as TopDownProteoform).topdown_hits.Select(h => new DisplayTopDownHit(h)));
            }
            else
            {
                DisplayUtility.FillDataGridView(dgv_AcceptNeuCdLtProteoforms, components.Select(c => new DisplayComponent(c as ProteoformSuiteInternal.Component)));
            }

            if (Sweet.lollipop.neucode_labeled && (bool)ra)
            {
                DisplayNeuCodePair.FormatNeuCodeTable(dgv_AcceptNeuCdLtProteoforms);
            }
            else if ((bool)ra && selected_pf != null && selected_pf.topdown_id)
            {
                DisplayTopDownHit.FormatTopDownHitsTable(dgv_AcceptNeuCdLtProteoforms, false);
            }
            else
            {
                DisplayComponent.FormatComponentsTable(dgv_AcceptNeuCdLtProteoforms);
            }
        }
Exemplo n.º 6
0
 private void tb_peakTableFilter_TextChanged(object sender, TextChangedEventArgs e)
 {
     IEnumerable<object> selected_peaks = tb_peakTableFilter.Text == "" ?
     Sweet.lollipop.ee_peaks :
     ExtensionMethods.filter(Sweet.lollipop.ee_peaks, tb_peakTableFilter.Text);
     DisplayUtility.FillDataGridView(dgv_EE_Peaks, selected_peaks.OfType<DeltaMassPeak>().Select(p => new DisplayDeltaMassPeak(p)));
     DisplayDeltaMassPeak.FormatPeakListGridView(dgv_EE_Peaks, true);
 }
 private void btn_downloadUniProtPtmList_Click(object sender, EventArgs e)
 {
     Lollipop.enter_uniprot_ptmlist(Environment.CurrentDirectory);
     DisplayUtility.FillDataGridView(dgv_loadFiles, Sweet.lollipop.get_files(Sweet.lollipop.input_files, Lollipop.file_types[cmb_loadTable.SelectedIndex]).Select(f => new DisplayInputFile(f)));
     DisplayInputFile.FormatInputFileTable(dgv_loadFiles, Lollipop.file_types[cmb_loadTable.SelectedIndex]);
     btn_downloadUniProtPtmList.IsEnabled = false;
     SetMakeDatabaseButton();
 }
        private void tb_modTableFilter_TextChanged(object sender, EventArgs e)
        {
            IEnumerable <object> selected_unmods = tb_modTableFilter.Text == "" ?
                                                   Sweet.lollipop.theoretical_database.unlocalized_lookup.Values :
                                                   ExtensionMethods.filter(Sweet.lollipop.theoretical_database.unlocalized_lookup.Values, tb_modTableFilter.Text);

            DisplayUtility.FillDataGridView(dgv_unlocalizedModifications, selected_unmods.OfType <UnlocalizedModification>().Select(u => new DisplayUnlocalizedModification(u)));
            DisplayUnlocalizedModification.FormatUnlocalizedModificationTable(dgv_unlocalizedModifications);
        }
        private void tb_relationTableFilter_TextChanged(object sender, EventArgs e)
        {
            IEnumerable <object> selected_relations = tb_relationTableFilter.Text == "" ?
                                                      ((bool)cbdiscoveryhistogram ? et_histogram_from_unmod.OfType <ProteoformRelation>().Select(p => new DisplayProteoformRelation(p)) : Sweet.lollipop.et_relations.OfType <ProteoformRelation>().Select(p => new DisplayProteoformRelation(p)))
                : (ExtensionMethods.filter(((bool)cbdiscoveryhistogram ? et_histogram_from_unmod.OfType <ProteoformRelation>().Select(p => new DisplayProteoformRelation(p)) : Sweet.lollipop.et_relations.OfType <ProteoformRelation>().Select(p => new DisplayProteoformRelation(p))), tb_relationTableFilter.Text));

            DisplayUtility.FillDataGridView(dgv_ET_Relations, selected_relations);
            DisplayProteoformRelation.FormatRelationsGridView(dgv_ET_Relations, true, false, (bool)cbdiscoveryhistogram);
        }
Exemplo n.º 10
0
        private void btn_clearFiles_Click(object sender, EventArgs e)
        {
            List <InputFile> files_to_remove = Sweet.lollipop.get_files(Sweet.lollipop.input_files, Lollipop.file_types[cmb_loadTable.SelectedIndex]).ToList();

            Sweet.save_actions.RemoveAll(a => files_to_remove.Any(f => a.Contains(f.complete_path)));
            Sweet.lollipop.input_files = Sweet.lollipop.input_files.Except(files_to_remove).ToList();
            DisplayUtility.FillDataGridView(dgv_loadFiles, Sweet.lollipop.get_files(Sweet.lollipop.input_files, Lollipop.file_types[cmb_loadTable.SelectedIndex]).Select(f => new DisplayInputFile(f)));
            DisplayInputFile.FormatInputFileTable(dgv_loadFiles, Lollipop.file_types[cmb_loadTable.SelectedIndex]);
        }
Exemplo n.º 11
0
 public void reload_database_list()
 {
     cmb_loadTable.Items.Clear();
     Lollipop.file_lists.ToList().ForEach(itm => cmb_loadTable.Items.Add(itm));//might be a problem
     cmb_loadTable.SelectedIndex = 2;
     DisplayUtility.FillDataGridView(dgv_loadFiles, Sweet.lollipop.get_files(Sweet.lollipop.input_files, Lollipop.file_types[cmb_loadTable.SelectedIndex]).Select(f => new DisplayInputFile(f)));
     DisplayInputFile.FormatInputFileTable(dgv_loadFiles, Lollipop.file_types[cmb_loadTable.SelectedIndex]);
     initialize_table_bindinglist();
 }
Exemplo n.º 12
0
        private void tb_tableFilter_TextChanged(object sender, EventArgs e)
        {
            IEnumerable <object> selected_td = tb_tableFilter.Text == "" ?
                                               Sweet.lollipop.topdown_proteoforms :
                                               ExtensionMethods.filter(Sweet.lollipop.topdown_proteoforms, tb_tableFilter.Text);

            DisplayUtility.FillDataGridView(dgv_TD_proteoforms, selected_td.OfType <TopDownProteoform>().Select(t => new DisplayTopDownProteoform(t)));
            DisplayTopDownProteoform.FormatTopDownTable(dgv_TD_proteoforms, false);
        }
Exemplo n.º 13
0
 private void tb_relationTableFilter_TextChanged(object sender, TextChangedEventArgs e)
 {
     List<DisplayProteoformRelation> display_relations = Sweet.lollipop.ee_relations.Select(p => new DisplayProteoformRelation(p)).ToList();
     IEnumerable<object> selected_relations = tb_relationTableFilter.Text == "" ?
         display_relations :
         ExtensionMethods.filter(display_relations, tb_relationTableFilter.Text);
     DisplayUtility.FillDataGridView(dgv_EE_Relations, selected_relations.OfType<DisplayProteoformRelation>());
     DisplayProteoformRelation.FormatRelationsGridView(dgv_EE_Relations, false, true, false);
 }
Exemplo n.º 14
0
 private void dgv_RawQuantComp_MI_masses_CellContentClick(object sender, System.Windows.Forms.DataGridViewCellEventArgs e)
 {
     if (e.RowIndex >= 0)
     {
         Component c = ((Component)((DisplayComponent)this.dgv_rawComponents.Rows[e.RowIndex].DataBoundItem).display_object);
         DisplayUtility.FillDataGridView(dgv_chargeStates, c.charge_states.Select(cs => new DisplayChargeState(cs)));
         DisplayChargeState.FormatChargeStateTable(dgv_chargeStates);
     }
 }
Exemplo n.º 15
0
        private void tb_tableFilter_TextChanged(object sender, TextChangedEventArgs e)
        {
            IEnumerable <object> selected_aggregates = tb_tableFilter.Text == "" ?
                                                       Sweet.lollipop.target_proteoform_community.experimental_proteoforms :
                                                       ExtensionMethods.filter(Sweet.lollipop.target_proteoform_community.experimental_proteoforms, tb_tableFilter.Text);

            DisplayUtility.FillDataGridView(dgv_AggregatedProteoforms, selected_aggregates.OfType <ExperimentalProteoform>().Select(ep => new DisplayExperimentalProteoform(ep)));
            DisplayExperimentalProteoform.FormatAggregatesTable(dgv_AggregatedProteoforms);
        }
Exemplo n.º 16
0
        private void drag_drop(System.Windows.Forms.DragEventArgs e, ComboBox cmb, System.Windows.Forms.DataGridView dgv)
        {
            int selected_index = Lollipop.file_lists.ToList().IndexOf(cmb.Text);

            string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
            Sweet.lollipop.enter_input_files(files, Lollipop.acceptable_extensions[selected_index], Lollipop.file_types[selected_index], Sweet.lollipop.input_files, true);
            refresh_dgvs();
            DisplayUtility.FillDataGridView(dgv, Sweet.lollipop.get_files(Sweet.lollipop.input_files, Lollipop.file_types[selected_index]).Select(f => new DisplayInputFile(f)));
            DisplayInputFile.FormatInputFileTable(dgv, Lollipop.file_types[selected_index]);
        }
 public void FillTablesAndCharts()
 {
     reload_database_list();
     DisplayUtility.FillDataGridView(dgv_Database, Sweet.lollipop.target_proteoform_community.theoretical_proteoforms.Select(t => new DisplayTheoreticalProteoform(t)));
     initialize_table_bindinglist();
     DisplayTheoreticalProteoform.FormatTheoreticalProteoformTable(dgv_Database);
     DisplayUtility.FillDataGridView(dgv_unlocalizedModifications, Sweet.lollipop.theoretical_database.unlocalized_lookup.Values.Select(m => new DisplayUnlocalizedModification(m)));
     DisplayUnlocalizedModification.FormatUnlocalizedModificationTable(dgv_unlocalizedModifications);
     tb_totalTheoreticalProteoforms.Text = Sweet.lollipop.target_proteoform_community.theoretical_proteoforms.Length.ToString();
 }
Exemplo n.º 18
0
 public void FillTablesAndCharts()
 {
     DisplayUtility.FillDataGridView(dgv_identified_experimentals, Sweet.lollipop.target_proteoform_community.families.SelectMany(f => f.experimental_proteoforms)
                                     .Where(e => !e.topdown_id && e.linked_proteoform_references != null && (Sweet.lollipop.count_adducts_as_identifications || !e.adduct)).Select(e => new DisplayExperimentalProteoform(e)));
     DisplayExperimentalProteoform.FormatAggregatesTable(dgv_identified_experimentals);
     DisplayUtility.FillDataGridView(dgv_td_proteoforms, Sweet.lollipop.target_proteoform_community.families.SelectMany(f => f.experimental_proteoforms.Where(e => e.topdown_id && e.linked_proteoform_references != null)).Select(e => new DisplayTopDownProteoform(e as TopDownProteoform)));
     DisplayTopDownProteoform.FormatTopDownTable(dgv_td_proteoforms, true);
     tb_not_td.Text  = "Identified Experimental Proteoforms Not in Top-Down";
     tb_topdown.Text = "Top-Down Proteoforms";
 }
Exemplo n.º 19
0
 public void FillTablesAndCharts()
 {
     DisplayUtility.FillDataGridView(dgv_TD_proteoforms, Sweet.lollipop.topdown_proteoforms.Select(t => new DisplayTopDownProteoform(t)));
     DisplayTopDownProteoform.FormatTopDownTable(dgv_TD_proteoforms, false);
     load_colors();
     mods = Sweet.lollipop.topdown_proteoforms.SelectMany(p => p.topdown_ptm_set.ptm_combination).Select(m => m.modification.OriginalId).Distinct().ToList();
     tb_tdProteoforms.Text = Sweet.lollipop.topdown_proteoforms.Count.ToString();
     tb_td_hits.Text       = Sweet.lollipop.top_down_hits.Count.ToString();
     tb_unique_PFRs.Text   = Sweet.lollipop.topdown_proteoforms.Select(p => p.pfr_accession).Distinct().Count().ToString();
 }
Exemplo n.º 20
0
        private void clear_files(ComboBox cmb, System.Windows.Forms.DataGridView dgv)
        {
            int selected_index = Lollipop.file_lists.ToList().IndexOf(cmb.Text);
            List <InputFile> files_to_remove = Sweet.lollipop.get_files(Sweet.lollipop.input_files, Lollipop.file_types[selected_index]).ToList();

            Sweet.save_actions.RemoveAll(a => files_to_remove.Any(f => a.Contains(f.complete_path)));
            Sweet.lollipop.input_files = Sweet.lollipop.input_files.Except(files_to_remove).ToList();
            refresh_dgvs();
            DisplayUtility.FillDataGridView(dgv, Sweet.lollipop.get_files(Sweet.lollipop.input_files, Lollipop.file_types[selected_index]).Select(f => new DisplayInputFile(f)));
            DisplayInputFile.FormatInputFileTable(dgv, Lollipop.file_types[selected_index]);
        }
 private void drag_drop(System.Windows.Forms.DragEventArgs e, ComboBox cmb, System.Windows.Forms.DataGridView dgv)
 {
     string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
     if (DisplayUtility.CheckForProteinFastas(cmb, files))
     {
         return;                                                   // todo: implement protein fasta usage
     }
     Sweet.lollipop.enter_input_files(files, Lollipop.acceptable_extensions[cmb.SelectedIndex], Lollipop.file_types[cmb.SelectedIndex], Sweet.lollipop.input_files, true);
     DisplayUtility.FillDataGridView(dgv, Sweet.lollipop.get_files(Sweet.lollipop.input_files, Lollipop.file_types[cmb.SelectedIndex]).Select(f => new DisplayInputFile(f)));
     DisplayInputFile.FormatInputFileTable(dgv, Lollipop.file_types[cmb.SelectedIndex]);
 }
Exemplo n.º 22
0
 //changed
 private void dgv_EE_Peak_List_CellClick(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     int clickedRow = dgv_EE_Peaks.HitTest(e.X, e.Y).RowIndex;
     int clickedCol = dgv_EE_Peaks.HitTest(e.X, e.Y).ColumnIndex;
     if (e.Button == System.Windows.Forms.MouseButtons.Left && clickedRow >= 0 && clickedRow < Sweet.lollipop.ee_relations.Count
         && clickedCol < dgv_EE_Peaks.ColumnCount && clickedCol >= 0)
     {
         ct_EE_peakList.ChartAreas[0].AxisX.StripLines.Clear();
         DeltaMassPeak selected_peak = (DeltaMassPeak)(dgv_EE_Peaks.Rows[clickedRow].DataBoundItem as DisplayObject).display_object;
         DisplayUtility.GraphSelectedDeltaMassPeak(ct_EE_peakList, selected_peak, Sweet.lollipop.ee_relations);
     }
 }
 public void FillDataBaseTable(string table)
 {
     if (table == "Target")
     {
         DisplayUtility.FillDataGridView(dgv_Database, Sweet.lollipop.target_proteoform_community.theoretical_proteoforms.Select(t => new DisplayTheoreticalProteoform(t)));
     }
     else if (Sweet.lollipop.decoy_proteoform_communities.ContainsKey(table))
     {
         DisplayUtility.FillDataGridView(dgv_Database, Sweet.lollipop.decoy_proteoform_communities[table].theoretical_proteoforms.Select(t => new DisplayTheoreticalProteoform(t)));
     }
     DisplayTheoreticalProteoform.FormatTheoreticalProteoformTable(dgv_Database);
 }
        private void tb_tableFilter_TextChanged(object sender, EventArgs e)
        {
            List <TheoreticalProteoform> theoreticals_to_display = cmbx_DisplayWhichDB.SelectedItem.ToString() == "Target" ?
                                                                   Sweet.lollipop.target_proteoform_community.theoretical_proteoforms.ToList()
                 : Sweet.lollipop.decoy_proteoform_communities[cmbx_DisplayWhichDB.SelectedItem.ToString()].theoretical_proteoforms.ToList();
            IEnumerable <object> selected_theoreticals = tb_tableFilter.Text == "" ?
                                                         theoreticals_to_display :
                                                         ExtensionMethods.filter(theoreticals_to_display, tb_tableFilter.Text);

            DisplayUtility.FillDataGridView(dgv_Database, selected_theoreticals.OfType <TheoreticalProteoform>().Select(t => new DisplayTheoreticalProteoform(t)));
            DisplayTheoreticalProteoform.FormatTheoreticalProteoformTable(dgv_Database);
        }
Exemplo n.º 25
0
 private void GraphEERelations()
 {
     DisplayUtility.GraphRelationsChart(ct_EE_Histogram, Sweet.lollipop.ee_relations, "relations", false);
     ct_EE_Histogram.Series["relations"].Enabled = true;
     if (Sweet.lollipop.ef_relations.Count > 0)
     {
         DisplayUtility.GraphRelationsChart(ct_EE_Histogram, Sweet.lollipop.ef_relations[Sweet.lollipop.decoy_community_name_prefix + "0"], "decoys", false);
         ct_EE_Histogram.Series["decoys"].Enabled = false;
         cb_view_decoy_histogram.IsEnabled = true;
     }
     else cb_view_decoy_histogram.IsEnabled = false;
     is_cb_view_decoy_histogram = false;
 }
 public void reload_database_list()
 {
     cmb_loadTable.Items.Clear();
     Lollipop.file_lists.ToList().ForEach(itm => cmb_loadTable.Items.Add(itm));//might be a problem
     cmb_loadTable.SelectedIndex = 2;
     DisplayUtility.FillDataGridView(dgv_loadFiles, Sweet.lollipop.get_files(Sweet.lollipop.input_files, Lollipop.file_types[cmb_loadTable.SelectedIndex]).Select(f => new DisplayInputFile(f)));
     DisplayInputFile.FormatInputFileTable(dgv_loadFiles, Lollipop.file_types[cmb_loadTable.SelectedIndex]);
     initialize_table_bindinglist();
     if (!SetMakeDatabaseButton() && Sweet.lollipop.get_files(Sweet.lollipop.input_files, Purpose.ProteinDatabase).Count() > 0)
     {
         MessageBox.Show("You still need a PTM list. Please use the \"Donwload UniProt PTM List\" button.", "Enabling Make Database Button");
     }
 }
Exemplo n.º 27
0
        private void btn_buildSelectedFamilies_Click(object sender, RoutedEventArgs e)
        {
            string time_stamp = Sweet.time_stamp();

            tb_recentTimeStamp.Text = time_stamp;
            object[] selected = DisplayUtility.get_selected_objects(dgv_main);
            string   message  = CytoscapeScript.write_cytoscape_script(selected, Sweet.lollipop.target_proteoform_community.families,
                                                                       Sweet.lollipop.family_build_folder_path, "", time_stamp,
                                                                       (bool)cb_buildAsQuantitative.IsChecked ? (this.MDIParent as ProteoformSweet).resultsSummary.get_go_analysis() : null, (bool)cb_redBorder.IsChecked, (bool)cb_boldLabel.IsChecked,
                                                                       "Smarties", cmbx_edgeLabel.SelectedItem.ToString(), cmbx_nodeLabel.SelectedItem.ToString(), cmbx_nodeLabelPositioning.SelectedItem.ToString(), cmbx_nodeLayout.SelectedItem.ToString(), Sweet.lollipop.deltaM_edge_display_rounding,
                                                                       (bool)cb_geneCentric.IsChecked, cmbx_geneLabel.SelectedItem.ToString());

            MessageBox.Show(message, "Cytoscape Build");
        }
Exemplo n.º 28
0
 public void FillTablesAndCharts()
 {
     dgv_EE_Peaks.CurrentCellDirtyStateChanged -= EE_Peak_List_DirtyStateChanged;//remove event handler on form load and table refresh event
     DisplayUtility.FillDataGridView(dgv_EE_Peaks, Sweet.lollipop.ee_peaks.OrderByDescending(p => p.peak_relation_group_count).Select(p => new DisplayDeltaMassPeak(p)));
     DisplayUtility.FillDataGridView(dgv_EE_Relations, Sweet.lollipop.ee_relations.Select(r => new DisplayProteoformRelation(r)));
     DisplayProteoformRelation.FormatRelationsGridView(dgv_EE_Relations, false, true, false);
     DisplayDeltaMassPeak.FormatPeakListGridView(dgv_EE_Peaks, true);
     CK_View = false;
     GraphEERelations();
     GraphEEPeaks();
     ct_EE_Histogram.ChartAreas[0].AxisY.StripLines.Clear();
     if (is_cb_Graph_lowerThreshold.HasValue && (bool)is_cb_Graph_lowerThreshold)
         ct_EE_Histogram.ChartAreas[0].AxisY.StripLines.Add(new StripLine() { BorderColor = Color.Red, IntervalOffset = Convert.ToDouble(nUD_PeakCountMinThreshold.Value) });
     update_figures_of_merit();
     dgv_EE_Peaks.CurrentCellDirtyStateChanged += EE_Peak_List_DirtyStateChanged;//re-instate event handler after form load and table refresh event
 }
Exemplo n.º 29
0
        private void tb_tableFilter_TextChanged(object sender, TextChangedEventArgs e)
        {
            IEnumerable <object> filter_experimentals = tb_tableFilter.Text == "" ?
                                                        Sweet.lollipop.target_proteoform_community.families.SelectMany(f => f.experimental_proteoforms.Where(p => !p.topdown_id && p.linked_proteoform_references != null && (Sweet.lollipop.count_adducts_as_identifications || !p.adduct))).Select(ep => new DisplayExperimentalProteoform(ep)) :
                                                        ExtensionMethods.filter(Sweet.lollipop.target_proteoform_community.families.SelectMany(f => f.experimental_proteoforms.Where(p => !p.topdown_id && p.linked_proteoform_references != null)).Select(ep => new DisplayExperimentalProteoform(ep)), tb_tableFilter.Text);

            DisplayUtility.FillDataGridView(dgv_identified_experimentals, filter_experimentals);
            DisplayExperimentalProteoform.FormatAggregatesTable(dgv_identified_experimentals);

            IEnumerable <object> filter_topdown = tb_tableFilter.Text == "" ?
                                                  Sweet.lollipop.target_proteoform_community.families.SelectMany(f => f.experimental_proteoforms.Where(p => p.topdown_id && p.linked_proteoform_references != null)).Select(p => new DisplayTopDownProteoform(p as TopDownProteoform)) :
                                                  ExtensionMethods.filter(Sweet.lollipop.target_proteoform_community.families.SelectMany(f => f.experimental_proteoforms.Where(p => p.topdown_id && p.linked_proteoform_references != null)).Select(p => new DisplayTopDownProteoform(p as TopDownProteoform)), tb_tableFilter.Text);

            DisplayUtility.FillDataGridView(dgv_td_proteoforms, filter_topdown);
            DisplayTopDownProteoform.FormatTopDownTable(dgv_td_proteoforms, true);
        }
 private void cmbx_DisplayWhichDB_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (!initial_load)
     {
         string table = cmbx_DisplayWhichDB.SelectedItem.ToString();
         if (table == "Target")
         {
             DisplayUtility.FillDataGridView(dgv_Database, Sweet.lollipop.target_proteoform_community.theoretical_proteoforms.Select(t => new DisplayTheoreticalProteoform(t)));
         }
         else
         {
             DisplayUtility.FillDataGridView(dgv_Database, Sweet.lollipop.decoy_proteoform_communities[table].theoretical_proteoforms.Select(t => new DisplayTheoreticalProteoform(t)));
         }
     }
     DisplayTheoreticalProteoform.FormatTheoreticalProteoformTable(dgv_Database);
 }