about summary refs log tree commit diff
path: root/scripts/rqtl2_wrapper.R
diff options
context:
space:
mode:
authorAlexander_Kabui2024-10-29 15:39:55 +0300
committerAlexander_Kabui2024-10-29 15:39:55 +0300
commit7194eaf537c889c979b34a1f092ba5f2c0a8e030 (patch)
treeb31db930ab59009614f9fb7fd3a161e44051a3c0 /scripts/rqtl2_wrapper.R
parentda4ae79ddce7c36b48d4bb4ba314503ef9743cd7 (diff)
downloadgenenetwork3-7194eaf537c889c979b34a1f092ba5f2c0a8e030.tar.gz
Refactor: refactor function to calculate error LOD scores.
Diffstat (limited to 'scripts/rqtl2_wrapper.R')
-rw-r--r--scripts/rqtl2_wrapper.R13
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/rqtl2_wrapper.R b/scripts/rqtl2_wrapper.R
index 5decd85..2c38dd4 100644
--- a/scripts/rqtl2_wrapper.R
+++ b/scripts/rqtl2_wrapper.R
@@ -11,6 +11,8 @@ options(stringsAsFactors = FALSE)
 
 args = commandArgs(trailingOnly = TRUE)
 
+NO_OF_CORES = 4
+
 # get the json file path with pre metadata required to create the cross
 
 if (length(args) == 0) {
@@ -169,9 +171,14 @@ print(Pr)
 summary(Pr)
 
 
-#calculate genotyping error LOD scores
-error_lod <- calc_errorlod(dataset, Pr, quiet = FALSE, cores = 4)
-print(error_lod)
+#Function to  Calculate genotyping error LOD scores
+cat("Calculate genotype error LOD scores\n")
+error_lod <- calc_errorlod(dataset, Pr, quiet = FALSE, cores = NO_OF_CORES)
+# combine into one matrix
+error_lod <- do.call("cbind", error_lod)
+print(error_lod
+
+
 
 
 #  Perform genome scan