From 1a28c1a9a8bba57152761755b45367f8ca9937d5 Mon Sep 17 00:00:00 2001 From: trishorts Date: Wed, 13 Sep 2023 11:38:43 -0500 Subject: [PATCH 1/2] Ms2scan with specific mass eliminate unused code (#2303) * reverted filtering method for psms passed to FlashLFQ * two unused methods gone * eliminate space --------- Co-authored-by: Alex Co-authored-by: MICHAEL SHORTREED Co-authored-by: Nic Bollis --- .../EngineLayer/Ms2ScanWithSpecificMass.cs | 41 ------------------- MetaMorpheus/Test/GPTMDengineTest.cs | 1 - 2 files changed, 42 deletions(-) diff --git a/MetaMorpheus/EngineLayer/Ms2ScanWithSpecificMass.cs b/MetaMorpheus/EngineLayer/Ms2ScanWithSpecificMass.cs index 4e0d8f4c4..394118a1e 100644 --- a/MetaMorpheus/EngineLayer/Ms2ScanWithSpecificMass.cs +++ b/MetaMorpheus/EngineLayer/Ms2ScanWithSpecificMass.cs @@ -152,46 +152,5 @@ public IsotopicEnvelope[] GetClosestExperimentalIsotopicEnvelopeList(double mini IsotopicEnvelope[] isotopicEnvelopes = ExperimentalFragments.Skip(startIndex).Take(length).ToArray(); return isotopicEnvelopes; } - - public double? GetClosestExperimentalFragmentMz(double theoreticalMz, out double? intensity) - { - if (TheScan.MassSpectrum.XArray.Length == 0) - { - intensity = null; - return null; - } - intensity = TheScan.MassSpectrum.YArray[GetClosestFragmentMzIndex(theoreticalMz).Value]; - return TheScan.MassSpectrum.XArray[GetClosestFragmentMzIndex(theoreticalMz).Value]; - } - - private int? GetClosestFragmentMzIndex(double mz) - { - if (TheScan.MassSpectrum.XArray.Length == 0) - { - return null; - } - int index = Array.BinarySearch(TheScan.MassSpectrum.XArray, mz); - if (index >= 0) - { - return index; - } - index = ~index; - - if (index >= TheScan.MassSpectrum.XArray.Length) - { - return index - 1; - } - if (index == 0) - { - return index; - } - - if (mz - TheScan.MassSpectrum.XArray[index - 1] > TheScan.MassSpectrum.XArray[index] - mz) - { - return index; - } - return index - 1; - - } } } \ No newline at end of file diff --git a/MetaMorpheus/Test/GPTMDengineTest.cs b/MetaMorpheus/Test/GPTMDengineTest.cs index d637e0614..b89790e8e 100644 --- a/MetaMorpheus/Test/GPTMDengineTest.cs +++ b/MetaMorpheus/Test/GPTMDengineTest.cs @@ -228,7 +228,6 @@ public static void TestUniProtGptmdConflict() { // this unit test checks to make sure GPTMD does not annotate mods at residues on // proteins where the equivalent uniprot mod already exists - Modification uniProtPhospho = GlobalVariables.AllModsKnown.First(p => p.ModificationType == "UniProt" && p.IdWithMotif.Contains("Phosphoserine")); Modification mmPhospho = GlobalVariables.AllModsKnown.First(p => p.ModificationType == "Common Biological" && p.IdWithMotif.Contains("Phosphorylation on S")); From d9ee5654b63841d23a1c6cfcc4510c800b7d6e3d Mon Sep 17 00:00:00 2001 From: Nic Bollis Date: Mon, 18 Sep 2023 15:08:53 -0500 Subject: [PATCH 2/2] Added SpectralAveraging.dll to project.wxs (#2310) * Added averaging dll to project.wxs * Unhid Button --------- Co-authored-by: Alexander-Sol <41119316+Alexander-Sol@users.noreply.github.com> --- MetaMorpheus/GUI/MainWindow.xaml | 2 +- MetaMorpheus/MetaMorpheusSetup/Product.wxs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/MetaMorpheus/GUI/MainWindow.xaml b/MetaMorpheus/GUI/MainWindow.xaml index 1a68e3e86..398e3f961 100644 --- a/MetaMorpheus/GUI/MainWindow.xaml +++ b/MetaMorpheus/GUI/MainWindow.xaml @@ -524,7 +524,7 @@