Beispiel #1
0
 public List <DataTable> SetTables()
 {
     DataTables = new List <DataTable>
     {
         DisplayExperimentalProteoform.FormatAggregatesTable(Sweet.lollipop.target_proteoform_community.experimental_proteoforms.Select(e => new DisplayExperimentalProteoform(e)).ToList(), "AggregatedProteoforms")
     };
     return(DataTables);
 }
        private void tb_tableFilter_TextChanged(object sender, EventArgs e)
        {
            IEnumerable <object> selected_aggregates = tb_tableFilter.Text == "" ?
                                                       SaveState.lollipop.target_proteoform_community.experimental_proteoforms :
                                                       ExtensionMethods.filter(SaveState.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);
        }
Beispiel #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);
 }
Beispiel #4
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";
 }
        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.Select(e => new DisplayExperimentalProteoform(e)));
                    DisplayExperimentalProteoform.FormatAggregatesTable(dgv_proteoform_family_members);
                }
                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);
                }
                else
                {
                    dgv_proteoform_family_members.Rows.Clear();
                }
            }
        }
Beispiel #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);
        }
 public void FillTablesAndCharts()
 {
     DisplayUtility.FillDataGridView(dgv_AggregatedProteoforms, SaveState.lollipop.target_proteoform_community.experimental_proteoforms.Select(e => new DisplayExperimentalProteoform(e)));
     DisplayExperimentalProteoform.FormatAggregatesTable(dgv_AggregatedProteoforms);
 }