From 7194eaf537c889c979b34a1f092ba5f2c0a8e030 Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Tue, 29 Oct 2024 15:39:55 +0300 Subject: Refactor: refactor function to calculate error LOD scores. --- scripts/rqtl2_wrapper.R | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'scripts') 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 -- cgit 1.4.1