Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ protected override List<AlignmentSpotProperty> GetCleanedSpots(List<AlignmentSpo
if (!(_param is MsdialGcmsParameter param)) return alignmentSpotList;

var cSpots = new List<AlignmentSpotProperty>();
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ 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;
}

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;
}
Expand Down
Loading