Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions ProteoWPFSuite/AggregatedProteoforms.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ private void display_light_proteoforms()
selected_pf.lt_quant_components.ToList<IAggregatable>() :
selected_pf.hv_quant_components.ToList<IAggregatable>()));

if (Sweet.lollipop.neucode_labeled && (bool)ra)
if ((Sweet.lollipop.neucode_labeled || Sweet.lollipop.cystag_labeled) && (bool)ra)
{
DisplayUtility.FillDataGridView(dgv_AcceptNeuCdLtProteoforms, components.Select(c => new DisplayNeuCodePair(c as NeuCodePair)));
}
Expand All @@ -202,7 +202,7 @@ private void display_light_proteoforms()
DisplayUtility.FillDataGridView(dgv_AcceptNeuCdLtProteoforms, components.Select(c => new DisplayComponent(c as ProteoformSuiteInternal.Component)));
}

if (Sweet.lollipop.neucode_labeled && (bool)ra)
if ((Sweet.lollipop.neucode_labeled || Sweet.lollipop.cystag_labeled) && (bool)ra)
{
DisplayNeuCodePair.FormatNeuCodeTable(dgv_AcceptNeuCdLtProteoforms);
}
Expand Down Expand Up @@ -238,6 +238,7 @@ private void nUD_Missed_Monos_ValueChanged(object sender, EventArgs e)
private void nUD_Missed_Ks_ValueChanged(object sender, EventArgs e)
{
Sweet.lollipop.maximum_missed_lysines = Convert.ToInt32(nUD_Missed_Ks.Value);
Sweet.lollipop.maximum_missed_cysteines = Convert.ToInt32(nUD_Missed_Ks.Value);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missed ks?

}

