예제 #1
0
 public List <DataTable> SetTables()
 {
     DataTables = new List <DataTable>
     {
         DisplayTopDownProteoform.FormatTopDownTable(Sweet.lollipop.topdown_proteoforms.Select(e => new DisplayTopDownProteoform(e)).ToList(), "TopdownProteoforms", false)
     };
     return(DataTables);
 }
예제 #2
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);
        }
예제 #3
0
 public List <DataTable> SetTables()
 {
     DataTables = new List <DataTable>
     {
         DisplayTopDownProteoform.FormatTopDownTable(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)).ToList(), "TopdownProteoforms", true),
         DisplayExperimentalProteoform.FormatAggregatesTable(Sweet.lollipop.target_proteoform_community.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)).ToList(), "IdentifiedExperimentals")
     };
     return(DataTables);
 }
예제 #4
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(td => td.accepted).ToString();
     tb_td_hits.Text       = Sweet.lollipop.top_down_hits.Count.ToString();
     tb_unique_PFRs.Text   = Sweet.lollipop.topdown_proteoforms.Where(td => td.accepted).Select(p => p.pfr_accession).Distinct().Count().ToString();
 }
예제 #5
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";
 }
예제 #6
0
        private void tb_tableFilter_TextChanged(object sender, EventArgs 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);
        }
예제 #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();
                }
            }
        }