From f344af6728a6c0a75829e7efbc79ffddc8e0e355 Mon Sep 17 00:00:00 2001 From: Ryan Corces Date: Sun, 23 Oct 2022 12:58:53 -0700 Subject: [PATCH] report failed files in saving troubleshooting https://github.com/GreenleafLab/ArchR/issues/1504 --- R/AllClasses.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/AllClasses.R b/R/AllClasses.R index 27c7eb5b..6f7626f9 100644 --- a/R/AllClasses.R +++ b/R/AllClasses.R @@ -640,7 +640,9 @@ saveArchRProject <- function( zdata <- newProj@projectMetadata$GroupCoverages[[z]]$coverageMetadata zfiles <- gsub(outDirOld, outputDirectory, zdata$File) newProj@projectMetadata$GroupCoverages[[z]]$coverageMetadata$File <- zfiles - stopifnot(all(file.exists(zfiles))) + if(!all(file.exists(zfiles))){ + stop("Coverage files missing from new project's directory. Missing files:\n",paste(zfiles[which(!file.exists(zfiles))], collapse = "\n")) + } } }