-
Notifications
You must be signed in to change notification settings - Fork 47
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
Reworking PEP to prevent cross-contamination #2394
Conversation
/// e.g., partition 1 = [0, 4, 8...], partition 2 = [1, 5, 9...], etc. | ||
/// </summary> | ||
/// <returns>A list containing numGroups partitions (lists of ints) </returns> | ||
static List<List<int>> DivideListIntoGroups(List<int> list, int numGroups) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there was a previously less complicated method here. did it not function correctly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
previously, the method took sequential chunks from each list. e.g., [1,2,3,4,5,6,7,8] would return [[1, 2], [3, 4], [5, 6], [7, 8]].
This function would return [[1, 5], [2, 6], [3, 7], [4, 8]].
MetaMorpheus/EngineLayer/FdrAnalysis/PEPValueAnalysisGeneric.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good, a few scattered questions here and there.
This PR changes how the PEP Engine works in order to prevent contamination during cross validation. It also changes how decoys are generated.
PEP Changes
In PEP, all PSMs that correspond to the same sequence are grouped together. The PeptideMatchGroup class enables this, acting as a collection of PSMs that all correspond to the same base sequence.
Then, the PEP engine splits the PeptideMatchGroups into 4 partitions. All PSMs in one partition have their PEPs calculated using a model trained on data from the other three partitions.
Decoy changes
When databases are loaded in MetaMorpheusTask, there is a new step that removes decoy peptides that are identical to target peptides. This is done by modifying the base sequence of each decoy protein to scramble and sequences that are identical to a target peptide.