Skip to content

Fix a bug of alignment deduplication process - #772

Merged
YukiMatsuzawa merged 1 commit into
masterfrom
bugfix/fix-deduplicate-annotation-process
Aug 17, 2026
Merged

Fix a bug of alignment deduplication process#772
YukiMatsuzawa merged 1 commit into
masterfrom
bugfix/fix-deduplicate-annotation-process

Conversation

@YukiMatsuzawa

Copy link
Copy Markdown
Contributor

No description provided.

Refactored the Process method to create a local list _spots from the input spots enumerable. All filtering and ordering operations are now performed on _spots. Added an early return if spotList is empty after initial LibraryID filtering and ordering.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes an exception/incorrect behavior in the alignment annotation deduplication workflow by ensuring the input spots sequence is materialized once and by short-circuiting when there are no eligible reference-matched spots to deduplicate.

Changes:

  • Materialize spots to a list once and reuse it across the three deduplication passes (ID / InChIKey / Name).
  • Add an early return when there are no reference-matched, non-“Putative” spots (prevents indexing into an empty list).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +89 to 92
spotList = _spots
.Where(n => n.IsReferenceMatched(_evaluator) && !n.Name.StartsWith("Putative"))
.Where(n => !n.MatchResults.Representative.Name.IsEmptyOrNull())
.OrderByDescending(spot => spot.MatchResults.Representative.Name)
@YukiMatsuzawa
YukiMatsuzawa merged commit 84ece0c into master Aug 17, 2026
10 checks passed
@YukiMatsuzawa
YukiMatsuzawa deleted the bugfix/fix-deduplicate-annotation-process branch August 17, 2026 09:58
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.

2 participants