Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invert q-value #2355

Merged
merged 4 commits into from
Apr 7, 2024
Merged

Invert q-value #2355

merged 4 commits into from
Apr 7, 2024

Conversation

trishorts
Copy link
Contributor

@trishorts trishorts commented Mar 8, 2024

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.

Copy link

codecov bot commented Mar 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.76%. Comparing base (a1d7d93) to head (3e7a648).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2355      +/-   ##
==========================================
+ 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 Coverage Δ
...pheus/EngineLayer/FdrAnalysis/FdrAnalysisEngine.cs 96.50% <100.00%> (-0.66%) ⬇️
MetaMorpheus/EngineLayer/PsmTsv/PsmTsvWriter.cs 97.53% <ø> (ø)

... and 2 files with indirect coverage changes

@trishorts trishorts merged commit 5ee8567 into smith-chem-wisc:master Apr 7, 2024
3 checks passed
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.

4 participants