Checks validity (= completeness) of mzQC objects - or lists (JSON arrays) thereof
Source:R/mzQC.R
isValidMzQC.Rd
Note: Returns TRUE for empty lists!
Details
This function checks if an mzQC object or a list of mzQC objects is valid. For lists, all elements need to be valid for the function to return TRUE. The function provides detailed error messages that include the path to the invalid field, making it easier to identify validation issues in complex nested structures.
Examples
isValidMzQC(MzQCcvParameter$new("MS:4000059")) # FALSE
#> Warning: MzQCcvParameter$name is NA/NULL
#> [1] FALSE
isValidMzQC(MzQCcvParameter$new("MS:4000059", "Number of MS1 spectra")) # TRUE
#> [1] TRUE
isValidMzQC(list(MzQCcvParameter$new("MS:4000059"))) # FALSE
#> Warning: [1]$MzQCcvParameter$name is NA/NULL
#> [1] FALSE
isValidMzQC(list(MzQCcvParameter$new("MS:4000059", "Number of MS1 spectra"))) # TRUE
#> [1] TRUE