-
Notifications
You must be signed in to change notification settings - Fork 33
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
IsoDec Deconvolution Algorithm #791
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #791 +/- ##
==========================================
- Coverage 75.46% 75.34% -0.12%
==========================================
Files 201 203 +2
Lines 30814 30859 +45
Branches 3106 3111 +5
==========================================
- Hits 23254 23251 -3
- Misses 7035 7082 +47
- Partials 525 526 +1
|
maybe we can add something for each new decon method about which of the two camps it falls into. |
…testing environment
[StructLayout(LayoutKind.Sequential, Pack =1)] | ||
public struct MatchedPeak | ||
{ | ||
public float mz; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be good to use our standard variable names for these features.
foreach(MatchedPeak peak in matchedpeaks) | ||
{ | ||
List<(double,double)> peaks = new List<(double,double)> (); | ||
List<double> listofratios = new List<double>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better variable name
…y correct charge states
…ect charge at least.
What mass range and resolution will this method apply to? |
@@ -14,7 +14,7 @@ namespace Development.Deconvolution | |||
/// </remarks> | |||
/// </summary> | |||
[TestFixture] | |||
[Ignore("Only needed when developing deconvolution methods")] | |||
//[Ignore("Only needed when developing deconvolution methods")] | |||
[ExcludeFromCodeCoverage] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will need to uncoment this line in order to pass checks.
Patch coverage will need to be >= 90% |
Changed `ClassicDeconvolutionAlgorithm`, `DeconvolutionAlgorithm`, and `ExampleNewDeconvolutionAlgorithmTemplate` classes and their members from `public` to `internal` to restrict visibility within the assembly. Added summary comment to `DeconvolutionAlgorithm` class. Refactored `Deconvoluter` class to remove unnecessary `using` directives and simplify the `Deconvolute` method by removing switch-case logic. Updated `IsotopicEnvelope` class by removing `MassIndex` and `StDev` properties, and modified constructor and `ScoreIsotopeEnvelope` method accordingly. Updated `MzSpectrum` class to use `StandardDeviation` extension method from `Easy.Common.Extensions`. Removed various unnecessary `using` directives from multiple files.
- Added `InternalsVisibleTo` entries for "Development" and "Test" in `MassSpectrometry.csproj`. - Changed `MostAbundantObservedIsotopicMass` to `internal` in `IsotopicEnvelope.cs`. - Added a new constructor to `IsotopicEnvelope` with monoisotopic mass, intensity, and charge. - Added XML documentation and changed `GeneratePeak` to `protected virtual` in `MzSpectrum.cs`. - Removed unused `using` directives in `MzSpectrum.cs` and `NeutralMzSpectrum.cs`. - Modified `NeutralMzSpectrum` constructor to validate array lengths. - Added `Charges` property to `NeutralMzSpectrum` and initialized it in the constructor. - Overrode `GeneratePeak` in `NeutralMzSpectrum` to convert to a charged spectrum using `Charges`.
Added necessary using directives in Deconvoluter.cs. Modified Deconvoluter class for short-circuit deconvolution. Removed redundant lines in Deconvoluter.cs. Renamed NeutralMzSpectrum to NeutralMassSpectrum. Updated constructor and references accordingly.
Refactored Deconvoluter.cs to use a foreach loop for yielding IsotopicEnvelopes. Reformatted multiple test methods in TestDeconvolution.cs for better readability. Added new test methods to validate Deconvolute with NeutralMassSpectrum, ensuring correct processing of spectra with various charge states and ranges.
- Changed FirstX and LastX properties in MzSpectrum to virtual. - Included MzLibUtil namespace in NeutralMassSpectrum class. - Updated NeutralMassSpectrum constructor to set FirstX and LastX. - Overrode FirstX and LastX in NeutralMassSpectrum class. - Added test NeutralMassSpectrum_MzRange to validate m/z range.
Updated IsoDecAlgorithm to use generic DeconvolutionParameters. Enhanced IsoDecDeconvolutionParameters with new properties. Refactored constructor to use camelCase parameter names. Removed unused using directives from IsoDecAlgorithm.cs. Ensured correct casting in IsoDecAlgorithm. Renamed Css_Threshold to CssThreshold for consistency.
Updated the `MassSpectrometry` namespace in `IsoDecAlgorithm.cs` and `IsoDecDeconvolutionParameters.cs`. In `IsoDecAlgorithm.cs`, added a type check for `DeconvolutionParameters` and replaced redundant type casting with `deconParams`. In `IsoDecDeconvolutionParameters.cs`, removed unnecessary `using` directives, moved the class under the `MassSpectrometry` namespace, added user-accessible and hard-coded parameters with comments, updated the constructor to initialize new parameters, and removed the nested class declaration.
- Change `_phaseModelPath` to readonly static string to prevent modification after initial set. - Remove `process_spectrum` method declaration from the class. - Add `try-finally` block in `Deconvolute` to ensure `matchedPeaksPtr` memory is freed even if an exception occurs. - Move allocation of `matchedPeaksPtr` inside `try` block to allocate only if needed. - Invert check for `process_spectrum` result to return empty enumerable if result is <= 0. - Reformat loop processing matched peaks for better readability. - Ensure `Marshal.FreeHGlobal` is called in `finally` block to free `matchedPeaksPtr` if not zero.
Removed unused using directives from IsoDecAlgorithm.cs and Deconvoluter.cs. Updated IsoSettings namespace in IsoDecAlgorithm.cs. Simplified NUnit assertions in TestDeconvolution.cs. Updated MassSpectrometry.csproj with HintPath and PackagePath for DLLs. Replaced phase_model.bin with isogenmass.dll. Incremented version number in mzLib.nuspec to 5.2.35. Added isogenmass.dll to mzLib.nuspec for net8.0 and net8.0-windows7.0 targets.
IsoDec is an isotopic deconvolution algorithm that will work for isotopically resolved data under ~60kDa.
It can output multiple plausible missed monoisitopic's for the same precursor. This will need to be handled in MetaMorpheus PostSearchAnalysisTask