aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2021-07-23 20:08:36 +0000
committerzsloan2021-07-23 20:08:36 +0000
commitb3e6105b5d8d2c2f30f2609290ef62fa17f32e62 (patch)
treed3831cf122f3b510401951a7149fb34c5c39f96b
parentc3d59414b4bd23e52823a8b7e846f732e36d8c56 (diff)
downloadgenenetwork3-b3e6105b5d8d2c2f30f2609290ef62fa17f32e62.tar.gz
Added line priting pair-scan results to CSV and changed the default step-size to 10cM for pair-scan
-rw-r--r--scripts/rqtl_wrapper.R9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/rqtl_wrapper.R b/scripts/rqtl_wrapper.R
index 77ed227..d8ecfaa 100644
--- a/scripts/rqtl_wrapper.R
+++ b/scripts/rqtl_wrapper.R
@@ -158,7 +158,7 @@ if (!is.null(opt$interval)) {
cross_object <- calc.genoprob(cross_object, step=5, stepwidth="max")
} else if (!is.null(opt$pairscan)) {
verbose_print('Calculating genotype probabilities with interval mapping\n')
- cross_object <- calc.genoprob(cross_object, step=20)
+ cross_object <- calc.genoprob(cross_object, step=10)
} else {
verbose_print('Calculating genotype probabilities\n')
cross_object <- calc.genoprob(cross_object)
@@ -244,4 +244,9 @@ if (!is.null(opt$addcovar) || !is.null(opt$control)){
qtl_results = scan_func(cross_object, pheno.col=1, model=opt$model, method=opt$method)
}
-write.csv(qtl_results, out_file)
+verbose_print('Writing results to CSV file\n')
+if (!is.null(opt$pairscan)) {
+ write.csv(qtl_results[1], out_file)
+} else {
+ write.csv(qtl_results, out_file)
+}