private void bt_aggregate_Click(object sender, RoutedEventArgs e)
Expand Down Expand Up @@ -272,7 +273,7 @@ private void set_nud_minObs_maximum()
{
List<string> conditions = Sweet.lollipop.get_files(Sweet.lollipop.input_files, Purpose.Identification).Select(f => f.lt_condition).Distinct().ToList();

if (Sweet.lollipop.neucode_labeled)
if (Sweet.lollipop.neucode_labeled || Sweet.lollipop.cystag_labeled)
{
conditions.AddRange(Sweet.lollipop.get_files(Sweet.lollipop.input_files, Purpose.Identification).Select(f => f.hv_condition).Distinct());
}
Expand Down Expand Up @@ -304,7 +305,7 @@ private void nud_minObservations_ValueChanged(object sender, EventArgs e)
#region Public Methods
public bool ReadyToRunTheGamut()
{
return Sweet.lollipop.topdown_proteoforms.Count > 0 || (Sweet.lollipop.neucode_labeled && Sweet.lollipop.raw_neucode_pairs.Count > 0 || Sweet.lollipop.raw_experimental_components.Count > 0);
return Sweet.lollipop.topdown_proteoforms.Count > 0 || (Sweet.lollipop.neucode_labeled && Sweet.lollipop.raw_neucode_pairs.Count > 0 || Sweet.lollipop.cystag_labeled && Sweet.lollipop.raw_neucode_pairs.Count > 0 || Sweet.lollipop.raw_experimental_components.Count > 0);
}

public void RunTheGamut(bool full_run)
Expand Down
6 changes: 6 additions & 0 deletions ProteoWPFSuite/DisplayHelper/DisplayExperimentalProteoform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ public double lysine_count
{
get { return e.lysine_count; }
}
public double cysteine_count
{
get { return e.cysteine_count; }
}

public bool mass_shifted
{
Expand Down Expand Up @@ -346,6 +350,7 @@ private static string header(string property_name)
if (property_name == nameof(agg_rt)) return "Aggregated RT";
if (property_name == nameof(observation_count)) return "Aggregated Component Count for Identification";
if (property_name == nameof(lysine_count)) return "Lysine Count";
if (property_name == nameof(cysteine_count)) return "Cysteine Count";
if (property_name == nameof(mass_shifted)) return "Manually Shifted Mass";
if (property_name == nameof(ptm_description)) return "PTM Description";
if (property_name == nameof(gene_name)) return "Gene Name";
Expand All @@ -368,6 +373,7 @@ private static string header(string property_name)
private static bool visible(string property_name, bool current)
{
if (property_name == nameof(lysine_count)) { return Sweet.lollipop.neucode_labeled; }
if(property_name == nameof(cysteine_count)) { return Sweet.lollipop.cystag_labeled; }
else return current;
}

Expand Down
9 changes: 8 additions & 1 deletion ProteoWPFSuite/DisplayHelper/DisplayNeuCodePair.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public string id_heavy

public string overlapping_charge_states
{
get { return string.Join(",", c.charge_states.Select(x => x.charge_count.ToString())); }
get { return string.Join(",", c.overlappingChargeStates).ToString(); }
}

public double intensity_ratio
Expand All @@ -56,6 +56,10 @@ public int lysine_count
{
get { return c.lysine_count; }
}
public int cysteine_count
{
get { return c.cysteine_count; }
}

public double mass
{
Expand Down Expand Up @@ -148,6 +152,7 @@ private static string header(string property_name)
if (property_name == nameof(intensity_ratio)) { return "Intensity Ratio"; }
if (property_name == nameof(intensity_sum)) { return "Intensity Sum Overlapping Charge States"; }
if (property_name == nameof(lysine_count)) { return "Lysine Count"; }
if (property_name == nameof(cysteine_count)) { return "Cysteine Count"; }
if (property_name == nameof(input_file_filename)) { return "Input Filename"; }
if (property_name == nameof(input_file_purpose)) { return "Input File Purpose"; }
if (property_name == nameof(input_file_uniqueId)) { return "Input File Unique ID"; }
Expand All @@ -162,6 +167,8 @@ private static string header(string property_name)

private static bool visible(string property_name, bool current)
{
if(property_name == nameof(lysine_count)) { return Sweet.lollipop.neucode_labeled; }
if(property_name == nameof(cysteine_count)) { return Sweet.lollipop.cystag_labeled; }
return current;
}

Expand Down
11 changes: 11 additions & 0 deletions ProteoWPFSuite/DisplayHelper/DisplayProteoformRelation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ public int LysineCount
}
}

public int CysteineCount
{
get
{
return ((ProteoformRelation)display_object).cysteine_count;
}
}


public int NearbyRelationCount
{
get
Expand Down Expand Up @@ -298,6 +307,7 @@ private static string header(string property_name, bool mask_experimental, bool
if (property_name == nameof(PeakCenterDeltaMass)) { return "Peak Center Delta Mass"; }
if (!raw_et_histogram && property_name == nameof(PeakCenterCount)) { return "Peak Center Count"; }
if (property_name == nameof(LysineCount)) { return "Lysine Count"; }
if(property_name == nameof(CysteineCount)) { return "Cysteine Count"; }
if (!raw_et_histogram && property_name == nameof(OutsideNoMansLand)) { return "Outside No Man's Land"; }

//ET formatting
Expand Down Expand Up @@ -374,6 +384,7 @@ private static bool visible(string property_name, bool current, bool mask_experi
if (property_name == nameof(TheoreticalDescription)) { return false; }
}
if (property_name == nameof(LysineCount)) return Sweet.lollipop.neucode_labeled;
if (property_name == nameof(CysteineCount)) return Sweet.lollipop.cystag_labeled;
return current;
}

Expand Down
4 changes: 2 additions & 2 deletions ProteoWPFSuite/ExperimentTheoreticalComparison.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -416,12 +416,12 @@ private void shift_masses()
foreach (DeltaMassPeak peak in peaks_to_shift)
{
int int_mass_shifter = Convert.ToInt32(peak.mass_shifter);
peak.shift_experimental_masses(int_mass_shifter, Sweet.lollipop.neucode_labeled);
peak.shift_experimental_masses(int_mass_shifter, Sweet.lollipop.neucode_labeled, Sweet.lollipop.cystag_labeled);
Sweet.shift_peak_action(peak);
}

((ProteoformSweet)this.MDIParent).rawExperimentalComponents.FillTablesAndCharts();
if (Sweet.lollipop.neucode_labeled)
if (Sweet.lollipop.neucode_labeled || Sweet.lollipop.cystag_labeled)
{
Sweet.lollipop.raw_neucode_pairs.Clear();
Sweet.lollipop.process_neucode_components(Sweet.lollipop.raw_neucode_pairs);
Expand Down
15 changes: 13 additions & 2 deletions ProteoWPFSuite/LoadResults.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</GroupBox>

<!-- 2. Set Parameters -->
<GroupBox x:Name="box_parameters" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Top" Height="150" FontSize="12" Padding="5 5 5 0">
<GroupBox x:Name="box_parameters" Grid.Row="0" Grid.Column="1" VerticalAlignment="Top" Height="157" FontSize="12" Padding="5 5 5 0" Grid.RowSpan="2">
<GroupBox.Header>
<TextBlock FontWeight="Bold">2. Set Parameters</TextBlock>
</GroupBox.Header>
Expand Down Expand Up @@ -84,9 +84,15 @@
Content="NeuCode Lysine" />
<RadioButton
x:Name="rb_unlabeled"
IsChecked="True"
IsChecked = "True"
HorizontalAlignment="Left"
Content="Unlabeled" />
<RadioButton
x:Name="rb_cystag"
IsChecked="{Binding Path=CK_rbcystag,UpdateSourceTrigger=PropertyChanged}"
HorizontalAlignment="Left"
Content="Cystag" />

</StackPanel>

<StackPanel x:Name="panel_fullrun" Grid.Column="0" Grid.Row="1" VerticalAlignment="Top" HorizontalAlignment="Left">
Expand Down Expand Up @@ -138,6 +144,11 @@
</Grid>
</StackPanel>

<StackPanel x:Name="panel_neucode_ratio" Grid.Column="1">
<CheckBox Content="Light Is More Abundant" x:Name="lightIsMoreAbundant_checkbox" Click="lightIsMoreAbundant_checkbox_Click"/>
<CheckBox Content="Heavy Is More Abundant" x:Name="heavyIsMoreAbundant_checkbox" Click="heavyIsMoreAbundant_checkbox_Click"/>
</StackPanel>

<StackPanel x:Name="panel_calibrate" Grid.Column="1">
<StackPanel.Resources>
<Style TargetType="{x:Type CheckBox}">
Expand Down
65 changes: 61 additions & 4 deletions ProteoWPFSuite/LoadResults.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public LoadResults()
#region Private Fields
private String _labeltxt;
private bool ck_rbneucode;
private bool ck_rbcystag;
private int cb_select;
//private string[] cb_src;
#endregion Private Fields
Expand Down Expand Up @@ -71,7 +72,10 @@ public bool CK_rbneucode
return;
ck_rbneucode = value;
rb_neucode.IsChecked = (bool)ck_rbneucode;
rb_unlabeled.IsChecked = (bool)!ck_rbneucode;
if (!ck_rbcystag && !ck_rbneucode)
{
rb_unlabeled.IsChecked = true;
}
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("CK_rbneucode"));

this.MDIParent.enable_neuCodeProteoformPairsToolStripMenuItem((bool)ck_rbneucode);
Expand All @@ -87,7 +91,39 @@ public bool CK_rbneucode
populate_file_lists();
}
}


