check_all: Run all validation checks

Description Usage Arguments Value Examples

View source: R/check-all.R

Description

Runs all validation checks. Requires an environment configuration (config) to be set. The config is expected to have templates for each metadataType, where individual and biospecimen depend on species and assay depends on the assay type. Additionally, there should be complete_columns for each metadataType.

Usage

1
check_all(data, annotations, syn)

Arguments

data

A tibble or dataframe with the columns: name, metadataType, species, assay, file_data. The file_data column should be a list column containing a dataframe with the file data or NULL if the data does not exist. data is expected to have four rows, one for each metadataType: individual, biospecimen, assay, manifest. If file_data is NULL for a given metadataType, the metadataType should still be present.

annotations

A data frame of annotation definitions. Must contain at least three columns: key, value, and columnType.

syn

Synapse client object

Value

List of conditions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## Not run: 
syn <- synapse$Synapse()
syn$login()

annots <- get_synapse_annotations(syn = syn)

data <- tibble::tibble(
  metadataType = c(
    "manifest",
    "individual",
    "biospecimen",
    "assay"
  ),
  name = c("a", NA, NA, "c"),
  species = "human",
  assay = "rnaSeq",
  file_data = c(
    list(data.frame(a = c(TRUE, FALSE), b = c(1, 3))),
    list(NULL),
    list(NULL),
    list(data.frame(a = c(TRUE, FALSE), b = c(1, 3)))
  )
)
res <- check_all(data, annots, syn)

## End(Not run)

dccvalidator documentation built on July 2, 2020, 4:05 a.m.