Al-Murphy / MungeSumstats

Rapid standardisation and quality control of GWAS or QTL summary statistics
https://doi.org/doi:10.18129/B9.bioc.MungeSumstats
75 stars 16 forks source link

Check that save_path dir exists early on #62

Closed bschilder closed 3 years ago

bschilder commented 3 years ago

Just came across this issue: in format_sumstats when I set path to somewhere that can't actually be created (even with recursion), the entire pipeline will run only to fail at the write step at the very end.

e.g. "/rds/general/typo/neurogenomics-lab/live/GWAS_sumstats/OpenGWAS"

Instead, I'm adding a check to check_save_path that ensures the directory does indeed exist: https://github.com/neurogenomics/MungeSumstats/blob/eb8d4581d7622c3b7f20bd68f95b9d69d0578b2c/R/check_save_path.R#L126