public bool CK_rbcystag
{
get
{
return ck_rbcystag;
}
set
{
if (ck_rbcystag == value)
return;
ck_rbcystag = value;
rb_cystag.IsChecked = (bool)ck_rbcystag;
if(!ck_rbcystag && !ck_rbneucode)
{
rb_unlabeled.IsChecked = true;
}
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("CK_rbcystag"));

this.MDIParent.enable_neuCodeProteoformPairsToolStripMenuItem((bool)ck_rbcystag);
Sweet.lollipop.cystag_labeled = (bool)ck_rbcystag;

foreach (InputFile f in Sweet.lollipop.input_files)
{
if ((bool)rb_cystag.IsChecked)
f.label = Labeling.Cystag;
if ((bool)rb_unlabeled.IsChecked)
f.label = Labeling.Unlabeled;
}
populate_file_lists();
}
}

public int CB_select
{
get
Expand All @@ -110,6 +146,7 @@ public void InitializeParameterSet()
{
// Initialize components in "2. Set Parameters"
CK_rbneucode = Sweet.lollipop.neucode_labeled;
CK_rbcystag = Sweet.lollipop.cystag_labeled;

// Initialize components in "2. Set Parameters" that fall under "1. Choose Analysis->Chemical Calibration"
cb_calibrate_raw_files.IsChecked = Sweet.lollipop.calibrate_raw_files;
Expand Down Expand Up @@ -227,31 +264,40 @@ private void populate_file_lists()
{
// In "2. Set Parameters"
panel_neucode_labeled_unlabled.Visibility = Visibility.Visible;
panel_neucode_ratio.Visibility = ck_rbcystag ? Visibility.Visible : Visibility.Collapsed;
panel_fullrun.Visibility = Visibility.Visible;
panel_calibrate.Visibility = Visibility.Collapsed;
panel_minmaxcharge.Visibility = Visibility.Collapsed;
panel_topdown_search.Visibility = Visibility.Collapsed;

//Set NeuCode light/heavy abundance ratio
if ((bool)lightIsMoreAbundant_checkbox.IsChecked == true && heavyIsMoreAbundant_checkbox.IsChecked == false)
Sweet.lollipop.neuCodeLightIsMoreAbundant = true;
else if ((bool)lightIsMoreAbundant_checkbox.IsChecked == false && heavyIsMoreAbundant_checkbox.IsChecked == true)
Sweet.lollipop.neuCodeLightIsMoreAbundant = false;

// In "3. Load Data Using Drop Down Menu"
cmb_loadTable1.IsEnabled = true;
for (int i = 0; i < 4; i++)
cmb_loadTable1.Items.Add(Lollipop.file_lists[i]);
cmb_loadTable1.Items.Add(Lollipop.file_lists[7]);
cmb_loadTable1.Items.Add(Lollipop.file_lists[8]);
cmb_loadTable1.SelectedIndex = 0;

// In "4. Start Analysis"
btn_stepthru.Visibility = Visibility.Visible;
btn_fullRun.Visibility = Visibility.Visible;
btn_calibrate.Visibility = Visibility.Collapsed;
btn_deconvolute.Visibility = Visibility.Collapsed;
btn_topdown_search.Visibility = Visibility.Collapsed;
btn_topdown_search.Visibility = Visibility.Collapsed;

}

else if (rb_chemicalCalibration.IsChecked == true)
{
// In "2. Set Parameters"
panel_neucode_labeled_unlabled.Visibility = Visibility.Visible;
panel_calibrate.Visibility = Visibility.Visible;
panel_calibrate.Visibility = Visibility.Visible;
panel_fullrun.Visibility = Visibility.Collapsed;
panel_minmaxcharge.Visibility = Visibility.Collapsed;
panel_topdown_search.Visibility = Visibility.Collapsed;
Expand Down Expand Up @@ -296,6 +342,7 @@ private void populate_file_lists()
{
// In "2. Set Parameters"
panel_topdown_search.Visibility = Visibility.Visible;
panel_neucode_ratio.Visibility = Visibility.Collapsed;
panel_minmaxcharge.Visibility = Visibility.Collapsed;
panel_neucode_labeled_unlabled.Visibility = Visibility.Collapsed;
panel_calibrate.Visibility = Visibility.Collapsed;
Expand Down Expand Up @@ -648,5 +695,15 @@ private void nud_cali_rt_tolerance_ValueChanged(object sender, EventArgs e)
Sweet.lollipop.cali_rt_tolerance = Convert.ToDouble(nud_cali_rt_tolerance.Value);
}
#endregion Chemical Calibration Private Methods

private void heavyIsMoreAbundant_checkbox_Click(object sender, RoutedEventArgs e)
{
populate_file_lists();
}

private void lightIsMoreAbundant_checkbox_Click(object sender, RoutedEventArgs e)
{
populate_file_lists();
}
}
}
8 changes: 4 additions & 4 deletions ProteoWPFSuite/NeuCodePairs.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<!--Part of this control coded in backend .cs-->
<winformchart:Chart x:Name="ct_LysineCount" Palette="BrightPastel" Text="chart1" Dock="Fill" MouseClick="ct_LysineCount_MouseClick" Visible="True">
<winformchart:Chart.Series>
<winformchart:Series Name="lysineCount" ChartType="Line" ChartArea="ChartArea1" Legend="Legend1" MarkerBorderWidth="1" MarkerSize="5">
<winformchart:Series Name="lysineCount" ChartType="Line" MarkerBorderWidth="1" MarkerSize="5">
<winformchart:Series.SmartLabelStyle>
<winformchart:SmartLabelStyle/>
</winformchart:Series.SmartLabelStyle>
Expand Down Expand Up @@ -93,8 +93,8 @@
<ColumnDefinition Width="1*"></ColumnDefinition>
<ColumnDefinition Width="1.5*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Label Margin="0 0 0 0" Height="23" Grid.Column="0" Grid.Row="0" FontSize="11">K-Min</Label>
<Label Margin="0,0,0,0" Height="23" Grid.Column="0" Grid.Row="1" FontSize="11">K-Max</Label>
<TextBlock x:Name="AA_min_textblock" Text="K-Min" Margin="0 0 0 0" Height="23" Grid.Column="0" Grid.Row="0" FontSize="11" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

K?

<TextBlock x:Name="AA_max_textblock" Text="K-Min" Margin="0 0 0 0" Height="23" Grid.Column="0" Grid.Row="1" FontSize="11" />
<WindowsFormsHost Grid.Column="1" Height="20">
<winform:NumericUpDown x:Name="KMinAcceptable" Dock="Fill" Maximum="100" Minimum="-100" DecimalPlaces="2" Enabled="True" Visible="True" TabIndex="12" ValueChanged="KMinAcceptable_ValueChanged"/>
</WindowsFormsHost>
Expand Down Expand Up @@ -151,7 +151,7 @@
<WindowsFormsHost>
<winformchart:Chart x:Name="ct_IntensityRatio" Dock="Fill" MouseClick="ct_IntensityRatio_MouseClick" Margin="2, 2, 2, 2" TabIndex="1" Text="chart1">
<winformchart:Chart.Series>
<winformchart:Series ChartType="Line" ChartArea="ChartArea1" Name="intensityRatio" Legend="Legend1"/>
<winformchart:Series ChartType="Line" Name="intensityRatio"/>
</winformchart:Chart.Series>
<winformchart:Chart.Legends>
<winformchart:Legend Name="Legend1" Enabled="False"/>
Expand Down
Loading