isValidMzQC: Checks validity (= completeness) of mzQC objects - or lists...

View source: R/mzQC.R

isValidMzQCR Documentation

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

Description

Note: Returns TRUE for empty lists!

Usage

isValidMzQC(x, parent_context = NULL)

Arguments

x

An mzQC refclass (or list of them), which will be subjected to validation

parent_context

Internal parameter used to track the path in nested validations

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
  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


rmzqc documentation built on June 8, 2025, 1:59 p.m.