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

#1 - Update Mzlib to 1.0.547 (Omics Update) #2334

Merged
merged 15 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from 12 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
2 changes: 1 addition & 1 deletion MetaMorpheus/CMD/CMD.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<PackageReference Include="Microsoft.ML.CpuMath" Version="2.0.0" />
<PackageReference Include="Microsoft.ML.FastTree" Version="2.0.0" />
<PackageReference Include="Microsoft.NETCore.App" Version="2.2.8" />
<PackageReference Include="mzLib" Version="1.0.542" />
<PackageReference Include="mzLib" Version="1.0.546" />
<PackageReference Include="Nett" Version="0.15.0" />
</ItemGroup>

Expand Down
1 change: 1 addition & 0 deletions MetaMorpheus/CMD/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using Omics.Modifications;
using TaskLayer;

namespace MetaMorpheusCommandLine
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
using MassSpectrometry;
using MzLibUtil;
using Proteomics;
using Proteomics.Fragmentation;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Omics.Modifications;

namespace EngineLayer.ClassicSearch
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using MassSpectrometry;
using MassSpectrometry.MzSpectra;
using MzLibUtil;
using Proteomics.Fragmentation;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
using System;
using System.Collections.Generic;
Expand Down
3 changes: 2 additions & 1 deletion MetaMorpheus/EngineLayer/CommonParameters.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using MassSpectrometry;
using MzLibUtil;
using Proteomics.Fragmentation;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
using System;
using System.Collections.Generic;
using System.Reflection;
using Omics.Fragmentation.Peptide;

namespace EngineLayer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
using MassSpectrometry;
using MzLibUtil;
using Proteomics;
using Proteomics.Fragmentation;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Omics.Fragmentation;
using Omics.Modifications;

namespace EngineLayer.CrosslinkSearch
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Easy.Common.Extensions;
using Proteomics.Fragmentation;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using MassSpectrometry;
using Proteomics;
using Proteomics.Fragmentation;
using Proteomics.ProteolyticDigestion;
using System;
using System.Collections.Generic;
using System.Linq;
using Omics.Fragmentation;
using Omics.Modifications;

