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.

check_all(data, annotations, syn, study = NA, samples_table = NA)

Arguments

data

A tibble or dataframe with the columns: name, metadataType, species, assay, file_data, template (optional). 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. The template column should have the synID or Synapse JSON schema id for the metadata temaplate. If this is NULL or the column is missing, then the check will not verify that all expected columns are present in the metadata (i.e. check_cols is skipped).

annotations

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

syn

Synapse client object

study

A string containing the name of the study (default NA). If not given, will not check the metadata for individuals and specimens currently in the samples_table.

samples_table

Synapse synID for a table containing the columns: specimenID, individualID, assay, study (default NA). If samples_table or study not provided, will not check the metadata for individuals and specimens currently in this table.

Value

List of conditions

Examples

if (FALSE) { 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) }