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" )
The manifest as a data frame or tibble
File names to look for in the
Message indicating the check succeeded.
Message indicating the check failed.
A condition object indicating whether the files are present in the
path column of the manifest
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>