From 644100ea2e5e407eb06ccb292d85dd20b104beee Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Mon, 1 Apr 2024 07:24:46 -0500 Subject: Getting Rqtl to run on fallback --- scripts/rqtl_wrapper.R | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/rqtl_wrapper.R b/scripts/rqtl_wrapper.R index 2ac8faa..0d1f2ff 100644 --- a/scripts/rqtl_wrapper.R +++ b/scripts/rqtl_wrapper.R @@ -3,6 +3,12 @@ library(qtl) library(stringi) library(stringr) + +tmp_dir = Sys.getenv("TMPDIR") +if (!dir.exists(tmp_dir)) { + tmp_dir = "/tmp" +} + option_list = list( make_option(c("-g", "--geno"), type="character", help=".geno file containing a dataset's genotypes"), make_option(c("-p", "--pheno"), type="character", help="File containing two columns - sample names and values"), @@ -56,7 +62,7 @@ geno_file = opt$geno pheno_file = opt$pheno # Generate randomized filename for cross object -cross_file = file.path(opt$outdir, "cross", paste(stri_rand_strings(1, 8), ".cross", sep = "")) +cross_file = file.path(tmp_dir, "output", paste(stri_rand_strings(1, 8), ".cross", sep = "")) trim <- function( x ) { gsub("(^[[:space:]]+|[[:space:]]+$)", "", x) } -- cgit v1.2.3