From 0e6990940e22eb0431d6a27e45d29bc04d8ad582 Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 22 Mar 2022 20:28:58 +0000 Subject: Change order of if statements for running genoprob command Now it checks for pairscan first, just in case interval ends up being passed (which is an irrelevant parameter for pairscan) Also added a couple more verbose prints --- scripts/rqtl_wrapper.R | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/rqtl_wrapper.R b/scripts/rqtl_wrapper.R index fb12012..5ecd774 100644 --- a/scripts/rqtl_wrapper.R +++ b/scripts/rqtl_wrapper.R @@ -172,12 +172,12 @@ verbose_print('Generating cross object\n') cross_object = geno_to_csvr(geno_file, trait_names, trait_vals, cross_file, type) # Calculate genotype probabilities -if (!is.null(opt$interval)) { - verbose_print('Calculating genotype probabilities with interval mapping\n') - cross_object <- calc.genoprob(cross_object, step=5, stepwidth="max") -} else if (!is.null(opt$pairscan)) { +if (!is.null(opt$pairscan)) { verbose_print('Calculating genotype probabilities for pair-scan\n') cross_object <- calc.genoprob(cross_object, step=10) +} else if (!is.null(opt$interval)) { + verbose_print('Calculating genotype probabilities with interval mapping\n') + cross_object <- calc.genoprob(cross_object, step=5, stepwidth="max") } else { verbose_print('Calculating genotype probabilities\n') cross_object <- calc.genoprob(cross_object) @@ -241,10 +241,12 @@ if (!is.null(opt$control)) { } if (!is.null(opt$pairscan)) { + verbose_print("Running scantwo") scan_func <- function(...){ scantwo(...) } } else { + verbose_print("Running scanone") scan_func <- function(...){ scanone(...) } -- cgit v1.2.3