Add validatePSM(), a function that wraps multiple checks to validate PSMs#46
Open
guideflandre wants to merge 12 commits into
Open
Add validatePSM(), a function that wraps multiple checks to validate PSMs#46guideflandre wants to merge 12 commits into
guideflandre wants to merge 12 commits into
Conversation
Addition of validatePSM branch
Collaborator
Author
|
These metrics can then be added to a PSM object or Spectra object by matching the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a few functions (metrics used through checks), a wrapper function
validatePSM(), corresponding tests and a vignette, as well as example data bundled with the package. The example data is a subset of?MsDataHub::Boekweg2022. There is a spectra object and a PSM object. They are used to describevalidatePSMin the examples as well as in the vignette. They can also be used for other functions.validatePSMis a wrapper for multiple validation metrics/checks based on spectral or identification characteristics.It mainly includes:
checkABpresence():TRUEif the a2-b2 fragments are bothpresent.
checkXYpresence():TRUEif the x2-y2 fragments are bothpresent.
checkOverlap(): Detects a gap in the coverage of b- and y-ions.Returns
FALSEwhen a gap is found (b- and y-ions do not jointlycover the full sequence), which may indicate an unsearched
modification. Returns
TRUEwhen b- and y-ions overlap, furtherconfirming the identification.
checkShiftConsistency(): In case of modifications present:returns the percentage of potential mass shifts actually matched.
If not applicable because there are no modifications:
NA.checkParentIonIntensity(): The relative intensity of the parention over the base peak. A value close to 1 indicates poor
fragmentation.
checkPrecursorPurity()returns anumericvector of lengthlength(x). Each value is the ratio of the most-intense peak tothe total intensity within the isolation window of the
corresponding MS1 scan, as computed by
Spectra::precursorPurity(). MS1 spectra and MS2 spectra with nopreceding MS1 scan return
NA.validatePSM()returns a dataframe with the results for each of these functions: