validate_airr {airr} | R Documentation |
Validate an AIRR Data Model nested list representation
Description
validate_airr
validates the fields in a named nested list representation of the
AIRR Data Model. Typically, generating by reading of JSON or YAML formatted AIRR files.
Usage
validate_airr(data, model = TRUE, each = FALSE)
Arguments
data |
|
model |
if |
each |
if |
Value
Returns TRUE
if the input data
is compliant with AIRR standards and
FALSE
if not. If each=TRUE
is set, then a vector with results for each
each object in data
is returned instead.
See Also
See Schema for the AIRR schema definitions. See read_airr for loading AIRR Data Models from a file. See write_airr for writing AIRR Data Models to a file.
Examples
# Get path to the rearrangement-example file
f1 <- system.file("extdata", "repertoire-example.yaml", package="airr")
f2 <- system.file("extdata", "germline-example.json", package="airr")
# Load data file
repertoire <- read_airr(f1)
germline <- read_airr(f2)
# Validate a single record
validate_airr(repertoire)
# Return validation for individual objects
validate_airr(germline, each=TRUE)