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);
        }
 public List <DataTable> SetTables()
 {
     DataTables = new List <DataTable>
     {
         DisplayProteoformRelation.FormatRelationsGridView(Sweet.lollipop.et_relations.OfType <ProteoformRelation>().Select(p => new DisplayProteoformRelation(p)).ToList(), "ETRelations", true, false, (bool)cbdiscoveryhistogram),
         DisplayDeltaMassPeak.FormatPeakListGridView(Sweet.lollipop.et_peaks.Select(p => new DisplayDeltaMassPeak(p)).ToList(), "ETPeaks", false)
     };
     return(DataTables);
 }
Exemplo n.º 3
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.º 4
0
 public List<DataTable> SetTables()
 {
     DataTables = new List<DataTable>
     {
         DisplayProteoformRelation.FormatRelationsGridView(Sweet.lollipop.ee_relations.OfType<ProteoformRelation>().Select(r => new DisplayProteoformRelation(r)).ToList(), "EERelations", false, true, false),
         DisplayDeltaMassPeak.FormatPeakListGridView(Sweet.lollipop.ee_peaks.Select(p => new DisplayDeltaMassPeak(p)).ToList(), "EEPeaks", true)
     };
     return DataTables;
 }
Exemplo n.º 5
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.º 6
0
 public void FillTablesAndCharts()
 {
     dgv_ET_Peak_List.CurrentCellDirtyStateChanged -= ET_Peak_List_DirtyStateChanged;//remove event handler on form load and table refresh event
     DisplayUtility.FillDataGridView(dgv_ET_Peak_List, Sweet.lollipop.et_peaks.OrderByDescending(p => p.peak_relation_group_count).Select(p => new DisplayDeltaMassPeak(p)).ToList());
     DisplayDeltaMassPeak.FormatPeakListGridView(dgv_ET_Peak_List, false);
     DisplayUtility.FillDataGridView(dgv_ET_Relations, Sweet.lollipop.et_relations.Select(r => new DisplayProteoformRelation(r)).ToList());
     DisplayProteoformRelation.FormatRelationsGridView(dgv_ET_Relations, true, false, false);
     GraphETRelations();
     GraphETPeaks();
     ct_ET_Histogram.ChartAreas[0].AxisY.StripLines.Clear();
     if ((bool)cbgraphlowerthreshold)
     {
         ct_ET_Histogram.ChartAreas[0].AxisY.StripLines.Add(new System.Windows.Forms.DataVisualization.Charting.StripLine()
         {
             BorderColor = System.Drawing.Color.Red, IntervalOffset = Convert.ToDouble(nUD_PeakCountMinThreshold.Value)
         });
     }
     update_figures_of_merit();
     CBDISCOVERYHISTOGRAM = false;
     CBVIEWDECOYHISTOGRAM = false;
     dgv_ET_Peak_List.CurrentCellDirtyStateChanged += ET_Peak_List_DirtyStateChanged;//re-instate event handler after form load and table refresh event
 }
Exemplo n.º 7
0
        private void display_family_members(int row_index, int column_index)
        {
            ProteoformFamily selected_family = (ProteoformFamily)((DisplayObject)this.dgv_main.Rows[row_index].DataBoundItem).display_object;

            if (column_index < 0)
            {
                return;
            }

            if (new List <string> {
                nameof(DisplayProteoformFamily.theoretical_count),
                nameof(DisplayProteoformFamily.accession_list),
                nameof(DisplayProteoformFamily.name_list)
            }.Contains(dgv_main.Columns[column_index].Name))
            {
                if (selected_family.theoretical_proteoforms.Count > 0)
                {
                    DisplayUtility.FillDataGridView(dgv_proteoform_family_members, selected_family.theoretical_proteoforms.Select(t => new DisplayTheoreticalProteoform(t)));
                    DisplayTheoreticalProteoform.FormatTheoreticalProteoformTable(dgv_proteoform_family_members);
                }
                else
                {
                    dgv_proteoform_family_members.Rows.Clear();
                }
            }
            else if (new List <string> {
                nameof(DisplayProteoformFamily.experimental_count),
                nameof(DisplayProteoformFamily.experimentals_list),
                nameof(DisplayProteoformFamily.agg_mass_list)
            }.Contains(dgv_main.Columns[column_index].Name))
            {
                if (selected_family.experimental_proteoforms.Count > 0)
                {
                    DisplayUtility.FillDataGridView(dgv_proteoform_family_members, selected_family.experimental_proteoforms.Where(e => !e.topdown_id).Select(e => new DisplayExperimentalProteoform(e)));
                    DisplayExperimentalProteoform.FormatAggregatesTable(dgv_proteoform_family_members);
                }
                else
                {
                    dgv_proteoform_family_members.Rows.Clear();
                }
            }
            else if (new List <string> {
                nameof(DisplayProteoformFamily.topdown_count)
            }.Contains(dgv_main.Columns[column_index].Name))
            {
                if (selected_family.experimental_proteoforms.Count(p => p.topdown_id) > 0)
                {
                    DisplayUtility.FillDataGridView(dgv_proteoform_family_members, selected_family.experimental_proteoforms.Where(p => p.topdown_id).Select(td => new DisplayTopDownProteoform(td as TopDownProteoform)));
                    DisplayTopDownProteoform.FormatTopDownTable(dgv_proteoform_family_members, false);
                }
                else
                {
                    dgv_proteoform_family_members.Rows.Clear();
                }
            }
            else if (dgv_main.Columns[column_index].Name == nameof(DisplayProteoformFamily.relation_count))
            {
                if (selected_family.relations.Count > 0)
                {
                    DisplayUtility.FillDataGridView(dgv_proteoform_family_members, selected_family.relations.Select(r => new DisplayProteoformRelation(r)));
                    DisplayProteoformRelation.FormatRelationsGridView(dgv_proteoform_family_members, false, false, false);
                }
                else
                {
                    dgv_proteoform_family_members.Rows.Clear();
                }
            }
        }