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() { 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.topdown_proteoforms.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"; }
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(); }
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]); //SetMakeDatabaseButton(); }
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(); }
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); }
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]); }
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]); }
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); }
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"); } }
public void reload_database_list() { cmb_loadTable.Items.Clear(); // Lollipop.file_lists.ToList().ForEach(itm => cmb_loadTable.Items.Add(itm));//might be a problem // edit: it WAS a problem for (int i = 0; i < 4; i++) { cmb_loadTable.Items.Add(Lollipop.file_lists[i]); } 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(); }
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); }
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 }
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); }
/* * 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(); * }*/ #endregion LOAD DATABASES GRID VIEW Private Methods #region ADD/CLEAR Private Methods private void btn_addFiles_Click(object sender, RoutedEventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Title = cmb_loadTable.SelectedItem.ToString(); openFileDialog.Filter = Lollipop.file_filters[cmb_loadTable.SelectedIndex]; openFileDialog.Multiselect = true; if ((bool)openFileDialog.ShowDialog()) { // if (DisplayUtility.CheckForProteinFastas(cmb_loadTable, openFileDialog.FileNames)) return; // todo: implement protein fasta usage Sweet.lollipop.enter_input_files(openFileDialog.FileNames, Lollipop.acceptable_extensions[cmb_loadTable.SelectedIndex], Lollipop.file_types[cmb_loadTable.SelectedIndex], Sweet.lollipop.input_files, true); } 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]); }
private void btn_loadModNames_Click(object sender, EventArgs e) { OpenFileDialog d = new OpenFileDialog(); d.Title = "Modification Names"; d.Filter = "Modification Names (*.modnames) | *.modnames"; d.Multiselect = false; if ((bool)d.ShowDialog()) { return; } Sweet.lollipop.theoretical_database.load_unlocalized_names(d.FileName); DisplayUtility.FillDataGridView(dgv_unlocalizedModifications, Sweet.lollipop.theoretical_database.unlocalized_lookup.Values.Select(m => new DisplayUnlocalizedModification(m))); DisplayUnlocalizedModification.FormatUnlocalizedModificationTable(dgv_unlocalizedModifications); }
private void Cmbx_DisplayWhichDB_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { // We do this to prevent firing TabControl's SelectionChanged event unintendedly // Reference: https://stackoverflow.com/questions/3659858/in-c-sharp-wpf-why-is-my-tabcontrols-selectionchanged-event-firing-too-often e.Handled = true; 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); }
public void FillTablesAndCharts() { DisplayUtility.FillDataGridView(dgv_fileList, Sweet.lollipop.get_files(Sweet.lollipop.input_files, new Purpose[] { Purpose.Identification, Purpose.Quantification }).Select(c => new DisplayInputFile(c))); DisplayInputFile.FormatInputFileTable(dgv_fileList, new Purpose[] { Purpose.Identification, Purpose.Quantification }); dgv_fileList.ReadOnly = true; if (rb_displayIdentificationComponents.IsChecked.HasValue && (bool)rb_displayIdentificationComponents.IsChecked.Value && Sweet.lollipop.raw_experimental_components.Count > 0) { DisplayUtility.FillDataGridView(dgv_rawComponents, Sweet.lollipop.raw_experimental_components.Select(c => new DisplayComponent(c))); } if (rb_displayQuantificationComponents.IsChecked.HasValue && (bool)rb_displayQuantificationComponents.IsChecked.Value && Sweet.lollipop.raw_quantification_components.Count > 0) { DisplayUtility.FillDataGridView(dgv_rawComponents, Sweet.lollipop.raw_quantification_components.Select(c => new DisplayComponent(c))); } DisplayComponent.FormatComponentsTable(dgv_rawComponents); rtb_raw_components_counts.Text = ResultsSummaryGenerator.raw_components_report(); }
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 }
private void btn_addFiles_Click(object sender, EventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Title = cmb_loadTable.SelectedItem.ToString(); openFileDialog.Filter = Lollipop.file_filters[cmb_loadTable.SelectedIndex]; openFileDialog.Multiselect = true; if ((bool)openFileDialog.ShowDialog()) { if (DisplayUtility.CheckForProteinFastas(cmb_loadTable, openFileDialog.FileNames)) { return; // todo: implement protein fasta usage } Sweet.lollipop.enter_input_files(openFileDialog.FileNames, Lollipop.acceptable_extensions[cmb_loadTable.SelectedIndex], Lollipop.file_types[cmb_loadTable.SelectedIndex], Sweet.lollipop.input_files, true); } 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]); 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"); } }
public void FillTablesAndCharts() { DisplayUtility.FillDataGridView(dgv_AggregatedProteoforms, Sweet.lollipop.target_proteoform_community.experimental_proteoforms.Select(e => new DisplayExperimentalProteoform(e))); DisplayExperimentalProteoform.FormatAggregatesTable(dgv_AggregatedProteoforms); }
private void FillNeuCodePairsDGV() { DisplayUtility.FillDataGridView(dgv_RawExpNeuCodePairs, Sweet.lollipop.raw_neucode_pairs.Select(n => new DisplayNeuCodePair(n))); DisplayNeuCodePair.FormatNeuCodeTable(dgv_RawExpNeuCodePairs); }
private void reload_dgvs() { DisplayUtility.FillDataGridView(dgv_loadFiles1, Sweet.lollipop.get_files(Sweet.lollipop.input_files, Lollipop.file_types[Lollipop.file_lists.ToList().IndexOf(cmb_loadTable1.Text)]).Select(f => new DisplayInputFile(f))); DisplayInputFile.FormatInputFileTable(dgv_loadFiles1, Lollipop.file_types[Lollipop.file_lists.ToList().IndexOf(cmb_loadTable1.Text)]); }
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(); } } }
private void fill_go(Aspect aspect, string filter) { DisplayUtility.FillDataGridView(dgv_main, filter == "" ? Sweet.lollipop.target_proteoform_community.families.SelectMany(f => f.theoretical_proteoforms).SelectMany(t => t.ExpandedProteinList).SelectMany(g => g.GoTerms).Where(g => g.Aspect == aspect) : ExtensionMethods.filter(Sweet.lollipop.target_proteoform_community.families.SelectMany(f => f.theoretical_proteoforms).SelectMany(t => t.ExpandedProteinList).SelectMany(g => g.GoTerms).Where(g => g.Aspect == aspect), filter)); }
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); }