aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPjotr Prins2024-04-01 07:24:46 -0500
committerFrederick Muriuki Muriithi2024-09-12 07:31:52 -0500
commit644100ea2e5e407eb06ccb292d85dd20b104beee (patch)
tree829b2e96885de2f6cb7284513ae1f5958dd2fcf0 /scripts
parentde36e1fb9c39f6a644af3432b45d9297cd7cf42f (diff)
downloadgenenetwork3-644100ea2e5e407eb06ccb292d85dd20b104beee.tar.gz
Getting Rqtl to run on fallback
Diffstat (limited to 'scripts')
-rw-r--r--scripts/rqtl_wrapper.R8
1 files changed, 7 insertions, 1 deletions
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) }