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

Compute spectrum similarity in meta draw #2299

Closed trishorts closed 9 months ago

trishorts commented 11 months ago

MetaDraw reports the original spectrum similarity found in the search, even when displaying the scan against a new library spectrum. This PR enables MetaDraw to compute spectrum similarity on the fly against the displayed library spectrum.

The key parts of this code were generated by Alex.

codecov[bot] commented 11 months ago

Codecov Report

Merging #2299 (90c58d5) into master (d9ee565) will increase coverage by 0.05%. The diff coverage is 94.02%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2299/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/2299?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 #2299 +/- ## ========================================== + Coverage 92.28% 92.33% +0.05% ========================================== Files 135 135 Lines 20616 20665 +49 Branches 2836 2842 +6 ========================================== + Hits 19025 19081 +56 + Misses 1106 1099 -7 Partials 485 485 ``` | [Files Changed](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2299?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc) | Coverage Δ | | |---|---|---| | [MetaMorpheus/TaskLayer/XLSearchTask/WriteFile.cs](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2299?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-TWV0YU1vcnBoZXVzL1Rhc2tMYXllci9YTFNlYXJjaFRhc2svV3JpdGVGaWxlLmNz) | `97.74% <ø> (ø)` | | | [...ctions/MetaDraw/SpectrumMatch/SpectrumMatchPlot.cs](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2299?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-TWV0YU1vcnBoZXVzL0d1aUZ1bmN0aW9ucy9NZXRhRHJhdy9TcGVjdHJ1bU1hdGNoL1NwZWN0cnVtTWF0Y2hQbG90LmNz) | `93.71% <91.66%> (+2.34%)` | :arrow_up: | | [...gineLayer/SpectralLibrarySearch/LibrarySpectrum.cs](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2299?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-TWV0YU1vcnBoZXVzL0VuZ2luZUxheWVyL1NwZWN0cmFsTGlicmFyeVNlYXJjaC9MaWJyYXJ5U3BlY3RydW0uY3M=) | `98.41% <94.44%> (-1.59%)` | :arrow_down: | | [...etaMorpheus/GuiFunctions/MetaDraw/MetaDrawLogic.cs](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2299?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-TWV0YU1vcnBoZXVzL0d1aUZ1bmN0aW9ucy9NZXRhRHJhdy9NZXRhRHJhd0xvZ2ljLmNz) | `95.69% <100.00%> (+0.03%)` | :arrow_up: | | [...Morpheus/GuiFunctions/MetaDraw/MetaDrawSettings.cs](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2299?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-TWV0YU1vcnBoZXVzL0d1aUZ1bmN0aW9ucy9NZXRhRHJhdy9NZXRhRHJhd1NldHRpbmdzLmNz) | `99.11% <100.00%> (ø)` | | | [...MetaDraw/SpectrumMatch/PeptideSpectrumMatchPlot.cs](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2299?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-TWV0YU1vcnBoZXVzL0d1aUZ1bmN0aW9ucy9NZXRhRHJhdy9TcGVjdHJ1bU1hdGNoL1BlcHRpZGVTcGVjdHJ1bU1hdGNoUGxvdC5jcw==) | `97.40% <100.00%> (+0.21%)` | :arrow_up: |
trishorts commented 11 months ago

Have you ran this?

Yes

Is the spectrum similarity displayed automatically?

Yes. I changed the default for diplay similarity to true.

In my PR, you have to go in to settings and check Spectral Similarity before it's calculated/displayed. It's really unintuitive. Hopefully this PR can make it more obvious

If the spectral similarity in the .psmtsv file is different than the calculated similarity, how is that handled?

Both are added to the legend (original similarity and new similarity) or something.

Alexander-Sol commented 11 months ago

Need test coverage.

Need to edit CodeCov to show test coverage of GUI Functions project

trishorts commented 11 months ago

Need test coverage.

Need to edit CodeCov to show test coverage of GUI Functions project

I think we're good on codecov now. The critical function in LibrarySpectrum is now tested.