Skip to content

Commit

Permalink
Fixing families table selector bug; readme updates
Browse files Browse the repository at this point in the history
  • Loading branch information
acesnik committed Dec 15, 2017
1 parent 5f73480 commit 8011fa3
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 47 deletions.
53 changes: 25 additions & 28 deletions ProteoformSuiteGUI/ProteoformFamilies.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@ public partial class ProteoformFamilies : Form, ISweetForm
public ProteoformFamilies()
{
InitializeComponent();

//Initialize display options
cmbx_colorScheme.Items.AddRange(CytoscapeScript.color_scheme_names);
cmbx_nodeLayout.Items.AddRange(Lollipop.node_positioning);
cmbx_nodeLabelPositioning.Items.AddRange(CytoscapeScript.node_label_positions);
cmbx_edgeLabel.Items.AddRange(Lollipop.edge_labels);
cmbx_nodeLabel.Items.AddRange(Lollipop.node_labels);
cmbx_geneLabel.Items.AddRange(Lollipop.gene_name_labels.ToArray());
cmbx_tableSelector.Items.AddRange(table_names);

cmbx_colorScheme.SelectedIndex = 1;
cmbx_nodeLayout.SelectedIndex = 1;
cmbx_nodeLabelPositioning.SelectedIndex = 0;
cmbx_edgeLabel.SelectedIndex = 1;
cmbx_nodeLabel.SelectedIndex = 1;
cmbx_geneLabel.SelectedIndex = 1;

InitializeParameterSet();
this.AutoScroll = true;
this.AutoScrollMinSize = this.ClientSize;
Expand Down Expand Up @@ -43,21 +60,6 @@ public void initialize_every_time()

public void InitializeParameterSet()
{
//Initialize display options
cmbx_colorScheme.Items.AddRange(CytoscapeScript.color_scheme_names);
cmbx_nodeLayout.Items.AddRange(Lollipop.node_positioning);
cmbx_nodeLabelPositioning.Items.AddRange(CytoscapeScript.node_label_positions);
cmbx_edgeLabel.Items.AddRange(Lollipop.edge_labels);
cmbx_nodeLabel.Items.AddRange(Lollipop.node_labels);
cmbx_geneLabel.Items.AddRange(Lollipop.gene_name_labels.ToArray());
cmbx_tableSelector.Items.AddRange(table_names);

cmbx_colorScheme.SelectedIndex = 1;
cmbx_nodeLayout.SelectedIndex = 1;
cmbx_nodeLabelPositioning.SelectedIndex = 0;
cmbx_edgeLabel.SelectedIndex = 1;
cmbx_nodeLabel.SelectedIndex = 1;
cmbx_geneLabel.SelectedIndex = 1;
Lollipop.preferred_gene_label = cmbx_geneLabel.SelectedItem.ToString();
Lollipop.gene_centric_families = cb_geneCentric.Checked;

Expand Down Expand Up @@ -123,22 +125,17 @@ public void ClearListsTablesFigures(bool clear_following)
}
}

/// <summary>
/// generate report and change selected table names based on # decoy communities
/// </summary>
public void update_figures_of_merit()
{
rtb_proteoformFamilyResults.Text = ResultsSummaryGenerator.proteoform_families_report();

//change selected table names based on # decoy communities
int decoy_communities = Sweet.lollipop.decoy_proteoform_communities.Count;
for(int i = 0; i < decoy_communities; i++)
{
if (!cmbx_tableSelector.Items.Contains("Decoy Community " + i)) cmbx_tableSelector.Items.Add("Decoy Community " + i);
}

//if more items than decoy databases, remove later ones //FIX
while(cmbx_tableSelector.Items.Count - 5 - decoy_communities > 0)
{
cmbx_tableSelector.Items.RemoveAt(5 + decoy_communities);
}
int selection = cmbx_tableSelector.SelectedIndex;
cmbx_tableSelector.Items.Clear();
cmbx_tableSelector.Items.AddRange(table_names);
cmbx_tableSelector.Items.AddRange(Enumerable.Range(0, Sweet.lollipop.decoy_proteoform_communities.Count).Select(i => "Decoy Community " + i).ToArray());
cmbx_tableSelector.SelectedIndex = selection < cmbx_tableSelector.Items.Count ? selection : 0;
}

#endregion Public Methods
Expand Down
38 changes: 19 additions & 19 deletions ProteoformSuiteGUI/Quantification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,25 @@ public Quantification()
InitializeComponent();
this.AutoScroll = true;
this.AutoScrollMinSize = this.ClientSize;

