Skip to content

Add validatePSM(), a function that wraps multiple checks to validate PSMs#46

Open
guideflandre wants to merge 12 commits into
mainfrom
validatePSM
Open

Add validatePSM(), a function that wraps multiple checks to validate PSMs#46
guideflandre wants to merge 12 commits into
mainfrom
validatePSM

Conversation

@guideflandre
Copy link
Copy Markdown
Collaborator

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 describe validatePSM in the examples as well as in the vignette. They can also be used for other functions.

validatePSM is a wrapper for multiple validation metrics/checks based on spectral or identification characteristics.

It mainly includes:

  • checkABpresence() : TRUE if the a2-b2 fragments are both
    present.

  • checkXYpresence() : TRUE if the x2-y2 fragments are both
    present.

  • checkOverlap() : Detects a gap in the coverage of b- and y-ions.
    Returns FALSE when a gap is found (b- and y-ions do not jointly
    cover the full sequence), which may indicate an unsearched
    modification. Returns TRUE when b- and y-ions overlap, further
    confirming 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 parent
    ion over the base peak. A value close to 1 indicates poor
    fragmentation.

  • checkPrecursorPurity() returns a numeric vector of length
    length(x). Each value is the ratio of the most-intense peak to
    the total intensity within the isolation window of the
    corresponding MS1 scan, as computed by
    Spectra::precursorPurity(). MS1 spectra and MS2 spectra with no
    preceding MS1 scan return NA.

validatePSM() returns a dataframe with the results for each of these functions:

image

@guideflandre
Copy link
Copy Markdown
Collaborator Author

These metrics can then be added to a PSM object or Spectra object by matching the spectrumId, which make them useful for rescoring.

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.

1 participant