From 4940195460008192b6ca6269e1fb8c172ada4f17 Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 27 Sep 2024 18:25:36 +0000 Subject: Fix R/qtl output paths The script now takes the --outdir parameter as the output directory, only using TMPDIR if nothing is passed "output" in the output directory was also changed to "gn3" to be consistent with recent changes to GN3's code --- scripts/rqtl_wrapper.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/rqtl_wrapper.R b/scripts/rqtl_wrapper.R index b4725d0..fd786cf 100644 --- a/scripts/rqtl_wrapper.R +++ b/scripts/rqtl_wrapper.R @@ -62,7 +62,7 @@ geno_file = opt$geno pheno_file = opt$pheno # Generate randomized filename for cross object -cross_file = file.path(tmp_dir, "gn3", paste(stri_rand_strings(1, 8), ".cross", sep = "")) +cross_file = file.path(opt$outdir, "gn3", paste(stri_rand_strings(1, 8), ".cross", sep = "")) trim <- function( x ) { gsub("(^[[:space:]]+|[[:space:]]+$)", "", x) } @@ -288,9 +288,9 @@ if (opt$nperm > 0) { } if (!is.null(opt$filename)){ - out_file = file.path(opt$outdir, "output", opt$filename) + out_file = file.path(opt$outdir, "gn3", opt$filename) } else { - out_file = file.path(opt$outdir, "output", paste(pheno_name, "_", stri_rand_strings(1, 8), sep = "")) + out_file = file.path(opt$outdir, "gn3", paste(pheno_name, "_", stri_rand_strings(1, 8), sep = "")) } if (!is.null(opt$addcovar) || !is.null(opt$control)){ -- cgit v1.2.3