Skip to content

Conversation

nbollis
Copy link
Member

@nbollis nbollis commented Sep 12, 2025

This PR does 3 major things.

Refactor MetaDraw Data loading

  • Data Loading is now performed in a dedicated class

  • Removed the second data loading method from MetaDraw.xaml.cs

  • Loading of PSMs and Spectra occurs first, then the other tabs load asynchronously

  • While the other tabs are loading in the background, they are disabled in the GUI

  • Created singleton LoadingProgressViewModel to handle the load state of different MetaDraw tabs.

  • Created parent MetaDrawTabViewModel to handle loading GUI responses.

    image

Deconvolution Visualization

  • Exposed additional classic deconvolution parameters to the GUI
  • Created a new tab which allows for the visualization of deconvolution results of:
    • The entire spectrum
      image
    • The MS1 isolation window
      image

BioPolymer Coverage Visualization

  • Overlays peptides on the protein sequence and colors with respect to
    • The specificity of that peptide to the protein
      P07355_SequenceCoverage
    • The data file in which the identification was made
      P07355_SequenceCoverage

Other changes to make this PR possible

  • Created parent class for SpectrumMatchPlot to handle basic spectral plotting.
  • Removed all explicit axis tick labeling of all spectral plots -> it now does it automatically based upon your zoom.
  • Created parent MetaDrawTabViewModel to handle
  • Chimera tab can be reloaded with new data instead of needing to construct a new tab view model to parse new data.

Copy link

codecov bot commented Sep 12, 2025

Codecov Report

❌ Patch coverage is 96.91657% with 51 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.83%. Comparing base (dc8854b) to head (1a35130).

Files with missing lines Patch % Lines
...rpheus/GuiFunctions/MetaDraw/MetaDrawDataLoader.cs 92.87% 27 Missing ⚠️
...oPolymerCoverage/BioPolymerCoverageMapViewModel.cs 95.94% 17 Missing ⚠️
...aDraw/BioPolymerCoverage/BioPolymerTabViewModel.cs 98.71% 3 Missing ⚠️
...w/DeconExploration/DeconExplorationTabViewModel.cs 98.61% 2 Missing ⚠️
...s/MetaDraw/Chimeras/ChimeraAnalysisTabViewModel.cs 94.73% 1 Missing ⚠️
...uiFunctions/ViewModels/LoadingProgressViewModel.cs 95.83% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #2567     +/-   ##
=========================================
  Coverage   96.83%   96.83%             
=========================================
  Files         162      174     +12     
  Lines       23850    25216   +1366     
  Branches     3316     3484    +168     
=========================================
+ Hits        23095    24418   +1323     
- Misses        750      793     +43     
  Partials        5        5             
Flag Coverage Δ
unittests 94.89% <94.93%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
MetaMorpheus/EngineLayer/GlobalVariables.cs 89.59% <100.00%> (ø)
...ioPolymerCoverage/BioPolymerCoverageResultModel.cs 100.00% <100.00%> (ø)
...raw/BioPolymerCoverage/BioPolymerGroupViewModel.cs 100.00% <100.00%> (ø)
...Functions/MetaDraw/Chimeras/ChimeraLegendCanvas.cs 100.00% <100.00%> (ø)
...unctions/MetaDraw/Chimeras/MetaDrawTabViewModel.cs 100.00% <100.00%> (ø)
...s/GuiFunctions/MetaDraw/Chimeras/Ms1ChimeraPlot.cs 100.00% <100.00%> (ø)
...w/DeconExploration/DeconvolutedSpeciesViewModel.cs 100.00% <100.00%> (ø)
...ons/MetaDraw/DeconExploration/DeconvolutionPlot.cs 100.00% <100.00%> (ø)
...etaMorpheus/GuiFunctions/MetaDraw/MetaDrawLogic.cs 98.38% <100.00%> (+1.07%) ⬆️
...Morpheus/GuiFunctions/MetaDraw/MetaDrawSettings.cs 98.43% <100.00%> (+0.10%) ⬆️
... and 16 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nbollis nbollis marked this pull request as ready for review September 15, 2025 19:49
@trishorts trishorts requested a review from Copilot September 16, 2025 19:56
Copy link
Contributor

@Copilot 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 significantly refactors MetaDraw's data loading architecture and adds two major new visualization tabs while improving the overall user experience.

Key Changes:

  • Refactored data loading into a dedicated asynchronous MetaDrawDataLoader class with progress visualization
  • Added a new Chimera Annotation tab for visualizing deconvolution results of MS spectra
  • Added a new BioPolymer Coverage tab for protein sequence coverage visualization with customizable coloring

Reviewed Changes

Copilot reviewed 62 out of 62 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
MetaDrawDataLoader.cs New dedicated data loader class handling asynchronous loading of spectra, PSMs, and libraries with progress tracking
MetaDrawLogic.cs Refactored to use new data loader and moved loading methods to dedicated class
DeconExplorationTabViewModel.cs New tab for deconvolution visualization with full spectrum and isolation region modes
BioPolymerTabViewModel.cs New tab for protein sequence coverage analysis with database loading and filtering
BioPolymerCoverageMapViewModel.cs Visualization component for protein coverage with customizable coloring by coverage type or file origin
MetaDrawSettings.cs Added new settings for BioPolymer coverage colors and font size
SpectrumMatchPlot.cs Refactored to inherit from new MassSpectrumPlot base class
MetaDraw.xaml.cs Updated to use new data loader and initialize new tab view models

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

@Alexander-Sol
Copy link
Contributor

  • Decon Exploration shows scans with nothing in window, or un-annotated peaks in window (bottom-up). This is pretty frequent (>25% of scans/isolation windows).
    • Maybe hard to do anything about this
  • No loading icon when selecting new data file for decon explorer
  • No loading icon when clicking "Load Files" in BioPolymer Coverage
    • Would be nice to have a warning when loading in a non-matching database

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants