private void tb_tableFilter_TextChanged(object sender, EventArgs e)
        {
            IEnumerable <object> selected_theoreticals = tb_tableFilter.Text == "" ?
                                                         SaveState.lollipop.target_proteoform_community.theoretical_proteoforms :
                                                         ExtensionMethods.filter(SaveState.lollipop.target_proteoform_community.theoretical_proteoforms, tb_tableFilter.Text);

            DisplayUtility.FillDataGridView(dgv_Database, selected_theoreticals.OfType <TheoreticalProteoform>().Select(t => new DisplayTheoreticalProteoform(t)));
            DisplayTheoreticalProteoform.FormatTheoreticalProteoformTable(dgv_Database);
        }
 public void FillTablesAndCharts()
 {
     reload_database_list();
     DisplayUtility.FillDataGridView(dgv_Database, SaveState.lollipop.target_proteoform_community.theoretical_proteoforms.Select(t => new DisplayTheoreticalProteoform(t)));
     initialize_table_bindinglist();
     DisplayTheoreticalProteoform.FormatTheoreticalProteoformTable(dgv_Database);
     DisplayUtility.FillDataGridView(dgv_unlocalizedModifications, SaveState.lollipop.theoretical_database.unlocalized_lookup.Values.Select(m => new DisplayUnlocalizedModification(m)));
     DisplayUnlocalizedModification.FormatUnlocalizedModificationTable(dgv_unlocalizedModifications);
 }
Exemplo n.º 3
0
        private void fill_theoreticals(string filter)
        {
            IEnumerable <object> theoreticals = filter == "" ?
                                                Sweet.lollipop.target_proteoform_community.families.SelectMany(f => f.theoretical_proteoforms) :
                                                ExtensionMethods.filter(Sweet.lollipop.target_proteoform_community.families.SelectMany(f => f.theoretical_proteoforms), filter);

            DisplayUtility.FillDataGridView(dgv_main, theoreticals.OfType <TheoreticalProteoform>().Select(t => new DisplayTheoreticalProteoform(t)));
            DisplayTheoreticalProteoform.FormatTheoreticalProteoformTable(dgv_main);
        }
Exemplo n.º 4
0
        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.º 5
0
 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 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();
                }
            }
        }
Exemplo n.º 7
0
 public List <DataTable> SetTables()
 {
     DataTables = new List <DataTable>
     {
         DisplayTheoreticalProteoform.FormatTheoreticalProteoformTable(Sweet.lollipop.target_proteoform_community.theoretical_proteoforms.Select(t => new DisplayTheoreticalProteoform(t)).ToList(), "TargetDatabase"),
         DisplayUnlocalizedModification.FormatUnlocalizedModificationTable(Sweet.lollipop.theoretical_database.unlocalized_lookup.Values.Select(m => new DisplayUnlocalizedModification(m)).ToList(), "UnlocalizedModifications")
     };
     foreach (KeyValuePair <string, ProteoformCommunity> decoy_community in Sweet.lollipop.decoy_proteoform_communities)
     {
         DataTables.Add(DisplayTheoreticalProteoform.FormatTheoreticalProteoformTable(decoy_community.Value.theoretical_proteoforms.Select(t => new DisplayTheoreticalProteoform(t)).ToList(), decoy_community.Key));
     }
     return(DataTables);
 }
Exemplo n.º 8
0
 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);
 }
Exemplo n.º 9
0
 public void load_dgv()
 {
     DisplayUtility.FillDataGridView(dgv_Database, Sweet.lollipop.target_proteoform_community.theoretical_proteoforms.Select(t => new DisplayTheoreticalProteoform(t)));
     initialize_table_bindinglist();
     DisplayTheoreticalProteoform.FormatTheoreticalProteoformTable(dgv_Database);
 }