Skip to content

Internal msfinder batch and single processing update#571

Merged
YukiMatsuzawa merged 21 commits intomasterfrom
internalMsfinder_addSubstructurePic
May 27, 2025
Merged

Internal msfinder batch and single processing update#571
YukiMatsuzawa merged 21 commits intomasterfrom
internalMsfinder_addSubstructurePic

Conversation

@Bujee415
Copy link
Copy Markdown
Collaborator

No description provided.

@Bujee415 Bujee415 requested review from YukiMatsuzawa and Copilot May 26, 2025 08:54
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 enhances the internal MS-FINDER batch and single-spot workflows by adding user feedback windows, introducing a substructure-aware spectrum view, and modernizing/refactoring core model logic and utilities.

  • Show progress messages during long-running operations and replace cursor overrides with popup windows
  • Add SmilesToStructureImageConverter and MsSpectrumViewWithSubstructureImage for inline structure previews
  • Refactor MsfinderObservedMetabolite, InternalMsFinder, StructureFinder, and FormulaGenerator for consistent naming and C# style

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
InternalMsfinderBatchSettingViewModel.cs Wrapped batch/single runs with message windows; removed AddTo(Disposables) calls
SmilesToStructureImageConverter.cs New converter to render SMILES as images in the spectrum view
InternalMsFinderView.xaml Swapped in the new MsSpectrumViewWithSubstructureImage; corrected property bindings
MsfinderObservedMetabolite.cs Reworked formula/structure lists to use VMs; added filtering callbacks and updated spectrum handling
InternalMsFinder.cs Updated axis labels to use fragmentation score; wired in new chart control
StructureFinder.cs Renamed methods to PascalCase and cleaned up I/O utilities
FormulaGenerator.cs Renamed private fields/methods to readonly/PascalCase and adopted collection expressions
Comments suppressed due to low confidence (5)

src/MSDIAL5/MsdialGuiApp/View/Search/InternalMsFinderView.xaml:394

  • Property name casing is inconsistent (SubstructureInChIkeys vs. SubstructureInChIKeys); it may fail at runtime if the VM property is Pascal-cased.
TextBox Text="{Binding Path=Model.SelectedObservedMetabolite.SelectedStructure.SubstructureInChIkeys, Mode=OneWay}"

src/MSDIAL5/MsdialGuiApp/ViewModel/Setting/InternalMsfinderBatchSettingViewModel.cs:56

  • The new ReactiveCommand subscriptions are no longer disposed via .AddTo(Disposables); consider re-adding disposal to avoid potential memory leaks.
Run = new ReactiveCommand().WithSubscribe(() => {

src/MSDIAL5/MsdialGuiApp/Model/Search/InternalMsFinder.cs:50

  • [nitpick] UI axis label should use consistent capitalization (e.g. "Fragmentation Score") to match other chart titles.
"fragmentation score"

src/MSDIAL5/MsdialGuiApp/Model/Search/MsfinderObservedMetabolite.cs:410

  • Looping over all formula results in ShowProductIonSpectrum may produce unintended aggregated spectra; it seems you intended to use the selected formula (SelectedFormula) instead.
foreach (var formula in FormulaList) {

src/MSDIAL5/MsdialGuiApp/Model/Search/MsfinderObservedMetabolite.cs:437

  • The inner loop duplicates each neutral-loss peak Count times; remove the extra for so each peak is added only once.
for (var i = 0; i < neutralLossList.Count; i++) {

}
return eSpectrum;
}
//private ObservableCollection<double[]> GetExperimentalSpectrum(RawData rawData, AnalysisParamOfMsfinder param)
Copy link

Copilot AI May 26, 2025

Choose a reason for hiding this comment

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

[nitpick] Large blocks of commented-out legacy code reduce readability; consider removing or moving to a separate branch if you need to preserve it.

Copilot uses AI. Check for mistakes.
@YukiMatsuzawa YukiMatsuzawa merged commit 63dae32 into master May 27, 2025
9 checks passed
@YukiMatsuzawa YukiMatsuzawa deleted the internalMsfinder_addSubstructurePic branch May 27, 2025 06:12
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