Skip to content

Commit

Permalink
include protein ambiguous gui component
Browse files Browse the repository at this point in the history
  • Loading branch information
nbollis committed Jan 9, 2025
1 parent fc6a5e5 commit cfaebaa
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
12 changes: 12 additions & 0 deletions MetaMorpheus/GUI/TaskWindows/SearchTaskWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,18 @@
</TextBlock>
</ToolTipService.ToolTip>
</CheckBox>
<CheckBox Margin="0 0 0 5" x:Name="IncludeProteinAmbiguousCheckbox" VerticalAlignment="Center"
Content="Include Protein Ambiguous" ToolTipService.ShowDuration="999999" ToolTipService.InitialShowDelay="500">
<ToolTipService.ToolTip>
<TextBlock>
Ambiguous results are excluded from this analysis by default.
<LineBreak/>
If checked, search results with localized modifications that are ambiguous only in their protein of origin will be included.
<LineBreak/>
This can be used for the case of peptides that could come from more than one protein.
</TextBlock>
</ToolTipService.ToolTip>
</CheckBox>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<local:IntegerTexBoxControl x:Name="PrunedDatabaseEvidenceTextBox" Width="30" ToolTipService.ShowDuration="999999" ToolTipService.InitialShowDelay="500" >
<ToolTipService.ToolTip>
Expand Down
3 changes: 3 additions & 0 deletions MetaMorpheus/GUI/TaskWindows/SearchTaskWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ private void UpdateFieldsFromTask(SearchTask task)
NormalizePeaksInWindowCheckBox.IsChecked = task.CommonParameters.NormalizePeaksAccrossAllWindows;

PrunedDatabaseEvidenceTextBox.Text = task.SearchParameters.EvidenceRequiredToWriteLocalizedMod.ToString(CultureInfo.InvariantCulture);
IncludeProteinAmbiguousCheckbox.IsChecked = task.SearchParameters.IncludeProteinAmbiguous;

MaxThreadsTextBox.Text = task.CommonParameters.MaxThreadsToUsePerFile.ToString(CultureInfo.InvariantCulture);
MinVariantDepthTextBox.Text = task.CommonParameters.MinVariantDepth.ToString(CultureInfo.InvariantCulture);
MaxHeterozygousVariantsTextBox.Text = task.CommonParameters.MaxHeterozygousVariants.ToString(CultureInfo.InvariantCulture);
Expand Down Expand Up @@ -641,6 +643,7 @@ private void SaveButton_Click(object sender, RoutedEventArgs e)
TheTask.SearchParameters.CompressIndividualFiles = CompressIndividualResultsCheckBox.IsChecked.Value;
TheTask.SearchParameters.IncludeModMotifInMzid = IncludeMotifInModNamesCheckBox.IsChecked.Value;
TheTask.SearchParameters.EvidenceRequiredToWriteLocalizedMod = PrunedDatabaseEvidenceTextBox.Text.Equals("") ? 1 : uint.Parse(PrunedDatabaseEvidenceTextBox.Text, CultureInfo.InvariantCulture);
TheTask.SearchParameters.IncludeProteinAmbiguous = IncludeProteinAmbiguousCheckbox.IsChecked.Value;

if (RemoveContaminantRadioBox.IsChecked.Value)
{
Expand Down
5 changes: 4 additions & 1 deletion MetaMorpheus/TaskLayer/SearchTask/SearchParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ public SearchParameters()
public double MaxFragmentSize { get; set; }
public int MinAllowedInternalFragmentLength { get; set; } //0 means "no internal fragments"
public double HistogramBinTolInDaltons { get; set; }
public uint EvidenceRequiredToWriteLocalizedMod { get; set; } = 1;
public Dictionary<string, int> ModsToWriteSelection { get; set; }
public double MaximumMassThatFragmentIonScoreIsDoubled { get; set; }
public bool WriteMzId { get; set; }
Expand All @@ -104,5 +103,9 @@ public SearchParameters()
public SilacLabel EndTurnoverLabel { get; set; } //used for SILAC turnover experiments
public TargetContaminantAmbiguity TCAmbiguity { get; set; }
public bool IncludeModMotifInMzid { get; set; }

// For writing localized mods to pruned database
public uint EvidenceRequiredToWriteLocalizedMod { get; set; } = 1;
public bool IncludeProteinAmbiguous { get; set; } = false; // if true, a 2D ambiguous result will be written to all possible proteins of origin.
}
}

0 comments on commit cfaebaa

Please sign in to comment.