diff --git a/src/MSDIAL5/MsdialGcMsApi/Algorithm/Alignment/GcmsAlignmentRefiner.cs b/src/MSDIAL5/MsdialGcMsApi/Algorithm/Alignment/GcmsAlignmentRefiner.cs index 03127cc4d..ca117ec18 100644 --- a/src/MSDIAL5/MsdialGcMsApi/Algorithm/Alignment/GcmsAlignmentRefiner.cs +++ b/src/MSDIAL5/MsdialGcMsApi/Algorithm/Alignment/GcmsAlignmentRefiner.cs @@ -19,10 +19,10 @@ protected override List GetCleanedSpots(List(); - cSpots.AddRange(alignmentSpotList.Where(spot => spot.IsReferenceMatched(evaluator))); + cSpots.AddRange(alignmentSpotList.Where(spot => spot.IsReferenceMatched(evaluator) && !spot.Name.StartsWith("Putative"))); //if both Quant mass and Retention is same, exclude the spot information. - foreach (var aSpot in alignmentSpotList.Where(spot => !spot.IsReferenceMatched(evaluator))) { + foreach (var aSpot in alignmentSpotList.Where(spot => !spot.IsReferenceMatched(evaluator) || spot.Name.StartsWith("Putative"))) { var aSpotRt = aSpot.TimesCenter.RT.Value; var aSpotRi = aSpot.TimesCenter.RI.Value; var aSpotMass = aSpot.QuantMass; diff --git a/src/MSDIAL5/MsdialGcMsApi/Algorithm/Alignment/GcmsPeakJoiner.cs b/src/MSDIAL5/MsdialGcMsApi/Algorithm/Alignment/GcmsPeakJoiner.cs index 1c516b44c..19660d59b 100644 --- a/src/MSDIAL5/MsdialGcMsApi/Algorithm/Alignment/GcmsPeakJoiner.cs +++ b/src/MSDIAL5/MsdialGcMsApi/Algorithm/Alignment/GcmsPeakJoiner.cs @@ -137,7 +137,7 @@ private bool QuantMassExists(double quantMass, MSDecResult result) { protected bool IsSimilarTo(SpectrumFeature x, SpectrumFeature y) { var result = MsScanMatching.CompareEIMSScanProperties(x.AnnotatedMSDecResult.MSDecResult, y.AnnotatedMSDecResult.MSDecResult, _msMatchParam, - _alignmentParameter.Ms1AlignmentTolerance, _alignmentParameter.RetentionTimeAlignmentTolerance, _alignmentParameter.RetentionTimeAlignmentTolerance, + _alignmentParameter.Ms1AlignmentTolerance, _alignmentParameter.RetentionTimeAlignmentTolerance, _parameter.RetentionIndexAlignmentTolerance, _alignmentParameter.Ms1AlignmentFactor, _alignmentParameter.RetentionTimeAlignmentFactor, _indextype == AlignmentIndexType.RI); var isRetentionMatch = _indextype == AlignmentIndexType.RI ? result.IsRiMatch : result.IsRtMatch; return result.IsSpectrumMatch && isRetentionMatch; @@ -145,7 +145,7 @@ protected bool IsSimilarTo(SpectrumFeature x, SpectrumFeature y) { protected double GetSimilality(SpectrumFeature x, SpectrumFeature y) { var result = MsScanMatching.CompareEIMSScanProperties(x.AnnotatedMSDecResult.MSDecResult, y.AnnotatedMSDecResult.MSDecResult, _msMatchParam, - _alignmentParameter.Ms1AlignmentTolerance, _alignmentParameter.RetentionTimeAlignmentTolerance, _alignmentParameter.RetentionTimeAlignmentTolerance, + _alignmentParameter.Ms1AlignmentTolerance, _alignmentParameter.RetentionTimeAlignmentTolerance, _parameter.RetentionIndexAlignmentTolerance, _alignmentParameter.Ms1AlignmentFactor, _alignmentParameter.RetentionTimeAlignmentFactor, _indextype == AlignmentIndexType.RI); return result.TotalScore; }