smith-chem-wisc / MetaMorpheus

Proteomics search software with integrated calibration, PTM discovery, bottom-up, top-down and LFQ capabilities
MIT License
90 stars 45 forks source link

Cross Link Spectrum Match Plot Export Bug Fix #2371

Closed nbollis closed 4 weeks ago

nbollis commented 1 month ago

Exporting crosslink spectrum match plots was bugged in two places.

  1. If there were no PTMs, but the option to display the PTM legend was enabled, it would cause a crash due to the legend having a height of 0. This was resolved by adding another clause to the if function when exporting the CSM plot.
  2. The sequence annotation displayed on the annotated spectra was not being exported properly; cut off in the middle of the crosslinker. This was resolved by extending the canvas height upon export.

Tests were added to ensure cross link spectral match plots display the correct number of annotations and export correctly for all possible export types.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.81%. Comparing base (4a0a5e8) to head (9e8cb4f).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2371/graphs/tree.svg?width=650&height=150&src=pr&token=m0HXyK8tFy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc)](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2371?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc) ```diff @@ Coverage Diff @@ ## master #2371 +/- ## ========================================== + Coverage 92.79% 92.81% +0.01% ========================================== Files 137 137 Lines 21170 21170 Branches 2924 2924 ========================================== + Hits 19645 19649 +4 + Misses 1045 1042 -3 + Partials 480 479 -1 ``` | [Files](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2371?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc) | Coverage Δ | | |---|---|---| | [...taDraw/SpectrumMatch/CrosslinkSpectrumMatchPlot.cs](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2371?src=pr&el=tree&filepath=MetaMorpheus%2FGuiFunctions%2FMetaDraw%2FSpectrumMatch%2FCrosslinkSpectrumMatchPlot.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-TWV0YU1vcnBoZXVzL0d1aUZ1bmN0aW9ucy9NZXRhRHJhdy9TcGVjdHJ1bU1hdGNoL0Nyb3NzbGlua1NwZWN0cnVtTWF0Y2hQbG90LmNz) | `96.10% <100.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2371/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc)