Skip to contents

Validates that reference data for either 'HapMapIII_NCBI36' or 'ThousandGenome' is present in the path specified by the appropriate environment variable:

  • 'HAPMAPIII_NCBI36_DIR' for HapMapIII_NCBI36

  • 'THOUSANDGENOME_DIR' for ThousandGenome

If files are missing or paths are not set, informative guidance is provided.

Usage

validate_reference_data(refdata)

Arguments

refdata

A character string specifying the reference dataset to validate. Should be one of 'HapMapIII_NCBI36' or 'ThousandGenome'.

Value

A normalized path to the directory containing the validated reference data files.

Examples

if (nzchar(Sys.getenv("HAPMAPIII_NCBI36_DIR"))) {
    validate_reference_data("HapMapIII_NCBI36")
}
#> [1] "/Users/mayerdav/Downloads/HapMapIII_NCBI36"

if (nzchar(Sys.getenv("HAPMAPIII_NCBI36_DIR"))) {
    validate_reference_data("ThousandGenome")
}
#> [1] "/Users/mayerdav/Downloads/Ref10Kgenome_files"