Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared pep box #2354

Merged
merged 5 commits into from
Feb 28, 2024
Merged
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
17 changes: 17 additions & 0 deletions MetaMorpheus/GUI/TaskWindows/SearchTaskWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,23 @@
<ToolTip Content="Use the 'Experimental Design' to normalize intensity values from FlashLFQ" ToolTipService.ShowDuration="999999" ToolTipService.InitialShowDelay="500" />
</ToolTipService.ToolTip>
</CheckBox>
<CheckBox x:Name="CheckBoxUseSharedPeptidesForQuant" Content="Use shared peptides for protein quantification" ToolTipService.ShowDuration="999999" ToolTipService.InitialShowDelay="500">
<CheckBox.IsEnabled>
<MultiBinding Converter="{StaticResource boolOrConverter}">
<Binding ElementName="CheckBoxLFQ" Path ="IsChecked"/>
<Binding ElementName="CheckBoxLFQwSpectralRecovery" Path ="IsChecked"/>
</MultiBinding>
</CheckBox.IsEnabled>
<CheckBox.Visibility>
<MultiBinding Converter="{StaticResource boolOr2VisConverter}">
<Binding ElementName="CheckBoxLFQ" Path ="IsChecked"/>
<Binding ElementName="CheckBoxLFQwSpectralRecovery" Path ="IsChecked"/>
</MultiBinding>
</CheckBox.Visibility>
<ToolTipService.ToolTip>
<ToolTip Content="Use peptide sequences shared between proteins for protein quantification" ToolTipService.ShowDuration="999999" ToolTipService.InitialShowDelay="500" />
</ToolTipService.ToolTip>
</CheckBox>

<!-- Multiplex Options -->
<StackPanel Orientation="Horizontal" Margin="5 5 5 0" Grid.Column="0" Grid.Row="0">
Expand Down
2 changes: 2 additions & 0 deletions MetaMorpheus/GUI/TaskWindows/SearchTaskWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ private void UpdateFieldsFromTask(SearchTask task)
CheckBoxNoOneHitWonders.IsChecked = task.SearchParameters.NoOneHitWonders;
CheckBoxNoQuant.IsChecked = !task.SearchParameters.DoLabelFreeQuantification;
CheckBoxLFQ.IsChecked = task.SearchParameters.DoLabelFreeQuantification;
CheckBoxUseSharedPeptidesForQuant.IsChecked = task.SearchParameters.UseSharedPeptidesForLFQ;
CheckBoxMultiplex.IsChecked = task.SearchParameters.DoMultiplexQuantification;
MultiplexComboBox.SelectedItem = task.SearchParameters.MultiplexModId ?? _defaultMultiplexType;
// If Spectral Recovery is enabled
Expand Down Expand Up @@ -626,6 +627,7 @@ private void SaveButton_Click(object sender, RoutedEventArgs e)
TheTask.SearchParameters.DoParsimony = CheckBoxParsimony.IsChecked.Value;
TheTask.SearchParameters.NoOneHitWonders = CheckBoxNoOneHitWonders.IsChecked.Value;
TheTask.SearchParameters.DoLabelFreeQuantification = !CheckBoxNoQuant.IsChecked.Value;
TheTask.SearchParameters.UseSharedPeptidesForLFQ = CheckBoxUseSharedPeptidesForQuant.IsChecked.Value;
TheTask.SearchParameters.DoSpectralRecovery = CheckBoxLFQwSpectralRecovery.IsChecked.Value;
TheTask.SearchParameters.DoMultiplexQuantification = CheckBoxMultiplex.IsChecked.Value;
TheTask.SearchParameters.MultiplexModId = (string)MultiplexComboBox.SelectedItem;
Expand Down
10 changes: 5 additions & 5 deletions MetaMorpheus/GUI/Views/CustomFragmentationWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ public CustomFragmentationWindow(List<ProductType> list, bool isRna = false)
if (list != null)
{
var res = TheList.Where(n => list.Contains(n.Type));
foreach(var r in res)
foreach (var r in res)
{
r.IsSelected = true;
}
}
}

base.Closing += this.OnClosing;
Expand Down Expand Up @@ -126,17 +126,17 @@ private void OnClosing(object sender, CancelEventArgs e)
{
// this window only closes when task is added
if (this.Visibility == Visibility.Visible)
{
{
this.Visibility = Visibility.Hidden;
e.Cancel = true;
}
}
}

public class BoolStringClass
public class BoolStringClass
{
public ProductType Type { get; set; }
public bool IsSelected { get; set; }
public string ToolTip { get; set; }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,7 @@ private void QuantificationAnalysis()
ppmTolerance: Parameters.SearchParameters.QuantifyPpmTol,
matchBetweenRunsPpmTolerance: Parameters.SearchParameters.QuantifyPpmTol, // If these tolerances are not equivalent, then MBR will falsely classify peptides found in the initial search as MBR peaks
matchBetweenRuns: Parameters.SearchParameters.MatchBetweenRuns,
useSharedPeptidesForProteinQuant: Parameters.SearchParameters.UseSharedPeptidesForLFQ,
silent: true,
maxThreads: CommonParameters.MaxThreadsToUsePerFile);

Expand Down
2 changes: 2 additions & 0 deletions MetaMorpheus/TaskLayer/SearchTask/SearchParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public SearchParameters()
NoOneHitWonders = false;
ModPeptidesAreDifferent = false;
DoLabelFreeQuantification = true;
UseSharedPeptidesForLFQ = false;
DoSpectralRecovery = false;
QuantifyPpmTol = 5;
SearchTarget = true;
Expand Down Expand Up @@ -76,6 +77,7 @@ public SearchParameters()
public bool KeepAllUniprotMods { get; set; }
public bool DoLocalizationAnalysis { get; set; }
public bool DoLabelFreeQuantification { get; set; }
public bool UseSharedPeptidesForLFQ { get; set; }
public bool DoMultiplexQuantification { get; set; }
public string MultiplexModId { get; set; }
public bool DoSpectralRecovery { get; set; }
Expand Down