Skip to content
Open
Show file tree
Hide file tree
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 Apr 9, 2026
93cb498
Merge branch 'master' into realFlashDecon
trishorts Apr 10, 2026
c454acf
Merge branch 'master' into realFlashDecon
trishorts Apr 30, 2026
27b2b2d
fix(decon): address PR #1045 review findings on RealFLASHDeconvolution
trishorts Apr 30, 2026
477fd63
Merge remote-tracking branch 'upstream/master' into realFlashDecon
trishorts Apr 30, 2026
ebac8ef
Merge branch 'master' into realFlashDecon
trishorts Apr 30, 2026
abd4e67
Merge branch 'master' into realFlashDecon
trishorts Apr 30, 2026
6329f72
Merge branch 'master' into realFlashDecon
trishorts Apr 30, 2026
8792de9
implement ToDecoyParameters on RealFLASHDeconvolutionParameters
trishorts May 1, 2026
b4c6f05
cover RealFLASHDeconvolution parser/file-guard error paths
trishorts May 1, 2026
2404580
cover DeconvoluteWithDecoys null-decoy guard
trishorts May 1, 2026
47cbfc0
refactor(decon): make RealFLASHDeconvolutionAlgorithm unit-testable
trishorts May 1, 2026
d194d06
tighten RealFLASHDeconvolution test assertions and fill parser gaps
trishorts May 1, 2026
d639fdf
cache validated FLASHDeconv exe paths to skip per-scan syscalls
trishorts May 1, 2026
9975a5e
refactor(decon): move FLASHDeconv exe discovery out of the algorithm
trishorts May 11, 2026
26b0ad8
test(decon): add registry cache + explicit-path Resolve coverage
trishorts May 11, 2026
2341760
fix(decon): tighten FlashDeconvExePathRegistry.Register validation
trishorts May 11, 2026
97e1324
Merge branch 'master' into realFlashDecon
trishorts May 11, 2026
16b1c96
top down snip added to deconvolution development
trishorts May 12, 2026
41c1c60
Merge branch 'master' into realFlashDecon
nbollis Jun 18, 2026
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
Comment thread
nbollis marked this conversation as resolved.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions mzLib/MassSpectrometry/Deconvolution/Deconvoluter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ private static DeconvolutionAlgorithm CreateAlgorithm(DeconvolutionParameters pa
DeconvolutionType.ClassicDeconvolution => new ClassicDeconvolutionAlgorithm(parameters),
DeconvolutionType.ExampleNewDeconvolutionTemplate => new ExampleNewDeconvolutionAlgorithmTemplate(parameters),
DeconvolutionType.IsoDecDeconvolution => new IsoDecAlgorithm(parameters),
DeconvolutionType.RealFLASHDeconvolution => new RealFLASHDeconvolutionAlgorithm(parameters),
_ => throw new MzLibException("DeconvolutionType not yet supported")
};
}
Expand Down
1 change: 1 addition & 0 deletions mzLib/MassSpectrometry/Deconvolution/DeconvolutionType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ public enum DeconvolutionType
ClassicDeconvolution,
ExampleNewDeconvolutionTemplate,
IsoDecDeconvolution,
RealFLASHDeconvolution // Wraps the official FLASHDeconv.exe from OpenMS
}
}
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;
}
}
Loading
Loading