public void reload_database_list() { cmb_loadTable.Items.Clear(); cmb_loadTable.Items.AddRange(Lollipop.file_lists); cmb_loadTable.SelectedIndex = 2; DisplayUtility.FillDataGridView(dgv_loadFiles, SaveState.lollipop.get_files(SaveState.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(); set_Make_Database_Button(); }
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(); }
private void drag_drop(DragEventArgs e, ComboBox cmb, 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]); }
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(); }
public void FillTablesAndCharts() { plotObservedVsExpectedRelativeDifference(); DisplayUtility.FillDataGridView(dgv_quantification_results, SaveState.lollipop.qVals.Select(q => new DisplayQuantitativeValues(q))); DisplayQuantitativeValues.FormatGridView(dgv_quantification_results); tb_avgIntensity.Text = Math.Round(SaveState.lollipop.selectAverageIntensity, 1).ToString(); tb_stdevIntensity.Text = Math.Round(SaveState.lollipop.selectStDev, 3).ToString(); volcanoPlot(); plotBiorepIntensities(); updateGoTermsTable(); }
private void clear_files(ComboBox cmb, 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); }
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(); } } }
public void fill_proteoform_families(string filter, int decoyCommunityMinusOneIsTarget) { IEnumerable <object> families = filter == "" ? (decoyCommunityMinusOneIsTarget < 0 ? Sweet.lollipop.target_proteoform_community.families.OrderByDescending(f => f.relations.Count) : Sweet.lollipop.decoy_proteoform_communities[Sweet.lollipop.decoy_community_name_prefix + decoyCommunityMinusOneIsTarget].families.OrderByDescending(f => f.relations.Count)) : (decoyCommunityMinusOneIsTarget < 0 ? ExtensionMethods.filter(Sweet.lollipop.target_proteoform_community.families.OrderByDescending(f => f.relations.Count), filter) : ExtensionMethods.filter(Sweet.lollipop.decoy_proteoform_communities[Sweet.lollipop.decoy_community_name_prefix + decoyCommunityMinusOneIsTarget].families.OrderByDescending(f => f.relations.Count), filter)); DisplayUtility.FillDataGridView(dgv_main, families.OfType <ProteoformFamily>().Select(f => new DisplayProteoformFamily(f))); DisplayProteoformFamily.FormatFamiliesTable(dgv_main); }
public void reload_database_list() { cmb_loadTable.Items.Clear(); cmb_loadTable.Items.AddRange(Lollipop.file_lists); 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"); } }
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 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); }
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 (d.ShowDialog() != DialogResult.OK) { 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 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; DialogResult dr = openFileDialog.ShowDialog(); if (dr == DialogResult.OK) { 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 add_files(ComboBox cmb, DataGridView dgv) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Title = cmb.SelectedItem.ToString(); openFileDialog.Filter = Lollipop.file_filters[cmb.SelectedIndex]; openFileDialog.Multiselect = true; DialogResult dr = openFileDialog.ShowDialog(); if (dr == DialogResult.OK) { SaveState.lollipop.enter_input_files(openFileDialog.FileNames, Lollipop.acceptable_extensions[cmb.SelectedIndex], Lollipop.file_types[cmb.SelectedIndex], SaveState.lollipop.input_files); match_files(); } DisplayUtility.FillDataGridView(dgv, SaveState.lollipop.get_files(SaveState.lollipop.input_files, Lollipop.file_types[cmb.SelectedIndex]).Select(f => new DisplayInputFile(f))); DisplayInputFile.FormatInputFileTable(dgv, Lollipop.file_types[cmb.SelectedIndex]); }
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; DialogResult dr = openFileDialog.ShowDialog(); if (dr == DialogResult.OK) { 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() { 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); GraphEERelations(); GraphEEPeaks(); if (cb_Graph_lowerThreshold.Checked) { ct_EE_Histogram.ChartAreas[0].AxisY.StripLines.Add(new StripLine() { BorderColor = Color.Red, IntervalOffset = Convert.ToDouble(nUD_PeakCountMinThreshold.Value) }); } else { ct_EE_Histogram.ChartAreas[0].AxisY.StripLines.Clear(); } 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 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 cmb_loadTable3_SelectedIndexChanged(object sender, EventArgs e) { DisplayUtility.FillDataGridView(dgv_loadFiles3, SaveState.lollipop.get_files(SaveState.lollipop.input_files, Lollipop.file_types[cmb_loadTable3.SelectedIndex]).Select(f => new DisplayInputFile(f))); DisplayInputFile.FormatInputFileTable(dgv_loadFiles3, Lollipop.file_types[cmb_loadTable3.SelectedIndex]); lb_filter3.Text = cmb_loadTable1.SelectedItem.ToString(); }
private void tb_filter3_TextChanged(object sender, EventArgs e) { DisplayUtility.FillDataGridView(dgv_loadFiles3, ExtensionMethods.filter(SaveState.lollipop.get_files(SaveState.lollipop.input_files, Lollipop.file_types[cmb_loadTable3.SelectedIndex]), tb_filter3.Text).OfType <InputFile>().Select(f => new DisplayInputFile(f))); DisplayInputFile.FormatInputFileTable(dgv_loadFiles3, Lollipop.file_types[cmb_loadTable3.SelectedIndex]); }
public void FillTablesAndCharts() { DisplayUtility.FillDataGridView(dgv_AggregatedProteoforms, SaveState.lollipop.target_proteoform_community.experimental_proteoforms.Select(e => new DisplayExperimentalProteoform(e))); DisplayExperimentalProteoform.FormatAggregatesTable(dgv_AggregatedProteoforms); }
private void FillEERelationsGridView() { displayRelations = SaveState.lollipop.ee_relations.Select(r => new DisplayProteoformRelation(r)).ToList(); DisplayUtility.FillDataGridView(dgv_EE_Relations, displayRelations); }
private void FillEEPeakListTable() { DisplayUtility.FillDataGridView(dgv_EE_Peaks, SaveState.lollipop.ee_peaks.OrderByDescending(p => p.peak_relation_group_count).ToList()); }
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)); }
private void fillGoTermsTable() { DisplayUtility.FillDataGridView(dgv_goAnalysis, SaveState.lollipop.goTermNumbers.Where(x => x.Aspect.ToString() == cmbx_goAspect.SelectedItem.ToString()).Select(g => new DisplayGoTermNumber(g))); DisplayGoTermNumber.FormatGridView(dgv_goAnalysis); }
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); }
private void FillNeuCodePairsDGV() { DisplayUtility.FillDataGridView(dgv_RawExpNeuCodePairs, SaveState.lollipop.raw_neucode_pairs.Select(n => new DisplayNeuCodePair(n))); DisplayNeuCodePair.FormatNeuCodeTable(dgv_RawExpNeuCodePairs); }