Skip to content

modified isotope analysis in alignment process#642

Merged
YukiMatsuzawa merged 2 commits intomasterfrom
fix_isotopepicking_in_alignment
Oct 7, 2025
Merged

modified isotope analysis in alignment process#642
YukiMatsuzawa merged 2 commits intomasterfrom
fix_isotopepicking_in_alignment

Conversation

@htsugawa
Copy link
Copy Markdown
Contributor

@htsugawa htsugawa commented Oct 6, 2025

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modifies the isotope analysis logic in the alignment process by simplifying the initialization of isotope properties for alignment spots. The change removes conditional logic and isotope estimation processing.

  • Simplified isotope property initialization to set all spots as their own parent with weight number 0
  • Commented out the original conditional isotope analysis logic and isotope estimation processing

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +89 to +105
spot.PeakCharacter.IsotopeParentPeakID = spot.AlignmentID;
spot.PeakCharacter.IsotopeWeightNumber = 0;
}
if (_param.TrackingIsotopeLabels) return;

IsotopeEstimator.Process(alignmentSpots, _param, _iupac);
//foreach (var spot in alignmentSpots) {
// spot.PeakCharacter.IsotopeParentPeakID = -1;
// spot.PeakCharacter.IsotopeWeightNumber = -1;
// if (_param.TrackingIsotopeLabels || spot.IsReferenceMatched(evaluator)) {
// spot.PeakCharacter.IsotopeParentPeakID = spot.AlignmentID;
// spot.PeakCharacter.IsotopeWeightNumber = 0;
// }
// if (!spot.IsReferenceMatched(evaluator) && !spot.IsAnnotationSuggested(evaluator)) {
// spot.SetAdductType(AdductIon.Default);
// }
//}
//if (_param.TrackingIsotopeLabels) return;

//IsotopeEstimator.Process(alignmentSpots, _param, _iupac);
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The simplified logic unconditionally sets all spots as their own isotope parent with weight 0, potentially breaking isotope relationship tracking. The original conditional logic appears to handle different cases based on reference matching and isotope label tracking parameters.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@YukiMatsuzawa YukiMatsuzawa merged commit 18980f7 into master Oct 7, 2025
5 checks passed
@YukiMatsuzawa YukiMatsuzawa deleted the fix_isotopepicking_in_alignment branch October 7, 2025 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants