Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
4 changes: 3 additions & 1 deletion mzLib/FlashLFQ/FlashLfqEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ public FlashLfqEngine(

// IsoTracker settings
bool isoTracker = false,
double acceptablePeakWidth = 0.4,

// MBR settings
bool matchBetweenRuns = false,
Expand Down Expand Up @@ -157,6 +158,7 @@ public FlashLfqEngine(
MaxThreads = maxThreads,
Normalize = normalize,
IsoTracker = isoTracker,
AcceptablePeakWidth = acceptablePeakWidth,
MatchBetweenRuns = matchBetweenRuns,
MaxMbrRtWindow = maxMbrWindow,
MbrPpmTolerance = matchBetweenRunsPpmTolerance,
Expand Down Expand Up @@ -1892,7 +1894,7 @@ private void QuantifyIsobaricPeaks()
foreach (var peak in xICGroups.SharedPeaks)
{
double peakWindow = peak.Width;
if (peakWindow > 0.001) //make sure we have enough length of the window (0.001 min) for peak searching
if (peakWindow > FlashParams.AcceptablePeakWidth) //make sure we have enough length of the window (default is 0.4 min) for peak searching
{
List<ChromatographicPeak> chromPeaksInSharedPeak = new List<ChromatographicPeak>();
CollectChromPeakInRuns(peak, chromPeaksInSharedPeak, xICGroups);
Expand Down
2 changes: 2 additions & 0 deletions mzLib/FlashLFQ/FlashLfqParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public FlashLfqParameters()

// IsoTracker settings
IsoTracker = false;
AcceptablePeakWidth = 0.4; // The acceptable peak width for the isobaric peaks. This is used to determine the peak width of the isobaric peaks

// MBR settings
MatchBetweenRuns = false;
Expand Down Expand Up @@ -56,6 +57,7 @@ public FlashLfqParameters()

//IsoTracker settings
public bool IsoTracker { get; set; } //Searching parameter for the FlashLFQ engine
public double AcceptablePeakWidth { get; set; }

// MBR settings
public bool MatchBetweenRuns { get; set; }
Expand Down
7 changes: 4 additions & 3 deletions mzLib/FlashLFQ/IsoTracker/XICGroups.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void FindSharedExtrema(double count_threshold, double tolerance, double c

SharedExtrema = group_min.Concat(group_max).ToList();
SharedExtrema.Sort((p1, p2) => p1.RetentionTime.CompareTo(p2.RetentionTime)); // sort the shared extrema by the retention time
SharePeakTrimming();
ExtremaTrimming(); // Just rename the function to be more readable


}
Expand Down Expand Up @@ -145,8 +145,8 @@ private List<Extremum> SortExtrema(List<Extremum> extremaList, double tolerance,
/// <summary>
/// Trim the shared extremas in the close time range. Ex. if the two minimums are close and the intensity is going up, remove the first one
/// </summary>
/// <param name="cutOff"> The time range for trimming</param>
private void SharePeakTrimming(double cutOff = 0.3)
/// <param name="cutOff"> The acceptable time for differentiate two extrema range for trimming</param>
private void ExtremaTrimming(double cutOff = 0.3)
{
int removeIndex = 0;
int count = SharedExtrema.Count();
Expand Down Expand Up @@ -244,6 +244,7 @@ public List<PeakRegion> BuildSharedPeaks(double windowLimit = 0.3)
}

// remove the peaks with the time window less than the window limit
// We already have a limit peak width for the peak region.
sharedPeaks.RemoveAll(p => p.Width < windowLimit);
return sharedPeaks;
}
Expand Down
Loading