//Initialize display options
cmbx_volcanoChartSelection.Items.AddRange(volcano_selections);
cmbx_colorScheme.Items.AddRange(CytoscapeScript.color_scheme_names);
cmbx_nodeLayout.Items.AddRange(Lollipop.node_positioning);
cmbx_nodeLabelPositioning.Items.AddRange(CytoscapeScript.node_label_positions);
cmbx_edgeLabel.Items.AddRange(Lollipop.edge_labels.ToArray());
cmbx_nodeLabel.Items.AddRange(Lollipop.node_labels.ToArray());
cmbx_geneLabel.Items.AddRange(Lollipop.gene_name_labels.ToArray());
cb_redBorder.Checked = true;
cb_boldLabel.Checked = true;

cmbx_volcanoChartSelection.SelectedIndex = 0;
cmbx_colorScheme.SelectedIndex = 1;
cmbx_nodeLayout.SelectedIndex = 1;
cmbx_nodeLabelPositioning.SelectedIndex = 0;
cmbx_geneLabel.SelectedIndex = 1;
cmbx_nodeLabel.SelectedIndex = 1;
cmbx_edgeLabel.SelectedIndex = 1;
}

#endregion Constructor
Expand Down Expand Up @@ -201,29 +220,10 @@ public void InitializeConditionsParameters()
Sweet.lollipop.numerator_condition = cmbx_ratioNumerator.SelectedItem.ToString();
Sweet.lollipop.denominator_condition = cmbx_ratioDenominator.SelectedItem.ToString();
Sweet.lollipop.induced_condition = cmbx_inducedCondition.SelectedItem.ToString();
cmbx_edgeLabel.Items.AddRange(Lollipop.edge_labels);
}

public void InitializeParameterSet()
{
//Initialize display options
cmbx_volcanoChartSelection.Items.AddRange(volcano_selections);
cmbx_colorScheme.Items.AddRange(CytoscapeScript.color_scheme_names);
cmbx_nodeLayout.Items.AddRange(Lollipop.node_positioning);
cmbx_nodeLabelPositioning.Items.AddRange(CytoscapeScript.node_label_positions);
cmbx_edgeLabel.Items.AddRange(Lollipop.edge_labels.ToArray());
cmbx_nodeLabel.Items.AddRange(Lollipop.node_labels.ToArray());
cmbx_geneLabel.Items.AddRange(Lollipop.gene_name_labels.ToArray());
cb_redBorder.Checked = true;
cb_boldLabel.Checked = true;

cmbx_volcanoChartSelection.SelectedIndex = 0;
cmbx_colorScheme.SelectedIndex = 1;
cmbx_nodeLayout.SelectedIndex = 1;
cmbx_nodeLabelPositioning.SelectedIndex = 0;
cmbx_geneLabel.SelectedIndex = 1;
cmbx_nodeLabel.SelectedIndex = 1;
cmbx_edgeLabel.SelectedIndex = 1;
Lollipop.preferred_gene_label = cmbx_geneLabel.SelectedItem.ToString();
Lollipop.gene_centric_families = cb_geneCentric.Checked;

Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ Software for constructing, quantifying, and visualizing proteoform families.
[![Build status](https://ci.appveyor.com/api/projects/status/qbc3xy4b35otnsxe/branch/master?svg=true)](https://ci.appveyor.com/project/stefanks/proteoform-suite/branch/master)
[![Coverage Status](https://coveralls.io/repos/github/smith-chem-wisc/proteoform-suite/badge.svg?branch=master)](https://coveralls.io/github/smith-chem-wisc/proteoform-suite?branch=master)

## Papers

* [Proteoform Suite: Software for Constructing, Quantifying, and Visualizing Proteoform Families. (2017, _J. Proteome Res._)](http://pubs.acs.org/doi/10.1021/acs.jproteome.7b00685)

* [Elucidating _Escherichia coli_ Proteoform Families Using Intact-Mass Proteomics and a Global PTM Discovery Database. (2017, _J. Proteome Res._)](http://pubs.acs.org/doi/abs/10.1021/acs.jproteome.7b00516)

## Latest Release and Vignette

The latest release and vignette can be found [here](https://github.com/smith-chem-wisc/ProteoformSuite/releases/latest).
Expand Down

0 comments on commit 8011fa3

Please sign in to comment.