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

Only quantify peptides that clear the q-value threshold #2375

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

Alexander-Sol
Copy link
Contributor

Previously, when we wrote the AllQuantifiedPeptides output, we filtered based off of PSM q-value. So you would have some peptides with high q-values reported in the quant results. This fixes that!

In order to fix that, I had to reconfigure FDR calculation at the PSM and Peptide level. I did this by adding two new fields to SpectralMatch: PsmFdrInfo and PeptideFdrInfo. The names are self explanatory. There are a variety of toggles that were added to specify when Psm level FDR info should be used and peptide level info should be used.

Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.63%. Comparing base (dd3dc20) to head (40f3f23).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2375      +/-   ##
==========================================
- Coverage   93.65%   93.63%   -0.02%     
==========================================
  Files         140      140              
  Lines       21898    21916      +18     
  Branches     3005     3006       +1     
==========================================
+ Hits        20508    20522      +14     
- Misses        934      937       +3     
- Partials      456      457       +1     
Files with missing lines Coverage Δ
...pheus/EngineLayer/FdrAnalysis/FdrAnalysisEngine.cs 95.71% <100.00%> (+0.04%) ⬆️
MetaMorpheus/TaskLayer/FilteredPsms.cs 95.18% <100.00%> (ø)
...eus/TaskLayer/SearchTask/PostSearchAnalysisTask.cs 94.02% <100.00%> (+0.05%) ⬆️
...aMorpheus/TaskLayer/SearchTask/SearchParameters.cs 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

// If peptide level Q-values default to zero, it is hard to determine which PSMs have a legitimate peptide-level Q-value of zero and
// which just weren't included in peptide-level calculations. Hence, we set q values to one here.
psm.PeptideFdrInfo.QValue = 1;
psm.PeptideFdrInfo.PEP_QValue = 1;
}
Copy link
Member

@nbollis nbollis Sep 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we instead default the value to -1 or 1 to make it more clear from instantiation instead of within this method?

@@ -101,6 +101,16 @@ public static void AllResultsAndResultsTxtContainsCorrectValues_PepQValue_Bottom
Assert.AreEqual("TaGe_SA_A549_3_snip_2 - Target protein groups within 1 % FDR: 140", results[15]);
}

[Test]
public static void TestPeptideQuantificationResults()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test seems subject to break in the future due to the hard coded number. Could you instead read in the peptides file, count the results at threshold, then use that in your assert?

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

Successfully merging this pull request may close these issues.

3 participants