smith-chem-wisc / mzLib

Library for mass spectrometry projects
GNU Lesser General Public License v3.0
26 stars 33 forks source link

Mbr part1 #777

Closed Alexander-Sol closed 3 months ago

Alexander-Sol commented 6 months ago

First part of my MBR overhaul.

Previously, the MBR score was unused by FlashLFQ. As of this PR, the MBR score is still unused by FlashLFQ. Subsequent PRs will use the MBR score for calculation of FDR.

This PR alters how MBR works through changes to retention time prediction. Previously, we used a local alignment window of one minute to predict the retention time of MBR acceptors. Now, instead of setting a time for the alignment window, we use the 4 closest anchor peptides (peptides MS2-detected in both donor and acceptor runs), two on either side of the donor peptide, to predict the retention time for all MBR acceptors.

I tested this version of FlashLFQ using the FlashLFQ E. coli spike in vignette data. In that data, two samples are compared. One contains e. coli proteins spiked into a human sample @ 1x concentration, the other contains e. coli proteins spiked into a human sample @ 2x concentration. The table below shows the results of FlashLFQ's protein quantification of the ecoli proteins for the current release and incorporating the changes in this PR.

The retention time prediction method used by MBR was changed, which changes the results of MBR. This change explains the results shown below.

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

  | Current Release | Scoring Update (2 Anchors | Scoring Update (3 anchors, this PR) -- | -- | -- | -- No. E.Coli Proteins Quantified in both | 515 | 522 | 524 2x:1x mean protein intensity ratio | 1.999661 | 1.947146 | 1.953307 2x:1x Std.Dev protein intensity ratio | 0.769428 | 0.707974 | 0.719638

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 86.50000% with 27 lines in your changes missing coverage. Please review.

Project coverage is 75.44%. Comparing base (e3ecd5a) to head (11f8dbe).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/smith-chem-wisc/mzLib/pull/777/graphs/tree.svg?width=650&height=150&src=pr&token=1lXMC2BqYG&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/mzLib/pull/777?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 #777 +/- ## ======================================= Coverage 75.43% 75.44% ======================================= Files 201 201 Lines 30716 30762 +46 Branches 3086 3096 +10 ======================================= + Hits 23171 23207 +36 - Misses 7026 7030 +4 - Partials 519 525 +6 ``` | [Files](https://app.codecov.io/gh/smith-chem-wisc/mzLib/pull/777?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 Δ | | |---|---|---| | [mzLib/FlashLFQ/FlashLFQResults.cs](https://app.codecov.io/gh/smith-chem-wisc/mzLib/pull/777?src=pr&el=tree&filepath=mzLib%2FFlashLFQ%2FFlashLFQResults.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-bXpMaWIvRmxhc2hMRlEvRmxhc2hMRlFSZXN1bHRzLmNz) | `91.84% <ø> (ø)` | | | [mzLib/FlashLFQ/Identification.cs](https://app.codecov.io/gh/smith-chem-wisc/mzLib/pull/777?src=pr&el=tree&filepath=mzLib%2FFlashLFQ%2FIdentification.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-bXpMaWIvRmxhc2hMRlEvSWRlbnRpZmljYXRpb24uY3M=) | `100.00% <100.00%> (ø)` | | | [mzLib/FlashLFQ/RtInfo.cs](https://app.codecov.io/gh/smith-chem-wisc/mzLib/pull/777?src=pr&el=tree&filepath=mzLib%2FFlashLFQ%2FRtInfo.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-bXpMaWIvRmxhc2hMRlEvUnRJbmZvLmNz) | `100.00% <100.00%> (ø)` | | | [mzLib/FlashLFQ/MbrScorer.cs](https://app.codecov.io/gh/smith-chem-wisc/mzLib/pull/777?src=pr&el=tree&filepath=mzLib%2FFlashLFQ%2FMbrScorer.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-bXpMaWIvRmxhc2hMRlEvTWJyU2NvcmVyLmNz) | `78.21% <95.74%> (+11.09%)` | :arrow_up: | | [mzLib/FlashLFQ/ChromatographicPeak.cs](https://app.codecov.io/gh/smith-chem-wisc/mzLib/pull/777?src=pr&el=tree&filepath=mzLib%2FFlashLFQ%2FChromatographicPeak.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-bXpMaWIvRmxhc2hMRlEvQ2hyb21hdG9ncmFwaGljUGVhay5jcw==) | `85.95% <87.93%> (-1.95%)` | :arrow_down: | | [mzLib/FlashLFQ/FlashLfqEngine.cs](https://app.codecov.io/gh/smith-chem-wisc/mzLib/pull/777?src=pr&el=tree&filepath=mzLib%2FFlashLFQ%2FFlashLfqEngine.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smith-chem-wisc#diff-bXpMaWIvRmxhc2hMRlEvRmxhc2hMZnFFbmdpbmUuY3M=) | `87.61% <80.64%> (-0.60%)` | :arrow_down: |