Given a manifest and vector of file names, checks that the file names appear in the manifest. This is useful to ensure that metadata files (not just data files) are included in the manifest for upload.

check_files_manifest(
  manifest,
  filenames,
  strict = FALSE,
  success_msg = "All required files are present in manifest",
  fail_msg = "Some files may be missing from manifest"
)

Arguments

manifest

The manifest as a data frame or tibble

filenames

File names to look for in the path column of the manifest

strict

If FALSE, return a "check_warn" object; if TRUE, return a "check_fail" object

success_msg

Message indicating the check succeeded.

fail_msg

Message indicating the check failed.

Value

A condition object indicating whether the files are present in the path column of the manifest

Examples

manifest <- data.frame( path = c("individual_metadata.csv", "biospecimen_metadata.csv"), parent = c("syn123", "syn123") ) check_files_manifest( manifest, c( "individual_metadata.csv", "biospecimen_metadata.csv", "assay_metadata.csv" ) )
#> <check_warn: Some files may be missing from manifest>