The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

How to syntactically validate an mzQC file

The mzQC file format is based upon JSON. When writing a JSON file, certain substructures are required by the mzQC specification document, other items are optional. The syntax validator build into rmzqc allows you to check if all mandatory items are present, or if something was erroneously omitted in the mzQC file.

There are three validation functions validateFromFile(), validateFromString() and validateFromObj(), depending on the data you have at hand. Their result is always a bool (TRUE/FALSE) which has some attributes (usually ‘errors’) attached. Simply print the bool or call ‘attributes()’ on the result (in case of failure) to inspect details.

To validate a file simply:

library(rmzqc)
mzQC_filename = system.file("testdata/test.mzQC", package="rmzqc")
#mzQC_filename = "C:\\dev\\rmzqc\\inst\\testdata\\test.mzQC"
res = validateFromFile(mzQC_filename)
res

If you have the file already as a JSON string in R (i.e. no need to load the data from a file), then simply use ‘validateFromString()’

library(rmzqc)
mzQC_strings = readLines(system.file("testdata/test.mzQC", package="rmzqc"))
res = validateFromString(mzQC_strings)
res

Finally, if you have an mzQC root object in hand, then call ‘validateFromObj()’

library(rmzqc)
mzQC_root = rmzqc::readMZQC(system.file("testdata/test.mzQC", package="rmzqc"))
res = validateFromObj(mzQC_root)
res

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.