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

Invert qvalue calculation #2337

Closed trishorts closed 3 months ago

trishorts commented 5 months ago

We have never used the correct calculation for q-value, which is (decoy count + 1)/(target count). This is because, the highest scoring PSM would have q-value = 0.5. Bill Noble alerted me to an alternate strategy for computing q-value that would eliminate this problem and allow us to use the correct formula. This is accomplished by computing q-value from lowest scoring PSM to highest scoring PSM subject to the following rule. Whenever the current q-value is greater than the previous q-value, we keep the previous q-value. Now, the highest scoring PSM will have a q-value equal to the q-value of the highest scoring decoy PSM. It will never be zero. c est la vie.

overall we expect to see a higher yield of both peptides and PSMs with q-value < 0.01.

An unfortunate by product of this update is that some unit tests with low psm count fail to have sufficent psms with low q-value. In certain instances, this prevents PEP from being calculated. This problem was solved by adding another mzML that could boost the psm count to a sufficiently high level to allow all unit tests to complete successfully while testing what they were intended to test. Please note, some test assertions had to be changed to accommodate the new results.

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 86.11111% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 92.76%. Comparing base (a1d7d93) to head (77969ff).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2337/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/2337?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 #2337 +/- ## ========================================== + Coverage 92.74% 92.76% +0.02% ========================================== Files 137 137 Lines 21199 21166 -33 Branches 2932 2924 -8 ========================================== - Hits 19660 19635 -25 + Misses 1056 1049 -7 + Partials 483 482 -1 ``` | [Files](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2337?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc) | Coverage Δ | | |---|---|---| | [...s/EngineLayer/ClassicSearch/ClassicSearchEngine.cs](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2337?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-TWV0YU1vcnBoZXVzL0VuZ2luZUxheWVyL0NsYXNzaWNTZWFyY2gvQ2xhc3NpY1NlYXJjaEVuZ2luZS5jcw==) | `97.84% <ø> (ø)` | | | [MetaMorpheus/EngineLayer/CommonParameters.cs](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2337?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-TWV0YU1vcnBoZXVzL0VuZ2luZUxheWVyL0NvbW1vblBhcmFtZXRlcnMuY3M=) | `95.52% <ø> (ø)` | | | [...ineLayer/CrosslinkSearch/CrosslinkSpectralMatch.cs](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2337?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-TWV0YU1vcnBoZXVzL0VuZ2luZUxheWVyL0Nyb3NzbGlua1NlYXJjaC9Dcm9zc2xpbmtTcGVjdHJhbE1hdGNoLmNz) | `96.35% <ø> (ø)` | | | [...EngineLayer/CrosslinkSearch/CrosslinkedPeptides.cs](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2337?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-TWV0YU1vcnBoZXVzL0VuZ2luZUxheWVyL0Nyb3NzbGlua1NlYXJjaC9Dcm9zc2xpbmtlZFBlcHRpZGVzLmNz) | `100.00% <ø> (ø)` | | | [...orpheus/EngineLayer/CrosslinkSearch/Crosslinker.cs](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2337?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-TWV0YU1vcnBoZXVzL0VuZ2luZUxheWVyL0Nyb3NzbGlua1NlYXJjaC9Dcm9zc2xpbmtlci5jcw==) | `85.83% <ø> (ø)` | | | [...pheus/EngineLayer/FdrAnalysis/FdrAnalysisEngine.cs](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2337?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-TWV0YU1vcnBoZXVzL0VuZ2luZUxheWVyL0ZkckFuYWx5c2lzL0ZkckFuYWx5c2lzRW5naW5lLmNz) | `96.50% <100.00%> (-0.66%)` | :arrow_down: | | [MetaMorpheus/EngineLayer/GlobalVariables.cs](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2337?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-TWV0YU1vcnBoZXVzL0VuZ2luZUxheWVyL0dsb2JhbFZhcmlhYmxlcy5jcw==) | `84.83% <ø> (ø)` | | | [MetaMorpheus/EngineLayer/GlycoSearch/Glycan.cs](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2337?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-TWV0YU1vcnBoZXVzL0VuZ2luZUxheWVyL0dseWNvU2VhcmNoL0dseWNhbi5jcw==) | `96.79% <ø> (ø)` | | | [MetaMorpheus/EngineLayer/GlycoSearch/GlycanBox.cs](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2337?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-TWV0YU1vcnBoZXVzL0VuZ2luZUxheWVyL0dseWNvU2VhcmNoL0dseWNhbkJveC5jcw==) | `81.81% <ø> (ø)` | | | [...aMorpheus/EngineLayer/GlycoSearch/GlycoPeptides.cs](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2337?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-TWV0YU1vcnBoZXVzL0VuZ2luZUxheWVyL0dseWNvU2VhcmNoL0dseWNvUGVwdGlkZXMuY3M=) | `88.03% <ø> (ø)` | | | ... and [35 more](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2337?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc) | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/smith-chem-wisc/MetaMorpheus/pull/2337/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)