namespace EngineLayer.CrosslinkSearch
{
Expand Down
1 change: 1 addition & 0 deletions MetaMorpheus/EngineLayer/CrosslinkSearch/Crosslinker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.IO;
using MassSpectrometry;
using System.Globalization;
using Omics.Modifications;
using Proteomics;

namespace EngineLayer
Expand Down
2 changes: 1 addition & 1 deletion MetaMorpheus/EngineLayer/EngineLayer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PackageReference Include="Microsoft.ML.CpuMath" Version="2.0.0" />
<PackageReference Include="Microsoft.ML.FastTree" Version="2.0.0" />
<PackageReference Include="Microsoft.NETCore.App" Version="2.2.8" />
<PackageReference Include="mzLib" Version="1.0.542" />
<PackageReference Include="mzLib" Version="1.0.546" />
<PackageReference Include="NETStandard.Library" Version="2.0.3" />
<PackageReference Include="Nett" Version="0.15.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Microsoft.ML;
using Microsoft.ML.Data;
using Proteomics;
using Proteomics.Fragmentation;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
using Proteomics.RetentionTimePrediction;
using System;
Expand All @@ -15,6 +15,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Omics.Modifications;

namespace EngineLayer
{
Expand Down
1 change: 1 addition & 0 deletions MetaMorpheus/EngineLayer/GlobalVariables.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using Omics.Modifications;
using TopDownProteomics;
using UsefulProteomicsDatabases;

Expand Down
1 change: 1 addition & 0 deletions MetaMorpheus/EngineLayer/GlycoSearch/Glycan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System;
using Proteomics;
using MassSpectrometry;
using Omics.Modifications;

namespace EngineLayer
{
Expand Down
1 change: 1 addition & 0 deletions MetaMorpheus/EngineLayer/GlycoSearch/GlycanBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System;
using Proteomics;
using MassSpectrometry;
using Omics.Modifications;

namespace EngineLayer
{
Expand Down
3 changes: 2 additions & 1 deletion MetaMorpheus/EngineLayer/GlycoSearch/GlycoPeptides.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using MassSpectrometry;
using Proteomics;
using Proteomics.Fragmentation;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
using System;
using System.Collections.Generic;
using System.Linq;
using Chemistry;
using Omics.Modifications;

namespace EngineLayer.GlycoSearch
{
Expand Down
2 changes: 1 addition & 1 deletion MetaMorpheus/EngineLayer/GlycoSearch/GlycoSearchEngine.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using EngineLayer.ModernSearch;
using MzLibUtil;
using Proteomics;
using Proteomics.Fragmentation;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
using System;
using System.Collections.Generic;
Expand Down
3 changes: 2 additions & 1 deletion MetaMorpheus/EngineLayer/GlycoSearch/GlycoSpectralMatch.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using Proteomics.Fragmentation;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Omics.Modifications;
using Proteomics;

namespace EngineLayer.GlycoSearch
Expand Down
2 changes: 1 addition & 1 deletion MetaMorpheus/EngineLayer/GlycoSearch/LocalizationGraph.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Proteomics.Fragmentation;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
using Proteomics;
using MzLibUtil;
Expand Down
1 change: 1 addition & 0 deletions MetaMorpheus/EngineLayer/Gptmd/GptmdEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Omics.Modifications;

namespace EngineLayer.Gptmd
{
Expand Down
1 change: 1 addition & 0 deletions MetaMorpheus/EngineLayer/Gptmd/GptmdResults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Omics.Modifications;

namespace EngineLayer.Gptmd
{
Expand Down
1 change: 1 addition & 0 deletions MetaMorpheus/EngineLayer/HistogramAnalysis/Bin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using Omics.Modifications;

namespace EngineLayer.HistogramAnalysis
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Proteomics.Fragmentation;
using Omics.Fragmentation;

namespace EngineLayer.HistogramAnalysis
{
Expand Down
20 changes: 16 additions & 4 deletions MetaMorpheus/EngineLayer/Indexing/IndexingEngine.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
using Chemistry;
using EngineLayer.NonSpecificEnzymeSearch;
using Proteomics;
using Proteomics.Fragmentation;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Omics.Fragmentation.Peptide;
using Omics.Modifications;
using UsefulProteomicsDatabases;

namespace EngineLayer.Indexing
Expand Down Expand Up @@ -258,9 +260,19 @@ private void AddInteriorTerminalModsToPrecursorIndex(List<int>[] precursorIndex,
foreach (KeyValuePair<int, List<Modification>> relevantDatabaseMod in databaseAnnotatedMods)
{
int fragmentNumber = relevantDatabaseMod.Key;
Product fragmentAtIndex = fragmentMasses.Where(x => x.FragmentNumber == fragmentNumber).FirstOrDefault();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the previous version, default Proudct would produce an a1 product with a mass of 0.0

double basePrecursorMass = fragmentAtIndex.NeutralMass == default(Product).NeutralMass ?
peptide.MonoisotopicMass : fragmentAtIndex.NeutralMass - DissociationTypeCollection.GetMassShiftFromProductType(fragmentAtIndex.ProductType) + WaterMonoisotopicMass;
Product fragmentAtIndex = fragmentMasses.FirstOrDefault(x => x.FragmentNumber == fragmentNumber);

double basePrecursorMass;
if (fragmentAtIndex is null)
{
basePrecursorMass = peptide.MonoisotopicMass;
}
else
{
basePrecursorMass = fragmentAtIndex.NeutralMass -
DissociationTypeCollection.GetMassShiftFromProductType(fragmentAtIndex.ProductType) +
WaterMonoisotopicMass;
}

foreach (Modification mod in relevantDatabaseMod.Value)
{
Expand Down
2 changes: 1 addition & 1 deletion MetaMorpheus/EngineLayer/Indexing/IndexingResults.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Proteomics.Fragmentation;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
using System.Collections.Generic;
using System.Text;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using MassSpectrometry;
using Proteomics.Fragmentation;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
using System.Collections.Concurrent;
using System.Collections.Generic;
Expand Down
11 changes: 6 additions & 5 deletions MetaMorpheus/EngineLayer/MetaMorpheusEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
using MassSpectrometry;
using Microsoft.ML.Trainers.FastTree;
using MzLibUtil;
using Proteomics.Fragmentation;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Omics.Fragmentation;

namespace EngineLayer
{
Expand Down Expand Up @@ -162,7 +163,7 @@ public static List<MatchedFragmentIon> MatchFragmentIons(Ms2ScanWithSpecificMass

if (commonParameters.ProductMassTolerance.Within(scan.TheScan.MassSpectrum.XArray[closestMzIndex], theoreticalFragmentMz))
{
matchedFragmentIons.Add(new MatchedFragmentIon(ref product, theoreticalFragmentMz, scan.TheScan.MassSpectrum.YArray[closestMzIndex], 1));
matchedFragmentIons.Add(new MatchedFragmentIon(product, theoreticalFragmentMz, scan.TheScan.MassSpectrum.YArray[closestMzIndex], 1));
Copy link
Contributor

Choose a reason for hiding this comment

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

explain the elimination of the ref keyword

}
}

Expand Down Expand Up @@ -192,7 +193,7 @@ public static List<MatchedFragmentIon> MatchFragmentIons(Ms2ScanWithSpecificMass
// is the mass error acceptable?
if (closestExperimentalMass != null && commonParameters.ProductMassTolerance.Within(closestExperimentalMass.MonoisotopicMass, product.NeutralMass) && closestExperimentalMass.Charge <= scan.PrecursorCharge)//TODO apply this filter before picking the envelope
{
matchedFragmentIons.Add(new MatchedFragmentIon(ref product, closestExperimentalMass.MonoisotopicMass.ToMz(closestExperimentalMass.Charge),
matchedFragmentIons.Add(new MatchedFragmentIon(product, closestExperimentalMass.MonoisotopicMass.ToMz(closestExperimentalMass.Charge),
closestExperimentalMass.Peaks.First().intensity, closestExperimentalMass.Charge));
}
}
Expand Down Expand Up @@ -222,7 +223,7 @@ public static List<MatchedFragmentIon> MatchFragmentIons(Ms2ScanWithSpecificMass
//found the peak, but we don't want to save that m/z because it's the complementary of the observed ion that we "added". Need to create a fake ion instead.
double mz = (scan.PrecursorMass + protonMassShift - closestExperimentalMass.MonoisotopicMass).ToMz(closestExperimentalMass.Charge);

matchedFragmentIons.Add(new MatchedFragmentIon(ref product, mz, closestExperimentalMass.TotalIntensity, closestExperimentalMass.Charge));
matchedFragmentIons.Add(new MatchedFragmentIon(product, mz, closestExperimentalMass.TotalIntensity, closestExperimentalMass.Charge));
}
}
}
Expand Down Expand Up @@ -266,7 +267,7 @@ private static List<MatchedFragmentIon> MatchFragmentIonsOfAllCharges(Ms2ScanWit
if (x != null && !ions.Contains(ion) && commonParameters.ProductMassTolerance.Within(x.MonoisotopicMass, product.NeutralMass) && x.Charge <= scan.PrecursorCharge)//TODO apply this filter before picking the envelope
{
Product temProduct = product;
matchedFragmentIons.Add(new MatchedFragmentIon(ref temProduct, x.MonoisotopicMass.ToMz(x.Charge),
matchedFragmentIons.Add(new MatchedFragmentIon(temProduct, x.MonoisotopicMass.ToMz(x.Charge),
x.Peaks.First().intensity, x.Charge));

ions.Add(ion);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Chemistry;
using MassSpectrometry;
using Proteomics.Fragmentation;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
using EngineLayer.FdrAnalysis;
using EngineLayer.ModernSearch;
using Proteomics;
using Proteomics.Fragmentation;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
using System;
using MassSpectrometry;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using MzLibUtil;
using Omics.Digestion;
using Omics.Fragmentation.Peptide;
using Omics.Modifications;

namespace EngineLayer.NonSpecificEnzymeSearch
{
Expand Down
4 changes: 3 additions & 1 deletion MetaMorpheus/EngineLayer/PeptideSpectralMatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
using EngineLayer.FdrAnalysis;
using MassSpectrometry;
using Proteomics;
using Proteomics.Fragmentation;
using Omics.Fragmentation;
using Proteomics.ProteolyticDigestion;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Runtime.CompilerServices;
using Easy.Common.Extensions;
using Omics;
using Omics.Modifications;
using Proteomics.AminoAcidPolymer;
using ThermoFisher.CommonCore.Data;

Expand Down
Loading