-
Notifications
You must be signed in to change notification settings - Fork 42
Real OpenMS FLASHDeconv using exe from provided installation path #1045
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
Open
trishorts
wants to merge
20
commits into
smith-chem-wisc:master
Choose a base branch
from
trishorts:realFlashDecon
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 13 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
d343ff5
read flashdeconv using exe requires external installation of openms a…
trishorts 93cb498
Merge branch 'master' into realFlashDecon
trishorts c454acf
Merge branch 'master' into realFlashDecon
trishorts 27b2b2d
fix(decon): address PR #1045 review findings on RealFLASHDeconvolution
trishorts 477fd63
Merge remote-tracking branch 'upstream/master' into realFlashDecon
trishorts ebac8ef
Merge branch 'master' into realFlashDecon
trishorts abd4e67
Merge branch 'master' into realFlashDecon
trishorts 6329f72
Merge branch 'master' into realFlashDecon
trishorts 8792de9
implement ToDecoyParameters on RealFLASHDeconvolutionParameters
trishorts b4c6f05
cover RealFLASHDeconvolution parser/file-guard error paths
trishorts 2404580
cover DeconvoluteWithDecoys null-decoy guard
trishorts 47cbfc0
refactor(decon): make RealFLASHDeconvolutionAlgorithm unit-testable
trishorts d194d06
tighten RealFLASHDeconvolution test assertions and fill parser gaps
trishorts d639fdf
cache validated FLASHDeconv exe paths to skip per-scan syscalls
trishorts 9975a5e
refactor(decon): move FLASHDeconv exe discovery out of the algorithm
trishorts 26b0ad8
test(decon): add registry cache + explicit-path Resolve coverage
trishorts 2341760
fix(decon): tighten FlashDeconvExePathRegistry.Register validation
trishorts 97e1324
Merge branch 'master' into realFlashDecon
trishorts 16b1c96
top down snip added to deconvolution development
trishorts 41c1c60
Merge branch 'master' into realFlashDecon
nbollis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
457 changes: 457 additions & 0 deletions
457
mzLib/MassSpectrometry/Deconvolution/Algorithms/RealFLASHDeconvolutionAlgorithm.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 89 additions & 0 deletions
89
mzLib/MassSpectrometry/Deconvolution/Parameters/RealFLASHDeconvolutionParameters.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| #nullable enable | ||
| using System.IO; | ||
|
|
||
| namespace MassSpectrometry | ||
| { | ||
| /// <summary> | ||
| /// Parameters for <see cref="RealFLASHDeconvolutionAlgorithm"/>, which wraps | ||
| /// the official FLASHDeconv executable from OpenMS. | ||
| /// | ||
| /// The executable is located via: | ||
| /// 1. <see cref="FLASHDeconvExePath"/> (explicit, highest priority) | ||
| /// 2. Well-known OpenMS install paths checked at runtime | ||
| /// 3. System PATH | ||
| /// | ||
| /// In MetaMorpheus, set <c>GlobalSettings.FLASHDeconvExecutablePath</c> once | ||
| /// (persisted in GlobalSettings.toml) and leave <see cref="FLASHDeconvExePath"/> | ||
| /// null — the algorithm will use the global setting automatically. | ||
| /// </summary> | ||
| public class RealFLASHDeconvolutionParameters : DeconvolutionParameters | ||
| { | ||
| public override DeconvolutionType DeconvolutionType { get; protected set; } | ||
| = DeconvolutionType.RealFLASHDeconvolution; | ||
|
|
||
| // ── Executable location ─────────────────────────────────────────────── | ||
|
|
||
| /// <summary> | ||
| /// Full path to FLASHDeconv.exe. Leave null to use the well-known-path | ||
| /// search or GlobalSettings.FLASHDeconvExecutablePath. | ||
| /// </summary> | ||
| public string? FLASHDeconvExePath { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Directory for temporary mzML / TSV files. Defaults to system temp. | ||
| /// All temp files are deleted after each call. | ||
| /// </summary> | ||
| public string WorkingDirectory { get; set; } = Path.GetTempPath(); | ||
|
|
||
| /// <summary> | ||
| /// Seconds to wait before killing the FLASHDeconv process. | ||
| /// Default: 300 s (5 minutes). | ||
| /// </summary> | ||
| public int ProcessTimeoutSeconds { get; set; } = 300; | ||
|
|
||
| // ── Algorithm flags (map to FLASHDeconv CLI) ────────────────────────── | ||
|
|
||
| /// <summary>ppm tolerance → -Algorithm:tol</summary> | ||
| public double TolerancePpm { get; set; } = 10.0; | ||
|
|
||
| /// <summary>Minimum neutral mass (Da) → -Algorithm:min_mass</summary> | ||
| public double MinMass { get; set; } = 50.0; | ||
|
|
||
| /// <summary>Maximum neutral mass (Da) → -Algorithm:max_mass</summary> | ||
| public double MaxMass { get; set; } = 100_000.0; | ||
|
|
||
| /// <summary> | ||
| /// Minimum isotope cosine similarity → -Algorithm:min_isotope_cosine | ||
| /// Default matches FLASHDeconv's own default (0.85). | ||
| /// </summary> | ||
| public double MinIsotopeCosine { get; set; } = 0.85; | ||
|
|
||
| // ── Constructor ─────────────────────────────────────────────────────── | ||
|
|
||
| public RealFLASHDeconvolutionParameters( | ||
| int minCharge = 1, | ||
| int maxCharge = 60, | ||
| double tolerancePpm = 10.0, | ||
| double minMass = 50.0, | ||
| double maxMass = 100_000.0, | ||
| double minIsotopeCosine = 0.85, | ||
| Polarity polarity = Polarity.Positive, | ||
| string? flashDeconvExePath = null, | ||
| string? workingDirectory = null, | ||
| int processTimeoutSeconds = 300, | ||
| AverageResidue? averageResidueModel = null) | ||
| : base(minCharge, maxCharge, polarity, averageResidueModel) | ||
| { | ||
| TolerancePpm = tolerancePpm; | ||
| MinMass = minMass; | ||
| MaxMass = maxMass; | ||
| MinIsotopeCosine = minIsotopeCosine; | ||
| FLASHDeconvExePath = flashDeconvExePath; | ||
| WorkingDirectory = workingDirectory ?? Path.GetTempPath(); | ||
| ProcessTimeoutSeconds = processTimeoutSeconds; | ||
| } | ||
|
|
||
| // Decoy deconvolution doesn't apply to the FLASHDeconv exe wrapper. | ||
| public override DeconvolutionParameters? ToDecoyParameters() => null; | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.