isValidMzQC function

Checks validity (= completeness) of mzQC objects - or lists (JSON arrays) thereof

Checks validity (= completeness) of mzQC objects - or lists (JSON arrays) thereof

Note: Returns TRUE for empty lists!

isValidMzQC(x, ...)

Arguments

  • x: An mzQC refclass (or list of them), each will be subjected to isValidMzQC()
  • ...: Ellipsis, for recursive argument splitting

Details

You can pass multiple arguments, which are all checked individually. All of them need to be valid, for TRUE to be returned. The reason for combining both list support for arguments and ellipsis (...) into this function is that JSON arrays are represented as lists and you can simply pass them as a single argument (without the need for do.call()) and get the indices of invalid objects (if any). The ellipsis is useful to avoid clutter, i.e. if (!isValidMzQC(a) || !isValidMzQC(b)) doStuff() is harder to read than if (!isValidMzQC(a,b)) doStuff()

Examples

isValidMzQC(MzQCcvParameter$new("MS:4000059")) # FALSE isValidMzQC(MzQCcvParameter$new("MS:4000059", "Number of MS1 spectra")) # TRUE isValidMzQC(list(MzQCcvParameter$new("MS:4000059"))) # FALSE isValidMzQC(list(MzQCcvParameter$new("MS:4000059", "Number of MS1 spectra"))) # TRUE isValidMzQC(list(MzQCcvParameter$new("MS:4000059", "Number of MS1 spectra")), MzQCcvParameter$new()) # FALSE
  • Maintainer: Chris Bielow
  • License: MIT + file LICENSE
  • Last published: 2025-03-23