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

[WIP] Remove decoys identical to targets #2393

Closed
6 changes: 3 additions & 3 deletions MetaMorpheus/Bootstrapper/Bootstrapper.wixproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="WixToolset.Sdk/4.0.0-rc.2">
<Project Sdk="WixToolset.Sdk/5.0.1">
<PropertyGroup>
<OutputName>MetaMorpheusInstaller</OutputName>
<OutputType>Bundle</OutputType>
<Platforms>x64;ARM64</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="WixToolset.Util.wixext" Version="4.0.0-rc.2" />
<PackageReference Include="WixToolset.Bal.wixext" Version="4.0.0-rc.2" />
<PackageReference Include="WixToolset.Util.wixext" Version="5.0.1" />
<PackageReference Include="WixToolset.Bal.wixext" Version="5.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MetaMorpheusSetup\MetaMorpheusSetup.wixproj">
Expand Down
12 changes: 6 additions & 6 deletions MetaMorpheus/CMD/CMD.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ApplicationManifest>app1.manifest</ApplicationManifest>
<Configurations>Debug;Release</Configurations>
<DebugType>full</DebugType>
Expand All @@ -19,12 +19,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.7.82" />
<PackageReference Include="Microsoft.ML" Version="2.0.0" />
<PackageReference Include="Microsoft.ML.CpuMath" Version="2.0.0" />
<PackageReference Include="Microsoft.ML.FastTree" Version="2.0.0" />
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="Microsoft.ML" Version="3.0.1" />
<PackageReference Include="Microsoft.ML.CpuMath" Version="3.0.1" />
<PackageReference Include="Microsoft.ML.FastTree" Version="3.0.1" />
<PackageReference Include="Microsoft.NETCore.App" Version="2.2.8" />
<PackageReference Include="mzLib" Version="1.0.549" />
<PackageReference Include="mzLib" Version="5.1.547" />
<PackageReference Include="Nett" Version="0.15.0" />
</ItemGroup>

Expand Down
14 changes: 7 additions & 7 deletions MetaMorpheus/EngineLayer/EngineLayer.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Configurations>Debug;Release</Configurations>
<Version>1.0.0.0</Version>
<DebugType>full</DebugType>
Expand All @@ -17,15 +17,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML" Version="2.0.0" />
<PackageReference Include="Microsoft.ML.CpuMath" Version="2.0.0" />
<PackageReference Include="Microsoft.ML.FastTree" Version="2.0.0" />
<PackageReference Include="Microsoft.ML" Version="3.0.1" />
<PackageReference Include="Microsoft.ML.CpuMath" Version="3.0.1" />
<PackageReference Include="Microsoft.ML.FastTree" Version="3.0.1" />
<PackageReference Include="Microsoft.NETCore.App" Version="2.2.8" />
<PackageReference Include="mzLib" Version="1.0.549" />
<PackageReference Include="mzLib" Version="5.1.547" />
<PackageReference Include="NETStandard.Library" Version="2.0.3" />
<PackageReference Include="Nett" Version="0.15.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="TopDownProteomics" Version="0.0.290" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="TopDownProteomics" Version="0.0.297" />
</ItemGroup>

<ItemGroup>
Expand Down
31 changes: 15 additions & 16 deletions MetaMorpheus/GUI/GUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
Expand Down Expand Up @@ -50,28 +50,27 @@
<ItemGroup>
<PackageReference Include="MarkdownSharp" Version="2.0.5" />
<PackageReference Include="MathNet.Numerics" Version="5.0.0" />
<PackageReference Include="MathNet.Numerics.MKL.Win" Version="2.5.0" />
<PackageReference Include="Microsoft.ML" Version="2.0.0" />
<PackageReference Include="Microsoft.ML.CpuMath" Version="2.0.0" />
<PackageReference Include="Microsoft.ML.FastTree" Version="2.0.0" />
<PackageReference Include="Microsoft.ML" Version="3.0.1" />
<PackageReference Include="Microsoft.ML.CpuMath" Version="3.0.1" />
<PackageReference Include="Microsoft.ML.FastTree" Version="3.0.1" />
<PackageReference Include="Microsoft.NETCore.App" Version="2.2.8" />
<PackageReference Include="mzLib" Version="1.0.549" />
<PackageReference Include="mzLib" Version="5.1.547" />
<PackageReference Include="Nett" Version="0.15.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="OxyPlot.Core" Version="2.0.0" />
<PackageReference Include="OxyPlot.Wpf" Version="2.0.0" />
<PackageReference Include="SharpLearning.CrossValidation" Version="0.26.9" />
<PackageReference Include="SharpLearning.GradientBoost" Version="0.26.9" />
<PackageReference Include="SharpLearning.Metrics" Version="0.26.9" />
<PackageReference Include="SharpLearning.CrossValidation" Version="0.31.8" />
<PackageReference Include="SharpLearning.GradientBoost" Version="0.31.8" />
<PackageReference Include="SharpLearning.Metrics" Version="0.31.8" />
<PackageReference Include="System.Buffers" Version="4.5.1" />
<PackageReference Include="System.CodeDom" Version="5.0.0" />
<PackageReference Include="System.Collections.Immutable" Version="5.0.0" />
<PackageReference Include="System.Drawing.Common" Version="5.0.3" />
<PackageReference Include="System.Memory" Version="4.5.4" />
<PackageReference Include="System.CodeDom" Version="8.0.0" />
<PackageReference Include="System.Collections.Immutable" Version="8.0.0" />
<PackageReference Include="System.Drawing.Common" Version="8.0.7" />
<PackageReference Include="System.Memory" Version="4.5.5" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.7.0" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="5.0.0" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="8.0.1" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup>

Expand Down
9 changes: 5 additions & 4 deletions MetaMorpheus/GuiFunctions/GuiFunctions.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<Configurations>Debug;Release</Configurations>
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
Expand All @@ -13,10 +13,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="itext7" Version="7.1.13" />
<PackageReference Include="mzLib" Version="1.0.549" />
<PackageReference Include="itext7" Version="8.0.5" />
<PackageReference Include="itext7.bouncy-castle-adapter" Version="8.0.5" />
<PackageReference Include="mzLib" Version="5.1.547" />
<PackageReference Include="OxyPlot.Wpf" Version="2.0.0" />
<PackageReference Include="Svg" Version="3.4.3" />
<PackageReference Include="Svg" Version="3.4.7" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 0 additions & 5 deletions MetaMorpheus/GuiFunctions/MetaDraw/MetaDrawLogic.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using EngineLayer;
using IO.Mgf;
using IO.MzML;
using IO.ThermoRawFileReader;
using iText.IO.Image;
using iText.Kernel.Pdf;
using MassSpectrometry;
Expand All @@ -20,8 +17,6 @@
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Easy.Common.Extensions;
using EngineLayer.CrosslinkSearch;
using Org.BouncyCastle.Asn1.X509.Qualified;
using Readers;
using System.Threading;
using Omics.Fragmentation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,20 @@
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using Chemistry;
using Easy.Common.Extensions;
using EngineLayer;
using iText.IO.Image;
using iText.Kernel.Pdf;
using iText.Layout;
using MassSpectrometry;
using MassSpectrometry.MzSpectra;
using mzPlot;
using Omics.Fragmentation;
using Omics.SpectrumMatch;
using OxyPlot;
using OxyPlot.Annotations;
using OxyPlot.Axes;
using OxyPlot.Series;
using Canvas = System.Windows.Controls.Canvas;
using FontWeights = OxyPlot.FontWeights;
using HorizontalAlignment = OxyPlot.HorizontalAlignment;
using VerticalAlignment = OxyPlot.VerticalAlignment;
Expand Down
8 changes: 4 additions & 4 deletions MetaMorpheus/MetaMorpheusSetup/MetaMorpheusSetup.wixproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<Import Project="Sdk.props" Sdk="WixToolset.Sdk" Version="4.0.0-rc.2" />
<Import Project="Sdk.props" Sdk="WixToolset.Sdk" Version="5.0.1" />
<PropertyGroup>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<OutputName>MetaMorpheusInstaller</OutputName>
Expand Down Expand Up @@ -53,10 +53,10 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="WixToolset.Util.wixext" Version="4.0.0-rc.2" />
<PackageReference Include="WixToolset.UI.wixext" Version="4.0.0-rc.2" />
<PackageReference Include="WixToolset.Util.wixext" Version="5.0.1" />
<PackageReference Include="WixToolset.UI.wixext" Version="5.0.1" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="WixToolset.Sdk" Version="4.0.0-rc.2" />
<Import Project="Sdk.targets" Sdk="WixToolset.Sdk" Version="5.0.1" />
<PropertyGroup>
<PreBuildEvent />
</PropertyGroup>
Expand Down
19 changes: 0 additions & 19 deletions MetaMorpheus/MetaMorpheusSetup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<ComponentGroupRef Id="LinuxNativeMathComponents" />
<ComponentGroupRef Id="OsxNativeMathComponents" />
<ComponentGroupRef Id="WinNativeMathComponents" />
<ComponentGroupRef Id="MathNumerics_x64" />
<!--ComponentRef creates a reference to a Component element in another Fragment-->
<ComponentRef Id="MetaMorpheusProgramMenuFolderComponent" />

Expand Down Expand Up @@ -331,15 +330,6 @@
<Component Id="src_OpenMcdf.Extensions.dll" Guid="69004206-94FD-4342-A98D-70560B41C7B3">
<File Id="src_OpenMcdf.Extensions.dll" Name="OpenMcdf.Extensions.dll" Source="$(var.GUI_TargetDir)OpenMcdf.Extensions.dll" />
</Component>
<Component Id="src_Common.Logging.Core.dll" Guid="894B4A68-17E7-48A5-B2C6-74C33CD08979">
<File Id="src_Common.Logging.Core.dll" Name="Common.Logging.Core.dll" Source="$(var.GUI_TargetDir)Common.Logging.Core.dll" />
</Component>
<Component Id="src_Common.Logging.dll" Guid="B543DE60-4AE9-4C43-88A7-1B1F752D7171">
<File Id="src_Common.Logging.dll" Name="Common.Logging.dll" Source="$(var.GUI_TargetDir)Common.Logging.dll" />
</Component>
<Component Id="src_BouncyCastle.Crypto.dll" Guid="54F72A71-C672-4655-95AA-4D32C9983A7D">
<File Id="src_BouncyCastle.Crypto.dll" Name="BouncyCastle.Crypto.dll" Source="$(var.GUI_TargetDir)BouncyCastle.Crypto.dll" />
</Component>
<Component Id="src_Microsoft.DotNet.PlatformAbstractions.dll" Guid="F42DEDAA-6D88-4D5B-AB51-C472617F2C5F">
<File Id="src_Microsoft.DotNet.PlatformAbstractions.dll" Name="Microsoft.DotNet.PlatformAbstractions.dll" Source="$(var.GUI_TargetDir)Microsoft.DotNet.PlatformAbstractions.dll" />
</Component>
Expand Down Expand Up @@ -412,15 +402,6 @@
</Component>
</ComponentGroup>

<!--Other x64 Components-->
<ComponentGroup Id="MathNumerics_x64" Directory="MathNumericsFolder_x64">
<Component Id="src_libiomp5md.dll" Guid="CB28608B-0F60-4002-B0E3-F8A151DCD871">
<File Id="src_libiomp5md.dll" Name="libiomp5md.dll" Source="$(var.GUI_TargetDir)x64\libiomp5md.dll" />
</Component>
<Component Id="srcMathNet.Numerics.MKL.dll" Guid="9384C245-B63C-48EF-B5DA-8AB2C04A6B27">
<File Id="src_MathNet.Numerics.MKL.dll" Name="MathNet.Numerics.MKL.dll" Source="$(var.GUI_TargetDir)x64\MathNet.Numerics.MKL.dll" />
</Component>
</ComponentGroup>
</Fragment>

<!--Build the App Mods folder-->
Expand Down
36 changes: 36 additions & 0 deletions MetaMorpheus/TaskLayer/MetaMorpheusTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,42 @@ protected List<Protein> LoadProteins(string taskId, List<DbForTask> dbFilenameLi
{
Warn("Warning: " + emptyProteinEntries + " empty protein entries ignored");
}

Status("Done loading proteins", new List<string> { taskId });

if (!proteinList.Any(p => p.IsDecoy))
{
return proteinList;
}

// Sanitize the decoys

HashSet<string> targetPeptideSequences = new();
foreach(var protein in proteinList.Where(p => !p.IsDecoy))
{
// When thinking about decoy collisions, we can ignore modifications
foreach(var peptide in protein.Digest(commonParameters.DigestionParams, new List<Modification>(), new List<Modification>()))
{
targetPeptideSequences.Add(peptide.BaseSequence);
}
}
// Now, we iterate through the decoys and scramble the sequences that correspond to target peptides
for(int i = 0; i < proteinList.Count; i++)
{
if(proteinList[i].IsDecoy)
{
var peptidesToReplace = proteinList[i]
.Digest(commonParameters.DigestionParams, new List<Modification>(), new List<Modification>())
.Select(p => p.BaseSequence)
.Where(targetPeptideSequences.Contains)
.ToList();
if(peptidesToReplace.Any())
{
proteinList[i] = Protein.ScrambleDecoyProteinSequence(proteinList[i], commonParameters.DigestionParams, forbiddenSequences: targetPeptideSequences, peptidesToReplace);
}
}
}

return proteinList;
}

Expand Down
12 changes: 6 additions & 6 deletions MetaMorpheus/TaskLayer/TaskLayer.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Configurations>Debug;Release</Configurations>
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
Expand All @@ -17,12 +17,12 @@

<ItemGroup>
<PackageReference Include="MathNet.Numerics" Version="5.0.0" />
<PackageReference Include="Microsoft.ML" Version="2.0.0" />
<PackageReference Include="Microsoft.ML.CpuMath" Version="2.0.0" />
<PackageReference Include="Microsoft.ML.FastTree" Version="2.0.0" />
<PackageReference Include="Microsoft.ML" Version="3.0.1" />
<PackageReference Include="Microsoft.ML.CpuMath" Version="3.0.1" />
<PackageReference Include="Microsoft.ML.FastTree" Version="3.0.1" />
<PackageReference Include="Microsoft.NETCore.App" Version="2.2.8" />
<PackageReference Include="mzLib" Version="1.0.549" />
<PackageReference Include="NetSerializer" Version="4.1.1" />
<PackageReference Include="mzLib" Version="5.1.547" />
<PackageReference Include="NetSerializer" Version="4.1.2" />
<PackageReference Include="Nett" Version="0.15.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion MetaMorpheus/Test/AddCompIonsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using EngineLayer.ModernSearch;
using MassSpectrometry;
using MzLibUtil;
using NUnit.Framework;
using NUnit.Framework; using Assert = NUnit.Framework.Legacy.ClassicAssert;
using Proteomics;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
Expand Down
2 changes: 1 addition & 1 deletion MetaMorpheus/Test/AmbiguityTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using EngineLayer;
using EngineLayer.ClassicSearch;
using MzLibUtil;
using NUnit.Framework;
using NUnit.Framework; using Assert = NUnit.Framework.Legacy.ClassicAssert;
using Proteomics;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
Expand Down
2 changes: 1 addition & 1 deletion MetaMorpheus/Test/AnalysisEngineTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using EngineLayer.HistogramAnalysis;
using MassSpectrometry;
using MzLibUtil;
using NUnit.Framework;
using NUnit.Framework; using Assert = NUnit.Framework.Legacy.ClassicAssert;
using Proteomics;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
Expand Down
2 changes: 1 addition & 1 deletion MetaMorpheus/Test/AveragingGuiComponentsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Text;
using System.Threading.Tasks;
using GuiFunctions;
using NUnit.Framework;
using NUnit.Framework; using Assert = NUnit.Framework.Legacy.ClassicAssert;
using SpectralAveraging;

namespace Test
Expand Down
2 changes: 1 addition & 1 deletion MetaMorpheus/Test/AveragingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using FlashLFQ;
using GuiFunctions;
using MassSpectrometry;
using NUnit.Framework;
using NUnit.Framework; using Assert = NUnit.Framework.Legacy.ClassicAssert;
using Readers;
using SpectralAveraging;
using TaskLayer;
Expand Down
2 changes: 1 addition & 1 deletion MetaMorpheus/Test/BinGenerationTest.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using EngineLayer;
using MassSpectrometry;
using NUnit.Framework;
using NUnit.Framework; using Assert = NUnit.Framework.Legacy.ClassicAssert;
using Proteomics;
using Proteomics.ProteolyticDigestion;
using System;
Expand Down
2 changes: 1 addition & 1 deletion MetaMorpheus/Test/CalibrationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using EngineLayer.Calibration;
using FlashLFQ;
using MassSpectrometry;
using NUnit.Framework;
using NUnit.Framework; using Assert = NUnit.Framework.Legacy.ClassicAssert;
using System;
using System.Collections.Generic;
using System.ComponentModel;
Expand Down
2 changes: 1 addition & 1 deletion MetaMorpheus/Test/CoIsolationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using EngineLayer.ClassicSearch;
using MassSpectrometry;
using MzLibUtil;
using NUnit.Framework;
using NUnit.Framework; using Assert = NUnit.Framework.Legacy.ClassicAssert;
using Proteomics;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
Expand Down
Loading