about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/rqtl_wrapper.R6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/rqtl_wrapper.R b/scripts/rqtl_wrapper.R
index 523888f..b7a9ae0 100644
--- a/scripts/rqtl_wrapper.R
+++ b/scripts/rqtl_wrapper.R
@@ -300,7 +300,11 @@ if (type == "4-way") {
   traitname <- colnames(pull.pheno(cross_object))[1]
   gtsp <- pull.genoprob(cross_object)
   allpheno <- pull.pheno(cross_object)
-  model <- paste0(traitname, " ~ ", paste0(covar_names, sep="", collapse=" + "))
+  if (!is.null(opt$addcovar)) {
+    model <- paste0(traitname, " ~ ", paste0(covar_names, sep="", collapse=" + "))
+  } else {
+    model <- paste0(traitname, " ~ 1 ")
+  }
 
   meffects <- c()
   verbose_print("Getting QTL main effects for 4-way crosses")