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

list containing records of an AIRR Data Model objected imported from a YAML or JSON representation.

model

if TRUE validate only AIRR DataFile defined objects. If FALSE attempt validation of all objects in data.

each

if TRUE return a logical vector with results for each object in data instead of a single TRUE or FALSE value.

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)


[Package airr version 1.5.0 Index]