Skip to content

Commit

Permalink
change file.rename to file.copy, then file.remove to deal with snparc…
Browse files Browse the repository at this point in the history
…her and results being on diff filesystems
  • Loading branch information
cademirch committed Mar 8, 2024
1 parent f0fe796 commit 39a899f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions workflow/modules/qc/scripts/qc_dashboard_render.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@ render_qcplots <- function(prefix, nClusters, GMKey){

#move the default html output to the QC folder. This is an inconvenience of knitr, and
#the output.file
file.rename(from = script.out,
to = output.path)
copy_successful <- file.copy(script.out, output.path)

# Check if the copy was successful
if (copy_successful) {
# If the copy succeeded, delete the original file
file.remove(script.out)
} else {
# If the copy failed, print an error message
cat("snpArcher: Failed to move the qc dashboard html.\n")
}
}

render_qcplots(snakemake@params[[1]], snakemake@params[[2]], snakemake@params[[3]])

0 comments on commit 39a899f

Please sign in to comment.