Skip to content

Fix massql#597

Merged
YukiMatsuzawa merged 5 commits intomasterfrom
fix_massql
Jul 8, 2025
Merged

Fix massql#597
YukiMatsuzawa merged 5 commits intomasterfrom
fix_massql

Conversation

@htsugawa
Copy link
Copy Markdown
Contributor

@htsugawa htsugawa commented Jul 8, 2025

No description provided.

@YukiMatsuzawa YukiMatsuzawa requested a review from Copilot July 8, 2025 11:44
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 updates the MassQL integration endpoint, enhances JSON parsing to handle arrays and single objects, extends qualifier support, and refactors the fragment‐search logic.

  • Switches the MassQL API URL and adds robust JSON array/single‐object deserialization with error handling.
  • Maps new qualifier fields (intensity, time, drift time, charge) into PeakFeatureSearchValue and adds ConditionType.
  • Refactors FragmentSearcher to eliminate duplicated MS1 query logic, introduces EvaluateCondition, and implements IsMs1FeatureMatched/IsMs1SpotMatched.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
src/MSDIAL5/MsdialGuiApp/Model/Setting/MassqlSettingModel.cs Updated MassQL URL, JSON parsing branches, extended qualifiers.
src/MSDIAL5/MsdialCore/DataObj/PeakFeatureSearchValue.cs Added Charge and non-nullable ConditionType keys.
src/MSDIAL5/MsdialCore/Algorithm/FragmentSearcher.cs Removed duplicate MS1 checks, added EvaluateCondition and new matching methods.
Comments suppressed due to low confidence (2)

src/MSDIAL5/MsdialCore/Algorithm/FragmentSearcher.cs:93

  • [nitpick] Method names in C# should use PascalCase. Rename isPeakDetectedByBasicMsPropertyQuery to IsPeakDetectedByBasicMsPropertyQuery for consistency.
        private static bool isPeakDetectedByBasicMsPropertyQuery(ChromatogramPeakFeature feature, double maxIntensity, List<PeakFeatureSearchValue> queries) {

src/MSDIAL5/MsdialGuiApp/Model/Setting/MassqlSettingModel.cs:46

  • Add unit tests for both array and single-object JSON responses to ensure both branches (StartsWith("[") and the fallback) work correctly.
                        if (json.TrimStart().StartsWith("[")) {

YukiMatsuzawa and others added 2 commits July 9, 2025 01:19
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@YukiMatsuzawa YukiMatsuzawa merged commit 35fac69 into master Jul 8, 2025
5 checks passed
@YukiMatsuzawa YukiMatsuzawa deleted the fix_massql branch July 8, 2025 16: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.

3 participants